Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blog:personal_diy_pi_powercontrol [2019/10/23 09:30] – [Where's the code?] john | blog:personal_diy_pi_powercontrol [2019/10/23 10:09] (current) – john | ||
---|---|---|---|
Line 20: | Line 20: | ||
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. | 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 of remote control functionality === | ||
+ | |||
+ | One of the problems with the Energenie RF system, is that out of the box, the handsets are pre-programmed with device codes which you pair with the sockets. It's not possible to read what those codes are (which would be necessary, in order for the power sockets to respond to another radio device), and there' | ||
+ | |||
+ | There **is** a [[https:// | ||
+ | |||
+ | As it turned out, needing to do that wasn't strictly necessary; putting the power sockets in their "pair with handset" | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Touchscreen User Interface ==== | ||
+ | |||
+ | So I technically had a way of controlling the sockets, but I needed a way of interacting with that functionality.... keeping track of a dozen or more remote controls was **not** what I wanted to do. | ||
+ | |||
+ | I had done a little bit of [[https:// | ||
+ | |||
+ | 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 [[https:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ...these are strictly broadcast-only devices which send a burst of power metrics over the same RF signal as the power sockets, approximately every 60 seconds. The PyEnergenie project also had support for these, so I was able to pull this data in using the same RF module used for controlling the sockets, displaying it on the touchscreen at the press of a button: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | This screen let me monitor the power use of all of the sockets in the room in (almost) real time. There is a lag for the power monitor sockets to re-broadcast their data (it's every 60 seconds or thereabouts), | ||
---- | ---- |