Pulse Counter
Moderators: grovkillen, Stuntteam, TD-er
Re: Pulse Counter
Hello Insippo,
which electricity meter do you use? Does it have two connectors "S0+" and S0-" ?
Regards
Shardan
which electricity meter do you use? Does it have two connectors "S0+" and S0-" ?
Regards
Shardan
Regards
Shardan
Shardan
Re: Pulse Counter
Yes. These 2 connectors
Some Raspeberry Pi's, Arduinos, Esp8266, solar panels 1500w, 2 lakes,6 ha fields, German shepherd and more
Re: Pulse Counter
Then it should be easy to do.
These counters usually have a so called "Open Collector" output.
You will need just a resistor 2,2K .... 10 K and some wiring: .
The wiring should not be too long as i assumed the ESP is placed near the counter.
Use the "Pulse Counter" in ESPEasy to get the readings.
Hope that helps
Regards
Shardan
Regards
Shardan
Shardan
Re: Pulse Counter
Thank you. Tomorrow i tray if i find time. This is easier than mysensors with billoim wires
If my wifi signal reaches out.
What GPIO nr. need use ?

What GPIO nr. need use ?
Some Raspeberry Pi's, Arduinos, Esp8266, solar panels 1500w, 2 lakes,6 ha fields, German shepherd and more
Re: Pulse Counter
Hello,
I'd recommend not to use the GPIO0 as it is used for flashing.
Any other GPIO can be used, it's configurable in the ESPEasy devices.
Regards
Shardan
I'd recommend not to use the GPIO0 as it is used for flashing.
Any other GPIO can be used, it's configurable in the ESPEasy devices.
Regards
Shardan
Regards
Shardan
Shardan
Re: Pulse Counter
Okay.
Thank you.
Thank you.
Some Raspeberry Pi's, Arduinos, Esp8266, solar panels 1500w, 2 lakes,6 ha fields, German shepherd and more
Re: Pulse Counter
Hello,
I have some issues to get right values from ESP easy (latest build) to Domoticz.
Earlier, i was using mysensors Arduino nano node pulsecounter for this, but range was not good with that one
I changed to Wemos + ESPeasy, which gives me a better range. Problem is, that with ESPeasy, i cannot get correct values to my "Electric (Instant + Counter)" device in Domoticz.
Earlier with Arduino, i was able to get data, which was shown correctly on this: INSTANT, OVERALL, TODAY Info, all are important.
(with values of course)
Now with ESP easy, i get values only like this:

I know this is problem of a form data is send to Domoticz, but i do not have skills to make it right
Maybe someone can help me with this?
Thank you!
I have some issues to get right values from ESP easy (latest build) to Domoticz.
Earlier, i was using mysensors Arduino nano node pulsecounter for this, but range was not good with that one
I changed to Wemos + ESPeasy, which gives me a better range. Problem is, that with ESPeasy, i cannot get correct values to my "Electric (Instant + Counter)" device in Domoticz.
Earlier with Arduino, i was able to get data, which was shown correctly on this: INSTANT, OVERALL, TODAY Info, all are important.

Now with ESP easy, i get values only like this:

I know this is problem of a form data is send to Domoticz, but i do not have skills to make it right

Maybe someone can help me with this?
Thank you!
Re: Pulse Counter
I just had the same problem literally 30 min ago.
This is how to fix it: Choose Normal counter incremental device as dummy
Then under settings in Domoticz, change the Pulse value for energy to whatever fits your purpose
This is how to fix it: Choose Normal counter incremental device as dummy
Then under settings in Domoticz, change the Pulse value for energy to whatever fits your purpose
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Re: Pulse Counter
Hello,
the connection is simple, as long as your counter has the "S0" pulse output:
.
Yes, that simple

The "S0" connect is a standardized output without own voltage supply so you have to add the resistor.
That makes it easy to connect to the 3,3V ESP.
BTW just a hint:
For questions like this it's better to open a new thread in the forum then attaching to an existing thread.
Other users searching for the same problem will never find it here

