I am looking for a virtual sensor which can track duration/time. I want to track how long certain devices are on/in use. I have implemented a way to test whether these devices are on in another sensor and I would like to record how long these devices are on each day. I have been able to implement this by creating a dummy text sensor and every minute a script runs to check on the devices needed and updates these text sensors. It works but the two main drawback are that the log is useless and that you cannot easily compare it to a value (unless parsing it). It shows an update every minute the device is on but I would rather see a line graph which shows an increase when the device is on (time on is increasing) and a flat line if it isn't.
I know, you check this on the original device but I would like to create an alert for example if my heater is on for more than 1 hour when the temperature outside is greater than x or send an alert when minecraft has been played for more than x hours/minutes etc
Virtual sensor for duration/time
Moderators: leecollings, remb0
-
- Posts: 536
- Joined: Friday 23 December 2016 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands Purmerend
- Contact:
Re: Virtual sensor for duration/time
What about this:
Increment a counter on the every minute check.
Increment a counter on the every minute check.
Who is online
Users browsing this forum: No registered users and 1 guest