After couple of iterations of code re-factoring, I decided it is time to post this log showing the 'ESP SmartPlug' in action. I combined video of a heater being switched on and off remotely with a screen capture of the browser window running the remote interface. On the browser window you can see the 'Override' button, being pressed first, which stops the rules processing and allows for manual operation. After the heater is turned on, I change to a higher setting and you can see the real time graph changing. Currently the plug status updates are pushed every 5 seconds to the browser via websockets and also a UDP multicast is sent at the same time. Everything you see is being run purely from the ESP module, which gives me great confidence the my initial is achievable. The completed functionality in the ESP include the following:
- Persisting of 'nodes', 'things' and 'recipes' to file and loading them on start up;
- Dynamically adding other 'nodes' that send broadcasts;
- Processing updates from broadcasts;
- Processing of 'recipes' and updating state of 'things';
- Websocket interfaces to update 'things'; add, update and delete 'recipes';
The javascript code already caters for a multi 'node' scenario and the only thing left is adding the interface for managing the current 'node recipes'.
Please, feel free to give me some feedback on the project idea and implementation of it so far.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.