Regards
Shardan
Regards
Shardan
Shardan
-
- New user
- Posts: 4
- Joined: 09 Mar 2017, 01:56
Re: Pulse Counter
Hi. To get a reading from the pulse counter in Domoticz . Go back to your esp and change you formula to "%value%*60". The pulse counter resets its value every minute so this gives you the most accurate values.journeyman wrote: ↑04 Mar 2017, 17:32 Its working now on another ESP, giving some numbers but the only problem left its to set it correctly in domoticz its giving only 30 - 40watts and no kWh counting.
Thank you!
Mind you it also means that as your only counting from 2 to 30 pulses a minute, your value will go up and down by 60 Watts in Domoticz.
Make sure that in Domoticz its computing the value and using "Instant & Electric Counter"
Re: Pulse Counter
I got it working. Dummy device is: General, kWh. Type is: Usage and Computed.
In Espeasy i made settings for Pulse counter:
Delay: 60
Debounce Time (mSec): 100 (did not work correctly lower than this value).
Data so send: Delta
Formula for usage: "%value%*3600/60" (this gives me a Instant usage)
Formula for Total: %value%/1000 (this gives me a total evergy usage / hour / day / etc... )
With these settings, i got exactly same values than my electric company informed me. Hopefully this helps someone else with same case.
In Espeasy i made settings for Pulse counter:
Delay: 60
Debounce Time (mSec): 100 (did not work correctly lower than this value).
Data so send: Delta
Formula for usage: "%value%*3600/60" (this gives me a Instant usage)
Formula for Total: %value%/1000 (this gives me a total evergy usage / hour / day / etc... )
With these settings, i got exactly same values than my electric company informed me. Hopefully this helps someone else with same case.
Re: Pulse Counter
To get a 'standard' output to Domoticz, the 2 formulae in ESPEasy need to be corrected for the number of pulses per kWh coming out of the S0-interface, because kWh-meters exist with rates different from the 'nominal' S0-value of 1000pulses/kWh.
Examples known with pulse-output as low as 1/kWh (SDM120C, at the adjustable S0-interface) and as high as 3200pulses/kWh (for DDS238).
Examples known with pulse-output as low as 1/kWh (SDM120C, at the adjustable S0-interface) and as high as 3200pulses/kWh (for DDS238).
Last edited by Ton_vN on 05 Aug 2018, 11:33, edited 1 time in total.
Re: Pulse Counter
Just a check/question for understanding.
The Pulse-Counter-interface of ESPEasy also produces/provides a value Time.
What is the content of this value Time?
If the ESP8266 is connected to an S0-interface is there any meaningful application of this Time-value e.g. related to calculation of Usage?
The choice for upload to the controllers is
The Pulse-Counter-interface of ESPEasy also produces/provides a value Time.
What is the content of this value Time?
If the ESP8266 is connected to an S0-interface is there any meaningful application of this Time-value e.g. related to calculation of Usage?
The choice for upload to the controllers is
- Delta
- Delta/Total/Time
- Total
Re: Pulse Counter
Hi all,
I would like to get a Time value only from Pulse sensor as my termostat for heating turn on light when active.
If there is possibility to have a time in domoticz, then I can calculate somehow appr. consumption.
Any idea please?
Thanks
Vojta
I would like to get a Time value only from Pulse sensor as my termostat for heating turn on light when active.
If there is possibility to have a time in domoticz, then I can calculate somehow appr. consumption.
Any idea please?
Thanks
Vojta
Re: Pulse Counter
Another issue when tried to measure just count when thermostat turned on and light started to shine.
Its a light through the red cover, diode on pulse counter get it, but counter went mad and still increasing dozens of counts.
When tried normal handlight blink worked like a charm.
Kinda desparate
Its a light through the red cover, diode on pulse counter get it, but counter went mad and still increasing dozens of counts.
When tried normal handlight blink worked like a charm.
Kinda desparate

Re: Pulse Counter
I'm planning on attaching a ESP to my S0 interface to and the connections seems clear... but could anyone share some info on what rules/calculations to use based on the imp/kwh on the reader? How often should the ESP send the value etc?
I'm not using domoticz but home-assistant so I don't have your nifty premade configs!
I'm not using domoticz but home-assistant so I don't have your nifty premade configs!

- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Pulse Counter
Here's my 1 year old config that is still running. You may use it as inspiration: https://testoftimes.com/2017/11/25/moni ... g-esp8266/Naesstrom wrote: ↑03 Nov 2018, 14:29 I'm planning on attaching a ESP to my S0 interface to and the connections seems clear... but could anyone share some info on what rules/calculations to use based on the imp/kwh on the reader? How often should the ESP send the value etc?
I'm not using domoticz but home-assistant so I don't have your nifty premade configs!![]()
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: Pulse Counter
Sweet thanks, I can't see a difference between kWh and kWh (time)?grovkillen wrote: ↑03 Nov 2018, 17:07 Here's my 1 year old config that is still running. You may use it as inspiration: https://testoftimes.com/2017/11/25/moni ... g-esp8266/
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Pulse Counter
No, it's not used (the time value). So they are the same.
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: Pulse Counter
Hi all,
just installed counting as per scheme and it looks working properly. I've did one check after 8 hours to merge counter and my domoticz measures. Results were same on both sides.
One hint for you which will find S0 output on pins 20 and 21.
Polarity as per follow S0 - 20(+), 21(-).
Thanks for guidance
.
just installed counting as per scheme and it looks working properly. I've did one check after 8 hours to merge counter and my domoticz measures. Results were same on both sides.
One hint for you which will find S0 output on pins 20 and 21.
Polarity as per follow S0 - 20(+), 21(-).
Thanks for guidance

Re: Pulse Counter
i have this smart meter attached
i use similar infrared sensor module and attached to infrared port on smart meter
and measure with oscilloscope, but cannot see any digital signal out from the module.
i'm wondering whether this infrared port on the smart meter needs to be enable?
if need to enable, then how to enable? only electric provider company can enable this?
i use similar infrared sensor module and attached to infrared port on smart meter
and measure with oscilloscope, but cannot see any digital signal out from the module.
i'm wondering whether this infrared port on the smart meter needs to be enable?
if need to enable, then how to enable? only electric provider company can enable this?
- Attachments
-
- IMG_0353.JPG (1.76 MiB) Viewed 38361 times
Re: Pulse Counter
There are gazillions types of this meter available.
Easiest is to check with you company what is available as output on their standard meter, if any
Build from there
If scope says no IR most definitely it is a programming/communication port for service purposes
Easiest is to check with you company what is available as output on their standard meter, if any
Build from there
If scope says no IR most definitely it is a programming/communication port for service purposes
Belgium and land of ESP ... counting 

Who is online
Users browsing this forum: No registered users and 13 guests