How to setup an hourmeter ?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Michel13
Posts: 69
Joined: Thursday 07 January 2016 19:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: France
Contact:

How to setup an hourmeter ?

Post 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.
willemd
Posts: 642
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: How to setup an hourmeter ?

Post by willemd »

Please define hourmeter on a contact?
What is it that you are expecting such a meter to do?
User avatar
waltervl
Posts: 5842
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to setup an hourmeter ?

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Michel13
Posts: 69
Joined: Thursday 07 January 2016 19:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: France
Contact:

Re: How to setup an hourmeter ?

Post by Michel13 »

Thank you waltervl for your positive reply.
It looks like exactly what I am searching.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest