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
Time monitoring / with on/off graph
Moderators: leecollings, remb0
-
- Posts: 66
- Joined: Tuesday 19 April 2016 23:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Time monitoring / with on/off graph
I'm searching the same!
Could be cool have this kind of statics
Could be cool have this kind of statics
Fronius plugin
https://github.com/ayasystems/froniusHttp
Solax plugin
https://github.com/ayasystems/SolaxHTTP
Openevse plugin
https://github.com/ayasystems/OpenEVSEPlugin
https://github.com/ayasystems/froniusHttp
Solax plugin
https://github.com/ayasystems/SolaxHTTP
Openevse plugin
https://github.com/ayasystems/OpenEVSEPlugin
- 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
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.
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.
-
- Posts: 66
- Joined: Tuesday 19 April 2016 23:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Time monitoring / with on/off graph
Not for all device.... But very usefull to use with boiler use time per day.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.
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
Fronius plugin
https://github.com/ayasystems/froniusHttp
Solax plugin
https://github.com/ayasystems/SolaxHTTP
Openevse plugin
https://github.com/ayasystems/OpenEVSEPlugin
https://github.com/ayasystems/froniusHttp
Solax plugin
https://github.com/ayasystems/SolaxHTTP
Openevse plugin
https://github.com/ayasystems/OpenEVSEPlugin
- 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
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:

Later, when more data arrives I'll add graphs and stuff.
For now, it just gives me this:

Later, when more data arrives I'll add graphs and stuff.
Who is online
Users browsing this forum: No registered users and 1 guest