diff --git a/doc/devices_classes_branch.txt b/doc/devices_classes_branch.txt index 5d527f0..a2fabb1 100644 --- a/doc/devices_classes_branch.txt +++ b/doc/devices_classes_branch.txt @@ -203,18 +203,10 @@ whole record. - --------------------------------------------------------------------------------- -GENERAL NOTES - -aquarium.when_turned_off(just_turned_off) - - -------------------------------------------------------------------------------- PRESENT STATUS Router written and integrated in energenie.loop() - Discovery behaviours written and tested ok monitor_mihome works with a synthetic join and toggles switches KVS implementation completed and all tests pass @@ -223,9 +215,7 @@ -------------------------------------------------------------------------------- -TODO NEXT - - +PLAN UP TO: MERGE BACK TO MASTER ---- TEST ON REAL HARDWARE @@ -236,44 +226,20 @@ * add back in the loop() call in the monitor_mihome.py program +---- DEMO APPS + +setup_tool.py +mihome_energy_monitor.py +games_console_minder.py ----- BETTER DEMOS +---- EVENT HANDLERS ON DEVICES (later) + +(add this as an issue of 'ideas for devices') +Need to get the core code out there, and improve it later aquarium.when_turned_off(just_turned_off) -There are a few variants of things to test. -Really do want the demos in the top level directory to be simple and representative -of what a first time user might do with the code - -1. legacy switches -- learn mode for legacy switches (learn mode with a broadcast tester) -- turning legacy switches on and off - -energenie.start_learn(house_code=0xABCDE, index=2) -raw_input("Press enter when done") -energenie.stop_learn() - -2. mihome monitoring -- discovering and registering mihome monitor devices into your registry (learn mode/tester) -- generating an energy log from mihome monitors - -3. mixed monitoring and control -- creating simple logic that turns mihome switches on and off based on energy usage/timer -- perhaps also turning legacy switches on and off based on energy from a mihome monitor -- showing the device agnostic oo interface for any switch device - -Perhaps there is a commissioning app, that allows -- learn mode broadcasts for legacy devices -- testing legacy device switches by turning on and off -- assisted join from mihome with add to registry with friendly names -- showing trace of data coming from mihome monitor -- turning adaptor plus switch on and off - -It could just be a simple menu system. -This then means you don't have to have all this in the demo apps -and the demo apps can just refer to object variables names -from an assumed auto_create registry. ----- RELEASE TESTING AND RELEASE diff --git a/src/games_console_minder.py b/src/games_console_minder.py new file mode 100644 index 0000000..dabbb71 --- /dev/null +++ b/src/games_console_minder.py @@ -0,0 +1,16 @@ +# games_console_minder.py 28/05/2016 D.J.Whale +# +# A simple demo showing how to turn the games console off after a timeout limit + +# REQUIREMENTS +# - senses when the games console is turned on via energy usage monitor and/or switch status +# - starts a cumulative timer of game time used +# - when a limit is reached, sound an alarm by playing a warning sound +# - when 1 minute from turn off, sound a very anoying warning sound +# - turn the plug off when alarm time reached +# - persist game used time to a file for recall later +# - allow limits on total time per day, and total time in one sitting +# - simple status messages on the screen + +# END + diff --git a/src/mihome_energy_monitor.py b/src/mihome_energy_monitor.py new file mode 100644 index 0000000..974edc8 --- /dev/null +++ b/src/mihome_energy_monitor.py @@ -0,0 +1,14 @@ +# mihome_energy_monitor.py 28/05/2016 D.J.Whale +# +# A simple demo of monitoring and logging energy usage of mihome devices + +# NOTE: This will eventually replace monitor_mihome.py + +# REQUIREMENTS: +# receive updates from any registered device in the registry +# show friendly data update messages on the screen +# store data updates to the log file + +# END + + diff --git a/src/monitor_mihome.py b/src/monitor_mihome.py index a62fcbc..6bb3f54 100644 --- a/src/monitor_mihome.py +++ b/src/monitor_mihome.py @@ -2,6 +2,11 @@ # # Monitor Energine MiHome sockets +#NOTE: This file will soon be deprecated, and replaced with mihome_energy_monitor.py + + + + import energenie ##import Logger import time diff --git a/src/setup_tool.py b/src/setup_tool.py new file mode 100644 index 0000000..5f0afdc --- /dev/null +++ b/src/setup_tool.py @@ -0,0 +1,22 @@ +# setup_tool.py 28/05/2016 D.J.Whale +# +# A simple menu-driven setup tool for the Energenie Python library. + +# Just be a simple menu system. +# This then means you don't have to have all this in the demo apps +# and the demo apps can just refer to object variables names +# from an assumed auto_create registry, that is built using this setup tool. + +# REQUIREMENTS +# - learn mode broadcasts for legacy devices +# - testing legacy device switches by turning on and off +# - assisted join from mihome with add to registry with friendly names +# - showing trace of data coming from mihome monitor +# - turning adaptor plus switch on and off +# - dumping the contents of the registry in a simple format +# - deleting devices from the registry] +# - renaming devices in the registry (e.g. auto learn devices->nice name) + +# END + + diff --git a/src/web_console.py b/src/web_console.py new file mode 100644 index 0000000..1eb701c --- /dev/null +++ b/src/web_console.py @@ -0,0 +1,17 @@ +# web_console.py 28/05/2016 D.J.Whale +# +# A demo of a simple web console for controlling/monitoring Energenie devices + +# This is mostly a very simple + +# REQUIREMENTS +# - zero install (probably python bottle) +# - simple monitor/control interface +# - live status display of all registered devices with values and states +# - turn on/off devices that have a switch +# - simple setup tool interface +# - enter/exit learn mode for legacy +# - change discovery status +# - rename/delete devices in registry (e.g. from auto learn) + +# END