42wim / plugctl

Smartplug Maginon controller
GNU General Public License v2.0
5 stars 4 forks source link

Added support for posting amp, watt, kwh (device) and volt data to emoncms #7

Open joyrider3774 opened 8 years ago

joyrider3774 commented 8 years ago

Hi, I added support for emoncms, in order to post the amp, watt kwh (device) and volt data to emoncms. Emoncms ( http://openenergymonitor.org/emon/ ) is an open source system to gather data, display all kinds of graphs and create dashboards based on the values. Here is an old / simple example video of the things you can do after posting the values to emoncms : https://www.youtube.com/watch?v=NKd0XZ2hMHg

I also had problems with plugctl hanging after some time. The problem seemed to be fixed with an experimental change defining timeout values on read / write operations on the telnet connection so that it would display a timeout error instead of hanging indefinatly.

I also added a simple batch file example to run plugctl in a constant loop so that when there is an error raised, for example timeout or website temporary not availible it will restart plugctl in order to be able to post continiously to emoncms even when errors occured.