Pulse Counter not send state 0 to mqtt
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 14
- Joined: 02 Jan 2021, 16:44
Pulse Counter not send state 0 to mqtt
Hello everyone,
I have several ESPEasy running, now I noticed something because my script in the iobroker no longer worked.
The pulse counter sends the pulses to the iobrooker with mqtt, but it no longer sends the zero when counting.
What could be the reason for this? In the past it only sent 1, 0, 4, 0, 1, 1, 2, 0, as an example, and also shows the 0 in the webif.
Now it no longer sends the zero but only 1, 4, 1, 1, 2 as an example. What am I doing wrong?
When it is restarted, it sends the initial counter 0 and is also written in the iobroker.
please help :>
I have several ESPEasy running, now I noticed something because my script in the iobroker no longer worked.
The pulse counter sends the pulses to the iobrooker with mqtt, but it no longer sends the zero when counting.
What could be the reason for this? In the past it only sent 1, 0, 4, 0, 1, 1, 2, 0, as an example, and also shows the 0 in the webif.
Now it no longer sends the zero but only 1, 4, 1, 1, 2 as an example. What am I doing wrong?
When it is restarted, it sends the initial counter 0 and is also written in the iobroker.
please help :>
- Attachments
-
- TW
- 2025-01-05 14_43_24-WaterJet.png (32.09 KiB) Viewed 4864 times
-
- TW2
- 2025-01-05 14_43_55-WaterJet.png (29.36 KiB) Viewed 4864 times
-
- TW3
- 2025-01-05 14_44_17-.png (25.9 KiB) Viewed 4864 times
Re: Pulse Counter not send state 0 to mqtt
Hm, possibly there's some unexpected data in the setting for "Ignore multiple Delta = 0".
What exact ESP8266 build are you running?, so I can upload a test-build here.
What exact ESP8266 build are you running?, so I can upload a test-build here.
/Ton (PayPal.me)
-
- Normal user
- Posts: 14
- Joined: 02 Jan 2021, 16:44
Re: Pulse Counter not send state 0 to mqtt
Build: ESP_Easy_mega_20241222_normal_ESP8266_4M1M Dec 22 2024
always the latest
always the latest

Re: Pulse Counter not send state 0 to mqtt
Here's a testbuild that you can upgrade via Update Firmware on the Tools page:
/Ton (PayPal.me)
-
- Normal user
- Posts: 14
- Joined: 02 Jan 2021, 16:44
Re: Pulse Counter not send state 0 to mqtt
I have installed it, but it is still the same, only on reboot the state 0 was sent.
Re: Pulse Counter not send state 0 to mqtt
Hm, that's somewhat unexpected
Can you enable the "Ignore multiple Delta = 0" checkbox, save the page (Submit button), then uncheck that setting and save again? This could change the behavior.

Can you enable the "Ignore multiple Delta = 0" checkbox, save the page (Submit button), then uncheck that setting and save again? This could change the behavior.
/Ton (PayPal.me)
-
- Normal user
- Posts: 14
- Joined: 02 Jan 2021, 16:44
Re: Pulse Counter not send state 0 to mqtt
nothing changes, no 0s are sent.
:>
:>
Re: Pulse Counter not send state 0 to mqtt
Does that checkbox get saved properly? I.e. is it still checked after closing the page and re-entering the settings?
/Ton (PayPal.me)
Re: Pulse Counter not send state 0 to mqtt
Ah, now I see the issue.
Your "Liter_in_der_Minunte" value is showing "inf" (infinite), which is not numeric (invalid), and MQTT controllers don't send any data if one of the values is invalid (either "inf" or "NAN").
Your "Liter_in_der_Minunte" value is showing "inf" (infinite), which is not numeric (invalid), and MQTT controllers don't send any data if one of the values is invalid (either "inf" or "NAN").
/Ton (PayPal.me)
-
- Normal user
- Posts: 14
- Joined: 02 Jan 2021, 16:44
Re: Pulse Counter not send state 0 to mqtt
Oh yes, because I am calculating the flow rate, I have a formula in here [1/(%value%/1000)*60]
How can I solve this?
How can I solve this?
Re: Pulse Counter not send state 0 to mqtt
I've tried adding a compensation factor after the 0-division that seems to fix it, but I'm not sure if it might cause too much deviation:acidsubway wrote: ↑05 Jan 2025, 18:52 Oh yes, because I am calculating the flow rate, I have a formula in here [1/(%value%/1000)*60]
How can I solve this?
Code: Select all
1/((%value%/1000)+100000)*60
/Ton (PayPal.me)
-
- Normal user
- Posts: 14
- Joined: 02 Jan 2021, 16:44
Re: Pulse Counter not send state 0 to mqtt
the formula doesn't work for me, it always says zero, but you were right, if i take it out it sends the zero
Too bad it doesn't just send zero at zero time, no matter what formula is there

Re: Pulse Counter not send state 0 to mqtt
Well you are trying to do a 1/0 operation.
This is undefined.
This is undefined.
Who is online
Users browsing this forum: No registered users and 11 guests