Wednesday, 12 February 2025

Too many buttons

 I have a standard ham licence (VK7HPC) and am currently poking at a Retevis RT95 (same as the Anytone AT-778UV). As I'd like to use it for digital modes, Steve (KM9G) over at Temporarily Offline Ham Radio has a playlist where he's investigating the pinout to make a microcontroller APRS interface, however he's not yet mentioned how to memory jump or enter a direct VFO frequency. Sure CAT control would be nice, but this radio's under 200 AUD delivered, so that's unlikely to happen. 

So, the manual hints at "keypad serial data" on pin8 so with a bodge together of 2 cat5 outlets, some wire and a logic analyser, lets see what we can find...


Force of habit means I used the T568A colours, so the from the pinout shown here you'll need to swap the orange/green pairs round. 

Anyway: Up, Down, PTT all get pulled to ground when pressed as expected and there IS some serial data on pin8, now I need to sample and collect more...


Update

In a stroke of good fortune, it appears to be plain ascii at 9600 baud. Pressing each key in turn spat out AL~K1, AL~K2, ... AL~Kx where x is 0-9,*,#,A-D and / (the latter being the toggle for A/B input)

Next up will be introducing it to little bobby microphone and seeing if I can send commands to the radio directly from a microprocessor





Friday, 31 January 2025

Particulate measurements near bushfires

Back in the 2019 Tasmanian bushfires we were lucky enough to be the other side of the Huon River from the fireground,  however we had a LOT of smoke (compare the photo below to the street view image)

Smoke filled landscape
We were also lucky enough to take part in a Huon Valley trial to compare HEPA filter systems which used a pair of CSIRO Smoke Observation Gadgets (further details on these units in Sensors 2021, 21(21), 7206; https://doi.org/10.3390/s21217206) to log the air quality (pm2.5 and pm10 measurements) inside and out. 

It's now 2025, and while we've been very lucky compared to the US and mainland Australia, we now have a bushfire nearby (~6km from our house) that contains the following advice:
Residents should be aware that smoke and ash may be visible in the Channel area over the coming weeks, and anyone who is at higher risk from smoke should enact their personal health plans.
So, it's time to DIY some new smoke sensors! (I would just rely on the excellent BLANkET network already in place in Tasmania, but there aren't any downwind of the current fire)

Hardware

I already have a pair of PMS7003 sensors unused in a 'future projects' box, so we'll use them. They are supported by esphome, so using an esp32/esp8266 with them seems a simple choice

Mine (located in Kettering) will use a wired esp32 (because POE makes that simple), and I'll see if I can get one mounted at the Channel Men's Shed in Margate which will need to use wifi

I don't have a nice shiny 3d printed enclosure, so it'l use something like an old yoghurt tub to weatherproof them.

Build

.. To Be Continued at the weekend :-)

Monday, 4 November 2024

Word of mouth Skye History

Many years ago we lived in the Old Manse in Waternish, Skye. If you look on the maps, you'll spot that unlike nearly all the other houses on the road, the Manse has house *directly* opposite, blocking the view over Loch Bay and the Minch. See also street view

The backstory to all of this is that the Minister at the time had fallen out with the Factor / Laird and when the health board were looking to build a 'nurses bungalow' the only land available in the entire area was that plot, directly in front of the Manse.

As with all the best tales, the twist was that when the factor became old and decrepit, the only person who'd take him in was ... the minister, so he spent his final days looking out at the non-view.

