Page 1 of 1

Counter is sending false values

Posted: 01 Sep 2017, 20:06
by 22hn
Have a Wemos D1 mini input connected to district heating power meter's S0 output (with pull-up resistor).

The counter is somtimes sending values to Domoticz even when no pulse was generated by meter.

I did set up a switch input on the same gpio input that triggers a LED blink on pulse, so I can see when a pulse is coming from the meter.

I'm also logging to syslog. Here's a filtered view from log:

Sep 1 11:39:00 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:40:01 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:41:01 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:42:02 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:43:02 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:44:03 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:45:03 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:46:04 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:46:46 csesp01 ESP Unit: 1 : EVENT: P1#Switch=0.00
Sep 1 11:47:05 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=1000.00
Sep 1 11:48:05 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=1000.00

Sep 1 11:49:06 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:50:06 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:51:07 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=1000.00
Sep 1 11:52:08 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:53:08 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:54:09 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:55:09 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:56:10 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:57:10 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:58:11 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:59:11 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:00:12 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:01:12 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:02:13 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:03:14 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:04:14 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:05:15 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:06:15 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:07:16 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:08:16 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:09:17 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:10:17 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:11:18 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:12:19 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:13:19 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=2000.00
Sep 1 12:14:20 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:15:20 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:16:21 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:17:21 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00

The P1#Switch is the switch input that triggers my LED and Fjarrvarme P1#Effekt is the counter with formula %value%*1000. (I only get 1 pulse per kWh!)

As you can see I only received one pulse during this time, but the counter seems to have registered 5 pulses!

Re: Counter is sending false values

Posted: 04 Sep 2017, 21:15
by toffel969
22hn wrote: 01 Sep 2017, 20:06 Have a Wemos D1 mini input connected to district heating power meter's S0 output (with pull-up resistor).

The counter is somtimes sending values to Domoticz even when no pulse was generated by meter.

I did set up a switch input on the same gpio input that triggers a LED blink on pulse, so I can see when a pulse is coming from the meter.

I'm also logging to syslog. Here's a filtered view from log:

Sep 1 11:39:00 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:40:01 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:41:01 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:42:02 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:43:02 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:44:03 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:45:03 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:46:04 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:46:46 csesp01 ESP Unit: 1 : EVENT: P1#Switch=0.00
Sep 1 11:47:05 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=1000.00
Sep 1 11:48:05 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=1000.00

Sep 1 11:49:06 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:50:06 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:51:07 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=1000.00
Sep 1 11:52:08 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:53:08 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:54:09 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:55:09 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:56:10 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:57:10 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:58:11 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 11:59:11 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:00:12 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:01:12 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:02:13 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:03:14 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:04:14 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:05:15 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:06:15 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:07:16 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:08:16 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:09:17 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:10:17 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:11:18 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:12:19 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:13:19 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=2000.00
Sep 1 12:14:20 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:15:20 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:16:21 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00
Sep 1 12:17:21 csesp01 ESP Unit: 1 : EVENT: Fjarrvarme P1#Effekt=0.00

The P1#Switch is the switch input that triggers my LED and Fjarrvarme P1#Effekt is the counter with formula %value%*1000. (I only get 1 pulse per kWh!)

As you can see I only received one pulse during this time, but the counter seems to have registered 5 pulses!
What's your debouncing time? Should be quite long as you get pulses slowly

Re: Counter is sending false values

Posted: 05 Sep 2017, 00:03
by 22hn
Have tried both long and short debouncing time, makes no difference...

Besides, isn't that for preventing multiple counts on a not so distinctive pulse?

In my case it seems to be increase the counter without an incoming pulse...