Store time difference between switches in log file
Posted: Saturday 04 March 2017 16:22
Hi All,
I'd like to monitor my traveling time to work with Domoticz. I was thinking of doing that by monitoring the difference between 2 switches:
So difference between:
Time Home = Off
Time Work = On
This must be doable in Lua or something (except I don't know how) but it becomes a bit more complicated because offcourse I won't ALWAYS be heading to work when I leave my house. So I need the script only to start when Work = On, and then take the last "Off" entry from my Home switch.
First I'd just like to put the output in a simple log file, maybe later some kind of graphic.
Any ideas here?
I'd like to monitor my traveling time to work with Domoticz. I was thinking of doing that by monitoring the difference between 2 switches:
So difference between:
Time Home = Off
Time Work = On
This must be doable in Lua or something (except I don't know how) but it becomes a bit more complicated because offcourse I won't ALWAYS be heading to work when I leave my house. So I need the script only to start when Work = On, and then take the last "Off" entry from my Home switch.
First I'd just like to put the output in a simple log file, maybe later some kind of graphic.
Any ideas here?