I’ve spent the last few weeks building a proper open source Rust service to bridge Energenie’s ENER314-RT Raspberry Pi hat into Home Assistant via MQTT discovery — and I’m really pleased with how it turned out.
What it does
- Controls ENER010 4-gang extension leads via OOK 433MHz
- Controls MIHO008 light switches via OOK (full ON and OFF — this took some serious reverse engineering!)
- Monitors MIHO004 power adapters via FSK OpenThings — real power draw and mains frequency in HA
- MIHO005 Adapter Plus framework ready for switch + monitoring
- Full Home Assistant MQTT auto-discovery — devices just appear
- Runs as a lightweight sysvinit service on Raspberry Pi
The technical story
The MIHO008 ON command was the hardest problem. Every implementation I found only handled OFF reliably. The fix turned out to be continuous TX mode — feeding the RFM69 FIFO 50 times with no inter-frame gaps, exactly matching how pyenergenie’s C implementation works. With gaps between frames the switch rejected ON as a malformed pairing attempt. Without gaps — it just works.
The OpenThings FSK parameter IDs in most documentation are also wrong. We captured live packets with an RTL-SDR and cross-referenced against the Achronite C library to get the correct values.
What it looks like in HA
Devices appear automatically. Freezer showing live 52W power draw and 50Hz mains frequency. All sockets controllable with a tap.
The collaboration
This project was written by Claude (Anthropic’s AI) and directed by me. Every line of Rust is Claude’s, every hardware decision and debugging session was collaborative. I think it’s a good example of what human/AI pair programming can produce on real embedded hardware.
Code
MIT licensed. Contributions welcome. sysvinit only — no systemd.
Screw you Poettering… Best on Devuan or BSD…