π¬ Power Meter Pulse Sensor
-
BTW, is there a way to have the pulse meter running on gateway? I got stuck because at startup it asks the controller the last count value and since the controller is not yet connected it just doesn't work.
@gohan How about
#define MY_TRANSPORT_WAIT_READY_MS 2000This will start up your code so you won't miss any pulses until controller is ready.
You may ask for the last known Value in presentation(), then it will be fetched as soon as the controller is really there after startup. This could/should be combined with a bool pcReceived, so you may decide to either add the value received from controller to the counts the node meassured in between or just use the received value (starting from second time value is received from controller). -
I think I found a problem: the WATT calculation is returning values over 172000 watts and since I put 10000 as the max value, it was not sending anything. I double checked my energy meter and indeed it is 1000 pulses per KWH and this is what I set in sketch
-
Here is the log I get from node
7230 TSF:MSG:READ,0-0-250,s=1,c=2,t=24,pt=0,l=7,sg=0:1682675 rece Received last pulse count from gw:1682675 11817 TSF:MSG:SEND,250-250-0-0,s=1,c=1,t=17,pt=5,l=4,sg=0,ft=0,st=OK:528 Watt:528 Watt:197065 21820 TSF:MSG:SEND,250-250-0-0,s=1,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=OK:1682677 21913 TSF:MSG:SEND,250-250-0-0,s=1,c=1,t=18,pt=7,l=5,sg=0,ft=0,st=OK:1682.6770 Watt:196807 36824 TSF:MSG:SEND,250-250-0-0,s=1,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=OK:1682679 36917 TSF:MSG:SEND,250-250-0-0,s=1,c=1,t=18,pt=7,l=5,sg=0,ft=0,st=OK:1682.6790 Watt:197368 51827 TSF:MSG:SEND,250-250-0-0,s=1,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=OK:1682681 51920 TSF:MSG:SEND,250-250-0-0,s=1,c=1,t=18,pt=7,l=5,sg=0,ft=0,st=OK:1682.6810 Watt:196850Am I the only one using this sketch?
-
Please post you sketch.
-
How is the pulse counter set up? Is it connected to the S0 port?
Edit:
If you are using S0 it is vital that you use a pull down resistor, if you dontβt have that you get false pulses.

-
I'm using the lm393 light detector. Domoticz is able to do a calculation from the pulses to give a Watt value and it is correct but it does it every 5 minutes and it is too slow for me
@gohan - is Domoticz updating anything (except switches) faster than 5 min? I dont think so...
-
Just changed from 1-wire counter to MySensors for logging my power consumption. Using the same LED detector as I did when using 1-wire. Also changed watt limit to 20 000 (my heat pump likes to use 9-10kW sometimes). The wires from the old 1-wire net now provide power for the new MySensors-sensor. I have 10 000 led blinks per kWh. Had som crazy counter values with 1-wire that totally messed up the graphs and haven't seen anything like that with this sketch. Let's hope it stays that way. ;) Dumping data to Domoticz. This sensor gives me higher resolution as a bonus. The 1-wire counter was read every minute, this every 20-sec. ;-)


My old 1-wire counter with one crazy value messing upp all the graphs:

I know that you can hold shift and click the value that is crazy to make the graphs show up good but you loose the data for the full day. That's not good. ;-)Hi Niklas,
I know this is a very old post, but its worth a try. How did you get out the daily Kwh usage? As default my sensor only gives Watts and Kwh (accumulated from start), I have tried to run a Scene in Vera UI7 where there are a function in the sensor called resetKWh(), but it looks like it doesn't do anything. Any tips would be great, thanks.
Henning
-
@gohan - is Domoticz updating anything (except switches) faster than 5 min? I dont think so...