whaleygeek / pyenergenie

A python interface to the Energenie line of products
MIT License
81 stars 51 forks source link

Write a sample program that switches the plug on and off #5

Closed whaleygeek closed 9 years ago

whaleygeek commented 9 years ago

The message structure is already defined, not much to do here

whaleygeek commented 9 years ago

I've got this working on my Pi, just haven't pushed it up yet.

whaleygeek commented 9 years ago

The monitor.py also now turns the switch on and off every 5 seconds. It first waits for a single decoded message to come in and go into the dictionary so that it knows the sensorId, then it schedules 5 second ON/OFF messages to that ID only. Tested this on MiHome Adaptor Plus and it works fine. Also the reports from the adaptor still come out every 10 seconds.