Control Energenie smart sockets via a Raspberry Pi using a web interface or API.
Adapted from: https://energenie4u.co.uk/res/pdfs/ENER314%20UM.pdf
- Python 3
- Raspberry Pi (I used a Zero W)
- Energenie Pi-mote control board
- Web.py
pip3 install -r requirements.txt
- Run server with:
python3 localwood.py
- Use web UI: http://localhost:8080
Use environment variables to name each power socket. You can control up to 4 sockets.
Unnamed sockets will be hidden from the UI.
SOCKET_1_LABEL="Desk lamp"
SOCKET_2_LABEL="Fairy Lights"
SOCKET_3_LABEL="Fan"
SOCKET_4_LABEL="Speakers"
You can optionally customise the page's heading with PAGE_HEADING
and the web browser's tab title with PAGE_TITLE
I'd recommend running this on the Pi as a systemd service, so it boots with the Pi. Here's my systemd config to get you started. If the systemd service fails to start use journalctl -u localwood.service -n 40
to get the program's logs.
For accessing outside the house (e.g. with the Google Assistant) you can use IFTTT and ngrok. Alternatively you can use MQTT by running this adaptor to turn MQTT messages into Localwood API calls.
Soldering a 433MHz antenna to the Energenie control board can dramatically improve performance:
If you have problems or questions feel free to open an issue. Pull requests always welcome 😸