Skip to content

Web API and UI for controlling Energenie IoT sockets

Notifications You must be signed in to change notification settings

The-Silverwood-Institute/Localwood

Repository files navigation

Localwood

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

Requirements

Usage

  1. Run server with: python3 localwood.py
  2. 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

Recommendations

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:

Photograph of a Raspberry Pi with an attached Energenie Pi-mote control board and a small copper antenna soldered to the board

Problems?

If you have problems or questions feel free to open an issue. Pull requests always welcome 😸

About

Web API and UI for controlling Energenie IoT sockets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published