Recently I had the opportunity (fueled by necessity) to play with and implement two electrical plugs remotely controlled through Raspberry Pi.
These particular products are from a company called Energenie, which makes energy saving devices. Seems they ended up making the Pi compatible module after the director of software from Raspberry Pi made them a suggestion.
I chose the starter kit, which contains two remote controlled electrical plugs and one wireless transmitter.
The Pi-Mote and plugs operate in 433mHz RF band and have an advertised range of 30 meters. In terms of functionality you have the traditional, manual ON/OFF switch and the cool, software controlled ON/OFF.
Setup was really easy:
python ENER002-2PI.py
The Python script will run 6 sequences:
Socket 1 ON, code 1111
Socket 1 OFF, code 1110
Socket 2 ON, code 0111
Socket 2 OFF, code 0110
All sockets ON, code 1101
All sockets OFF, code 1100
Congrats, your Energenie wireless sockets are now paired and functional!
Also check the video below for the same instructions.
My particular use case was for two servers which lack WOL (WakeOnLAN) but needed a scheduled, daily power off and on. Also, in case of a prolonged power failure, these servers are automatically powered off to save UPS battery time and when electricity is restored, they’re powered back on. It is done with the help of “Restore on AC/Power loss” BIOS setting, which is triggered by turning off and on the sockets. This would not have been possible without manual intervention – until now.
More on these little hacks in a new article!