(blogged as a response to https://www.youtube.com/watch?v=p8fOJdmSbdU)

Monday, 23 September 2024

Tomzn/hiking DDS238-2 rs485 Energy Meter with ESPHome for Home Assistant

There seem to be several branded versions of this cheap 2 unit wide energy meter available online from the regular stores. I have a 'tomzn' branded on purchased several years ago and monitored the shed power in our last house. It's been relocated to the new place and is now in the switchboard in the shed^Wart studio in the garden.

Interfacing to home-asisstant

There are a pair of RS485 terminals and second pair provide pulse output. I got the sparky to run a short length of RS485 cable to a convenient location near a GPO for a USB power supply. I then have this connected to a cheap MAX485 module and on to an ESP8266 using the hardware serial port pins. I'm driving the max485 breakout with 3.3v so I don't need to worry about level shifters.

It's using a full-size Wemos D1 R2, purely because that's what I had on hand. As I'm using the serial port pins for connection to the RS485 converter, unplug before serial flashing. (OTA updates are fine)

My current software polls the meter every 5 seconds (note the RX/TX leds lit on the breakout, and the phone symbol on the meter LCD when this happens) https://github.com/Elwell/ESPHome-DDS238 has a very similar config to production

and you end up with this on the esphome and home assisstanr web interfaces
 



Friday, 19 July 2024

New House, New Blogpost

 Well, it's been a while since I last posted an update - shorter snippets are likely to be on Mastodon (https://mast.hpc.social/@Elwell) so figured I'd scribble something down.

We sold The Roundhouses in Sept 2023 and have moved "Over East" to Kettering. Now that I have loads of spare time (ha ha ha ha) I've joined the local Mens Shed which has an active ham group (VK7CMS). This and a discussion on the REAST discord about packet /APRS got me thinking about how to packetiffy a foxhunt. First thoughts scribbled at https://github.com/Elwell/ham-geocache

Tuesday, 15 March 2022

Feeling Pumped!

Having just had a day without power, and then going round the site to check everything came back online correctly (including services such as water pumps, septic systems, freezers etc) I started thinking again about our wastewater system. 

This is a Taylex envirocycle (septic tank + air blower + submersible pump in the final stage to deliver the effluent to 200m+ of dripper lines in a field). The "smarts" aren't really much - The power from the main switchboard comes in to a single outlet that has a 12v plugpack that powers the PCB, and on to a double outlet (with an overload trip) that powers an air blower + submersible pump. The blower runs 24/7 and has a pressure switch going to the PCB, and the pump cycles independently when it's float switch rises. There's a high-level float switch that triggers an alarm on the PCB, and that's about it.




Wishlist

Something that integrates with Home Assistant and tells me:

  • system power OK
  • Binary sensor for Air pressure trip
  • Binary sensor for high level alarm
  • Indication of when the discharge pump's running
All bar the last of these can be picked up from cabling already coming into the "controls" housing, but there's no way the existing system can pick up the pump-run sense. As all the pump cabling is pre-terminated I'd like to leave it that way, and I suspect the simplest method is to add a CT clamp over the active (live) cable in the double socket but that's likely to be very space constrained as there's also a circuit breaker in there. The plugpack is a switched mode DC one, so no clever voltage measurement at the same time to get accurate usage



Design

I think the best way would be to replicate the existing PCB (dimensions, pinouts, LED / mute placement) but add in something like an ESP8266 that can sit on our telemetry wifi network (signal strength down by the septic tank is good) and there's already plenty of options for integration (tasmota's trivial to customise)

This should keep me out of mischief for a while, as well as maybe being that "I should really learn KiCad" itch.

Concerns


The obvious one is what about updates? ANY network connected device presents an attack surface if not maintained. Sure, I'm likely to keep stuff ticking over, but what about $future_owners? obvs, I won't be using a cloud service for any of this and hardware will be 'input only' so it won't affect the running of the system. What's the design lifetime for one of these units anyway? 20-30 years?
There's also the thorny issue of Certification - a one-off's going to be horrifically expensive to get any sort of certification for, and who'd install it? As Taylex's website states Please remember that by law, only licensed professionals are permitted to service and maintain on-site wastewater treatment systems.
Sigh. I suspect this may remain a pipe dream.

Wednesday, 2 September 2020

Thoughts on Statuspage.io integrations

 $dayjob uses statuspage.io for our public status page. Although I've got some things automated, there's still a bunch of components that need manual updating when there's an issue (enough to keep me out of mischief working out how to automate them without false alerts anyway). However this post isn't for getting info _in_ to statuspage, but for how to get it _out_, and what I want.

We're predominantly a command line shop (no, we don't yet have a JupyterHub frontend), so users are presented with a MOTD on login. Now, wouldn't it be good if that could be updated automatically with details of upcoming planned outages as well as any recent (and current) incidents that affected the service you're currently logged into?

So - Armed with the API, it should be possible to get upcoming maintenance[✓] and the impacted components[✓], but where do I map the cluster name to the statuspage group_id? or, for that matter any of the autogenerated id strings. Hard coding them into scripts is out, a lookup makes sense but how many CMDBs out there come with that sorta functionality built in. and we're back to another 'where is my source of truth?' problem. Sure I can string match components->name and check that "group": true and then pull the ID, but... yeah faffy. 

Anyway, after much parsing (all hail requests) it's possible to get the various incidents/component states/planned maintenance out and the resulting text snippets touched to the correct updated_at timestamp whereupon they can be pulled into the final output whenever the files are regenerated by a Makefile build under Jenkins. The goal of DRY is starting to be achieved by updating one place (currently statuspage) and having that trigger a build via webhook which then distributes the info out to the clusters.

I think a former colleague summed it up fairly well tho.


Too many buttons

 I have a standard ham licence (VK7HPC) and am currently poking at a Retevis RT95 (same as the Anytone AT-778UV). As I'd like to use it ...