Page 1 of 1

How to setup an hourmeter ?

Posted: Saturday 25 January 2025 13:08
by Michel13
Hello everyone,

I have been struggling for a few days to set up an hour meter on the closing of a contact.

I have not found on the forum or elsewhere how to implement this function which seems quite simple at the start.

I have tried by creating several types of virtual counters but none seems capable of counting a time or I have not understood how to make them work.

It is hard to believe that it is not possible to have a virtual meter that can do this directly without going through complicate time calculations in a script.

Can someone tell me what type of virtual sensor I should use for an hour meter (total and daily) and what command to use to activate it in a lua script?

Or better, is there an example of a script somewhere that performs this function?

Thanks in advance for your help.

Re: How to setup an hourmeter ?

Posted: Sunday 26 January 2025 19:12
by willemd
Please define hourmeter on a contact?
What is it that you are expecting such a meter to do?

Re: How to setup an hourmeter ?

Posted: Monday 27 January 2025 9:32
by waltervl
Setup a dummy incremental counter, change the parameters as desired and run a script, both are discussed in the following topic

viewtopic.php?t=27776

Re: How to setup an hourmeter ?

Posted: Tuesday 28 January 2025 15:27
by Michel13
Thank you waltervl for your positive reply.
It looks like exactly what I am searching.