diff --git a/doc/classes.txt b/doc/classes.txt index a0a190c..0fca1fe 100644 --- a/doc/classes.txt +++ b/doc/classes.txt @@ -225,9 +225,43 @@ ?get_valve_position ?is_on ?is_off ?set_valve_position ?turn_on ?turn_off + -------------------------------------------------------------------------------- DESIGN Registry.py +file format? platform dependent database format, like dbm but there is +a platform dependent one - but need the licence to be MIT so we can +just embed it here to have zero dependencies. + +persist the registry to disk and/or writeback new entries + +load the registry from disk and/or parse it + +add a device class instance to the registry with a friendly name +- could be from a discovery or learn process +- could be from a hand rolled object + +get a device by name from the registry + +delete a device from the registry + +create a new device class instance from a name + +auto-create variables in a given scope, for all persisted registry entries + +list the registry in some printable format (like a configuration record) + + +-------------------------------------------------------------------------------- +DESIGN NOTES - discovery process + +a way to sequence transmit messages to allow legacy devices to learn a code. + +a way to listen (for a long time) for any devices that transmit, and add them +(optionally?) to the device registry. + +a way to listen (in the background) during normal operation for unknown devices, +and optionally add them to the device registry. -------------------------------------------------------------------------------- diff --git a/src/energenie/Devices.py b/src/energenie/Devices.py index 4bff2ca..cedd8a7 100644 --- a/src/energenie/Devices.py +++ b/src/energenie/Devices.py @@ -404,7 +404,7 @@ # on next boot # Registry.add(tv) # Registry.add(fan) - + # Note, when adding registry, all of this data will be stored in the persisted # registry, just start the registry and it creates all your object variables # for you from it's metadata.