Page 1 of 1

sensor with a time something is running in python plugin

Posted: Tuesday 28 July 2020 18:38
by Plips
I have a written a python plugin, which collects data from a heater, say "heater runningtime in minutes" . Every time the heartbeat runs, it collect the time the heater has been running since the heater was installed.
So lets say up until now it ran for 100 hours (6000) minutes. It is running now so in an hour it will return the value 6060.

I want to show all of that in a log file, and so eventually showing yesterday it ran for 0.5 hours minutes, today for 1 hours and this week for lets say 2.5 hours.

What counter type to use? Counter (generic) and divider 60 doesn't work. Counter generic, subtype 5 (time) doesn't work. Nowhere it is documented how to enter the time.