Pulse water meter

  • I'm having trouble with the pulse water meter values in domoticz.

    A newly added sensor starts with value 0.803m3 and not 0

    If I enter a new value with json URL ,;27736

    the value gets overwritten with the 0.803m3 every time. In the sketch the comments say it gets the latest pulse count from gateway when it powers up?

    But the value 0.803m3 is not the value of my water meter when the node powers up. Where does the 0.803 come from?

  • Hi koen,

    It sounds like your sketch and domoticz are communicating with each other, somehow domoticz has stored 803 pulses for this sensor and sends it back as last known value.

    I think there is an error in the update sequence.
    Try this:

    1. Power down the sensor
    2. Update the device value
    3. Power up sensor and observe received value from domoticz.

    If there is no change try the above sequence again using different url because it looks wrong to me.

    Json url for counters does not use nvalue and svalue is a single value (in liters for watermeters)

    Hope this helps.


  • Hero Member

    Hello here,

    both ends store a value, if it is not returned from the DZ, then the node use its own.

    make sure your sensor is powered down a bit of time, sometimes the transformer stores store energy.

    so bad the value is not stored as a custom that is user modifiable in domoticz, maybe a feature request should be done on this.

  • i tried again the following:

    Schermafbeelding 2015-10-04 om 10.31.45.png

    then i changed the child ID in the sensor sketch, reuploaded, changed the value via son and got this:

    send: 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
    read: 0-0-1 s=255,c=3,t=6,pt=0,l=1,sg=0:M
    sensor started, id=1, parent=0, distance=1
    send: 1-1-0-0 s=255,c=3,t=11,pt=0,l=11,sg=0,st=ok:Water Meter
    send: 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.1
    send: 1-1-0-0 s=2,c=0,t=21,pt=0,l=0,sg=0,st=ok:
    send: 1-1-0-0 s=2,c=2,t=24,pt=0,l=0,sg=0,st=ok:
    read: 0-0-1 s=2,c=2,t=24,pt=0,l=1,sg=0:0
    Received last pulse count from gw:0
    send: 1-1-0-0 s=2,c=1,t=24,pt=5,l=4,sg=0,st=ok:0
    send: 1-1-0-0 s=2,c=1,t=35,pt=7,l=5,sg=0,st=ok:0.000
    send: 1-1-0-0 s=2,c=1,t=24,pt=5,l=4,sg=0,st=ok:2
    send: 1-1-0-0 s=2,c=1,t=35,pt=7,l=5,sg=0,st=ok:0.002
    send: 1-1-0-0 s=2,c=1,t=34,pt=7,l=5,sg=0,st=ok:12.09
    send: 1-1-0-0 s=2,c=1,t=24,pt=5,l=4,sg=0,st=ok:5
    send: 1-1-0-0 s=2,c=1,t=35,pt=7,l=5,sg=0,st=ok:0.005
    send: 1-1-0-0 s=2,c=1,t=24,pt=5,l=4,sg=0,st=ok:5
    send: 1-1-0-0 s=2,c=1,t=35,pt=7,l=5,sg=0,st=ok:0.005
    send: 1-1-0-0 s=2,c=1,t=24,pt=5,l=4,sg=0,st=ok:5
    send: 1-1-0-0 s=2,c=1,t=35,pt=7,l=5,sg=0,st=ok:0.005

    Schermafbeelding 2015-10-04 om 11.47.20.png

    It keeps getting stranger to me. I deleted the mysensors hardware and all devices. Added the hardware again and the water sensor received a value of 269 pulses from the gateway?

  • Hardware Contributor


    I have tried this back and forth for the last weeks, its the counter and V_VAR1 that does not behave as it should (or atleast not as Vera). I have not yet tried to update the a beta version but they say on domoticz forum this can help.

    I will post my findings and workaround in a couple of days i hope.
    What you can do is calculate the value in the "multiply" textbox you find in the edit page. (So 1 pulse is correct with what you wants i to be).

    The sensor starts with a value because thats the only way to add it to Domoticz (Only switches get added on presentation - all other on the first value).

    The value 0.8 i dont know, but i recieve 0.7 for every pulse i send using the V_RAIN (yes - im trying the rain-bucket scetch - but its the same way it works).

    Domoticz seems to calculate the values/pulses from that day - so if you change that day (without changing in the db) it will get strange values... For example if you set a smaller counter during that day, it will get negative liters/mm that day, but start counting at that value the next day.
    Also in the beta they have fixed a bug with the diagrams.

    Its really strange all this... but I hope to have found out something in a couple of days.

  • I ultimately resolved it by editing the sketch setup() to send the true meter value to the gateway before it gets requested and sent again by the loop().
    I did this once, removed the send and uploaded the sketch again.

    But now I can check between the mysensors and the real meter I see that the data is off...must investigate further what is going on. In my test setup the pulses get counted like they should. (I tested by moving my finger in front of the infrared led.) I suspect the mounting of the sensor on the meter is off somewhere and generates duplicates or erratic pulses?

  • Hardware Contributor

    If you have not - update to latest beta.
    I did so, and it seems like there is changes in how domoticz handle counters and all that... now my rain-meter starts to look good,

  • i'm running v2.3219 on my synology. i think this is a beta release?
    i think my strange values are due to trying to add the values by json, this results in adding it to the todays volume and not resetting the total count?

    furthermore the positioning of the tcrt5000 is critical in preventing false pulses and this is what is happening now with my meter i think... the small led light on the sensors blinks sometimes very weak when the wheel of the watermeter isn't even near the led....

Log in to reply

Suggested Topics

  • 2
  • 5
  • 4
  • 8
  • 4
  • 5
  • 3
  • 2