I’ve learned a few more things since part 1.
- The ‘pynergenie’ python code on Github is pretty neat and works well on the Pi 2.
- pynergenie doesn’t contain a simple command to turn a switch on or off, so I threw one together (by copying a lot of code that was already there) and sent a pull request.
- There’s no real security around who can turn Energenie plugs on or off. If a nasty hacker with a Pi+PiMote is within range, he or she can turn plugs on or off.
The lack of security around who can turn plugs on or off both surprises and bothers me. I figured in these days of bluetooth, pairing devices was mostly a solved problem. Apparently not. The MIHO005 does indeed have a pairing mechanism, but it’s not for pairing with the PiMote - the Pi+PiMote can happily control the MIHO005 even though it has never been paired with it. All it needs to know is the device ID, and the PiMote can ask for that over the airwaves.