How to measure on-time?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
silmaril
New user
Posts: 5
Joined: 30 Nov 2018, 22:13

How to measure on-time?

#1 Post by silmaril » 30 Nov 2018, 22:28

Hi,

I would like to measure the total time an LED is switched on.
(This is the LED which shows that the burner of my wood pellet heating is active - I'd like to create an operating hours counter.)

I hope to get the hardware part set up using a photo transistor on a digital input of a D1 mini.

While experimenting, I couldn't find a way to measure the on-time of an input.
Is this missing from ESPeasy, or did I just not find the right device setup?

I already tried the pulse counter - but it seems to me that this device was not designed for this kind of task.

I'd really appreciate any hints that might help me solve this!

TIA
Rico

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: How to measure on-time?

#2 Post by grovkillen » 30 Nov 2018, 22:36

I would do it using a switch input and a timer that is triggered once per minute.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

silmaril
New user
Posts: 5
Joined: 30 Nov 2018, 22:13

Re: How to measure on-time?

#3 Post by silmaril » 01 Dec 2018, 14:12

So you mean I should solve this using rules?
Sounds like a good reason to start digging into this topic...

I think I would like to have a slightly better time resolution than one minute - but this will probably work fine every 10 seconds or so, too.

Thanks for the idea!

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: How to measure on-time?

#4 Post by grovkillen » 01 Dec 2018, 14:20

Yes you could do once per second so 10 seconds is a good number.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 26 guests