Time monitoring / with on/off graph

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
ola
Posts: 4
Joined: Tuesday 11 February 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.4834
Location: Paris, France
Contact:

Time monitoring / with on/off graph

Post by ola »

I would like to record the operating time of a switch.

I would like :
- A graph giving me the duration of use (on / off state) as a switch log windows (24h or 48h graph)
- A cumulative graph giving the total operating time per day, week, month, much like the water meter.

For example to see if a light has been on this month compared to last month etc...

tracker.php?p=2&t=622
ayasystems
Posts: 66
Joined: Tuesday 19 April 2016 23:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Time monitoring / with on/off graph

Post by ayasystems »

I'm searching the same!


Could be cool have this kind of statics
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Time monitoring / with on/off graph

Post by Egregius »

That would at least require a history log that isn't cleared after x days.
Do you really want a huge database just to see that a light was on for 17 hours in August while it was only on for 16 hours in July?
Keeping a history log for months or even years would cause the tables having millions of records.
If you really want stuff like this you should use switches that have power meters.

Another way, more for programmers, would be to create a script that takes historical data from domoticz, runs some calculations and store that in a seperate database. This way you could choose for wich switches you want it and you can store calculated values so you don't need the complete history anymore.
ayasystems
Posts: 66
Joined: Tuesday 19 April 2016 23:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Time monitoring / with on/off graph

Post by ayasystems »

Egregius wrote:That would at least require a history log that isn't cleared after x days.
Do you really want a huge database just to see that a light was on for 17 hours in August while it was only on for 16 hours in July?
Keeping a history log for months or even years would cause the tables having millions of records.
If you really want stuff like this you should use switches that have power meters.

Another way, more for programmers, would be to create a script that takes historical data from domoticz, runs some calculations and store that in a seperate database. This way you could choose for wich switches you want it and you can store calculated values so you don't need the complete history anymore.
Not for all device.... But very usefull to use with boiler use time per day.

Is not necesary store all data. You can reset statics daily after compute the total time per day. You only need save the total use per day, and then sumarice total hours per week...per month....

This solution seems work fine -> viewtopic.php?t=11985
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Time monitoring / with on/off graph

Post by Egregius »

This topic gave me the idea to store those times in my sql, just for the devices I want it.
For now, it just gives me this:
Image
Later, when more data arrives I'll add graphs and stuff.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest