whaleygeek / pyenergenie

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

Device classes #61

Closed whaleygeek closed 8 years ago

whaleygeek commented 8 years ago

This is the result of a sprint to implement object oriented device classes. The main innovation is that you can put devices into a registry (either manually, programatically, or via running the setup_tool.py in discovery mode). You can then just refer to those devices as a variable in your main app program, ask it to do things, and read out the latest values of data values, in a device agnostic way. You no longer need to interact with the raw radio interface and packet decoders, all that is handled transparently for you.

The demos have changed significantly to reflect this new object oriented method of working. The best app example to look at to get started is control_any_auto.py as it shows off the automated variable creation and device agnostic interface to switching two completely different device types.