blog:personal_diy_pi_powercontrol

This is an old revision of the document!


So, as part of the big (to little) office move in 2019, I had a lot of electrical equipment to squeeze into a very small space.

This meant being ruthless is wrapping cables together, routing them under and behind my desk and shelving and generally trying to hide plugs, sockets and wiring away. This, of course, means that getting access to plugs or power strips to physically turn equipment on or off is completely impractical.

As a point of reference, there are almost 50 UK mains plugs in use in this room…


It would be irresponsible, costly and rather dangerous to leave all of them powered on all of the time, so I made the decision to have them all remotely controlled by Energenie radio-controlled power strips. I had a couple of these elsewhere in the house (handy to turn the TV/Hifi off without having to reach around the back for the socket!), and, having seen that an open-source project existed to interface with them, thought they would make a good basis for a home automation system without all of the vendor lock-in or cloud hosted server interfaces.

There are single socket versions available, but for my use, the 4-way power strips are the most efficient use of space - each socket being individually controlled; on/off, via a pre-programmed RF remote.

Energenie also offer a specific add-on hat, for use with a Raspberry Pi, but a lot of people have found that the generic Hope RFM69 radio module (which is an SPI bus-interfaced radio module) works just as well.

Duplication remote control functionality

One of


I had done a little bit of libSDL programming for my Cosworth ECU interface project, and had since done a little more at work, so I thought I could knock together an interface using a simple touchscreen board for the Pi.

So this is what I came up with:

Scrollable pages of buttons that are mapped to individual power sockets on the remote control power strips. The action of the button can be toggle from on to off by the middle icon on the bottom row (green for power-on, press to toggle to red and set to power-off).

I also added a couple of power monitor plugs:

…which I also pulled data from using the RF module, displaying it on the touchscreen at the press of a button:


More content will go here, but for now:

https://github.com/megatron-uk/sdlRFController/

  • blog/personal_diy_pi_powercontrol.1571820527.txt.gz
  • Last modified: 2019/10/23 09:48
  • by john