Pulse Counter - Send a message to controller for each pulse?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
TommySharp
Normal user
Posts: 19
Joined: 20 Oct 2017, 14:30

Pulse Counter - Send a message to controller for each pulse?

#1 Post by TommySharp » 30 Apr 2018, 05:16

I'm trying to monitor my energy usage and have a meter that has an LED that pulses 1000 times per KwH.

I had something working with an arduino where it would sent an MQTT message every time there was a pulse. Then to calculate the "live" power usage I calculated the time since the last pulse and used that to generate quite an accurate "watts" value.

Is there any way in ESP Easy to do this? Send a message each time there is a pulse?

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

Re: Pulse Counter - Send a message to controller for each pulse?

#2 Post by grovkillen » 30 Apr 2018, 07:07

This is how I do it.

Code: Select all

%value%*3600/<delay interval>
3600 is seconds in an hour.
Attachments
Screenshot_20180430-070457.jpg
Screenshot_20180430-070457.jpg (295.32 KiB) Viewed 2328 times
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: Bing [Bot] and 71 guests