<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[💬 Water Meter Pulse Sensor]]></title><description><![CDATA[<p dir="auto">This thread contains comments for the article "<a href="https://www.mysensors.org/build/pulse_water" rel="nofollow ugc">Water Meter Pulse Sensor</a>" posted on <a href="https://www.mysensors.org/build/pulse_water" rel="nofollow ugc">MySensors.org</a>.</p>
]]></description><link>https://forum.mysensors.org/topic/4820/water-meter-pulse-sensor</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 17:45:51 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/4820.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 Sep 2016 21:20:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Sat, 04 Feb 2023 20:02:10 GMT]]></title><description><![CDATA[<p dir="auto">I finally got this to work. Unlike what the description here says, this is how to update the value:<br />
In Home Assistant, go to Developer-&gt;Service-&gt;YAML mode:</p>
<pre><code>service: text.set_value
data:
  value: "967067"
target:
  entity_id: text.water_meter_100_2
</code></pre>
<p dir="auto">(change 967067 with the value you want to add to the current counter)</p>
<p dir="auto">The service "notify.mysensors" seems to be deprecated by Home Assistant.</p>
]]></description><link>https://forum.mysensors.org/post/113472</link><guid isPermaLink="true">https://forum.mysensors.org/post/113472</guid><dc:creator><![CDATA[StephanXL]]></dc:creator><pubDate>Sat, 04 Feb 2023 20:02:10 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Sat, 04 Feb 2023 14:43:04 GMT]]></title><description><![CDATA[<p dir="auto">I really like the update you did for Home Assistant integration.</p>
<p dir="auto">But: I do not really understand, how to correctly send the VALUE_TO_ADD.</p>
<p dir="auto">This is what I tried to add 967.067 m³:</p>
<pre><code>service: notify.mysensors
data:
  message: VALUE_TO_ADD
  target: text.water_meter_100_2
  data: 967067
</code></pre>
<p dir="auto">But I just get this error message:</p>
<pre><code>Fehler beim Aufrufen des Diensts notify.mysensors. expected dict for dictionary value @ data['data']. Got None
</code></pre>
<p dir="auto">These are my newly found entities:<br />
<img src="/assets/uploads/files/1675521772055-4a37f961-0218-41b2-9a4d-c368e42e9e2d-image.png" alt="4a37f961-0218-41b2-9a4d-c368e42e9e2d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">What is wrong here?</p>
]]></description><link>https://forum.mysensors.org/post/113471</link><guid isPermaLink="true">https://forum.mysensors.org/post/113471</guid><dc:creator><![CDATA[StephanXL]]></dc:creator><pubDate>Sat, 04 Feb 2023 14:43:04 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Wed, 18 Jan 2023 16:07:03 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the feedback</p>
<p dir="auto">For those who think MySensors is finished, the proof is in the pudding, thousands of systems are functional  :earth_asia:</p>
]]></description><link>https://forum.mysensors.org/post/113440</link><guid isPermaLink="true">https://forum.mysensors.org/post/113440</guid><dc:creator><![CDATA[JeeLet]]></dc:creator><pubDate>Wed, 18 Jan 2023 16:07:03 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Wed, 18 Jan 2023 15:45:02 GMT]]></title><description><![CDATA[<p dir="auto">I made some improvements on this sketch. Please review them here: <a href="https://github.com/mysensors/MySensors/pull/1540" rel="nofollow ugc">https://github.com/mysensors/MySensors/pull/1540</a></p>
<p dir="auto">with these changes you will have:<br />
1 - factory reset<br />
2 - automatic home assistant entities creation<br />
3 - counter correction from home assistant using service notify.mysensors<br />
4 - fixed counter automatically incremented by 1 at each device restart (due to arduino library interrupt bug)<br />
5- other tiny improvements</p>
]]></description><link>https://forum.mysensors.org/post/113438</link><guid isPermaLink="true">https://forum.mysensors.org/post/113438</guid><dc:creator><![CDATA[Paolo Rendano]]></dc:creator><pubDate>Wed, 18 Jan 2023 15:45:02 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Tue, 23 Aug 2022 11:25:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bart59" aria-label="Profile: bart59">@<bdi>bart59</bdi></a> Can you post full circuit diagram for the modified code you made?</p>
]]></description><link>https://forum.mysensors.org/post/112906</link><guid isPermaLink="true">https://forum.mysensors.org/post/112906</guid><dc:creator><![CDATA[Emmanuel Abraham]]></dc:creator><pubDate>Tue, 23 Aug 2022 11:25:23 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Wed, 28 Oct 2020 23:56:31 GMT]]></title><description><![CDATA[<p dir="auto">I am finally getting around to trying this out.  I was playing with just trying to see if i can get the pulses.  First thing i did was take an old compass and put it beside the meter and had someone turn on the water.  I could definitely see the compass needle pull a little as the water was flowing.  So I assumed that pull was enough to be detectable with my hall effect sensor.  I have tried a couple, and just can't seem to get it to pick up.</p>
<p dir="auto">If i use a magnet, simple code will detect the pulse and the green led on the sensor lights up.</p>
<p dir="auto">But no matter where I put that sensor near the meter it just doesn't seem to detect it.   Not quite sure what's happening.</p>
<p dir="auto">The meter i have is this one.<br />
<a href="https://www.badgermeter.com/resources/add29b88-1ffb-49c9-80ab-bb8697bd6d1a/absolute%20digital%20encoder%20product%20data%20sheet%20ade-ds-00183-en.pdf/" rel="nofollow ugc">https://www.badgermeter.com/resources/add29b88-1ffb-49c9-80ab-bb8697bd6d1a/absolute digital encoder product data sheet ade-ds-00183-en.pdf/</a></p>
<p dir="auto">Not sure if anyone has any recommendation on which hall effect sensor would be the best for this but ill take suggestions lol</p>
<p dir="auto">My sensor I am testing with is<br />
3144E Hall Effect Sensor</p>
<p dir="auto">Doesn't have a sensitivity dial but the recommended one on this build page didn't either.</p>
]]></description><link>https://forum.mysensors.org/post/107923</link><guid isPermaLink="true">https://forum.mysensors.org/post/107923</guid><dc:creator><![CDATA[CrankyCoder]]></dc:creator><pubDate>Wed, 28 Oct 2020 23:56:31 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Tue, 19 May 2020 08:04:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ibibiuooui" aria-label="Profile: ibibiuooui">@<bdi>ibibiuooui</bdi></a> said in <a href="/post/105664">💬 Water Meter Pulse Sensor</a>:</p>
<blockquote>
<p dir="auto">!TSM:INIT:TSP FAIL</p>
</blockquote>
<p dir="auto">See <a href="https://www.mysensors.org/build/parser:" rel="nofollow ugc">https://www.mysensors.org/build/parser:</a> There's a problem in the initialisation of your transceiver (whatever it may be). So first check wiring, see <a href="https://forum.mysensors.org/topic/666/read-this-first-it-could-save-you-a-lot-of-time">https://forum.mysensors.org/topic/666/read-this-first-it-could-save-you-a-lot-of-time</a> for further details. If that doesn't help, imo you should open up a seperate thread.</p>
]]></description><link>https://forum.mysensors.org/post/105665</link><guid isPermaLink="true">https://forum.mysensors.org/post/105665</guid><dc:creator><![CDATA[rejoe2]]></dc:creator><pubDate>Tue, 19 May 2020 08:04:20 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Tue, 19 May 2020 07:05:42 GMT]]></title><description><![CDATA[<p dir="auto">I'm just getting this....</p>
<p dir="auto">16:57:15.660 -&gt; 10091 TSM:FAIL:RE-INIT<br />
16:57:15.660 -&gt; 10093 TSM:INIT<br />
16:57:15.660 -&gt; 10101 !TSM:INIT:TSP FAIL<br />
16:57:15.660 -&gt; 10103 TSM:FAIL:CNT=2<br />
16:57:15.660 -&gt; 10107 TSM:FAIL:DIS<br />
16:57:15.713 -&gt; 10111 TSF:TDI:TSL</p>
]]></description><link>https://forum.mysensors.org/post/105664</link><guid isPermaLink="true">https://forum.mysensors.org/post/105664</guid><dc:creator><![CDATA[ibibiuooui]]></dc:creator><pubDate>Tue, 19 May 2020 07:05:42 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Mon, 20 Jan 2020 07:29:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stevefury" aria-label="Profile: stevefury">@<bdi>stevefury</bdi></a> sorry, I don't understand. Which modifications are you referring to?</p>
]]></description><link>https://forum.mysensors.org/post/103332</link><guid isPermaLink="true">https://forum.mysensors.org/post/103332</guid><dc:creator><![CDATA[mfalkvidd]]></dc:creator><pubDate>Mon, 20 Jan 2020 07:29:14 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Mon, 20 Jan 2020 00:37:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mfalkvidd" aria-label="Profile: mfalkvidd">@<bdi>mfalkvidd</bdi></a> how looks the sensor now with the modifications? and how to wire this?</p>
]]></description><link>https://forum.mysensors.org/post/103328</link><guid isPermaLink="true">https://forum.mysensors.org/post/103328</guid><dc:creator><![CDATA[stevefury]]></dc:creator><pubDate>Mon, 20 Jan 2020 00:37:17 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Tue, 09 Jul 2019 13:30:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bereska" aria-label="Profile: bereska">@<bdi>bereska</bdi></a> said in <a href="/post/100338">💬 Water Meter Pulse Sensor</a>:</p>
<blockquote>
<p dir="auto">32319 TSF:MSG:SEND,6-6-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:</p>
</blockquote>
<p dir="auto"><a href="https://www.mysensors.org/build/parser" rel="nofollow ugc">Logparser</a> states: there was nothing counted (empty payload). So make sure, there really was counted anything.<br />
(I didn't check your sketch, just assuming, it's the default one and everything is wired correctly; if that's the case, you should be able to see a different payload than nothing or "0", that your controller might treat as non existent).</p>
]]></description><link>https://forum.mysensors.org/post/100339</link><guid isPermaLink="true">https://forum.mysensors.org/post/100339</guid><dc:creator><![CDATA[rejoe2]]></dc:creator><pubDate>Tue, 09 Jul 2019 13:30:41 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Tue, 09 Jul 2019 07:32:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rejoe2" aria-label="Profile: rejoe2">@<bdi>rejoe2</bdi></a> i did like you said, still no show in HA<br />
here is the serial log:</p>
<pre><code> __  __       ____
|  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
| |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
| |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
|_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
        |___/                      2.3.0

16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
26 TSM:INIT
28 TSF:WUR:MS=0
34 !TSM:INIT:TSP FAIL
36 TSM:FAIL:CNT=1
38 TSM:FAIL:DIS
40 TSF:TDI:TSL
 
 __  __       ____
|  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
| |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
| |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
|_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
        |___/                      2.3.0

16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
26 TSM:INIT
28 TSF:WUR:MS=0
34 TSM:INIT:TSP OK
36 TSM:INIT:STATID=6
38 TSF:SID:OK,ID=6
40 TSM:FPAR
77 TSF:MSG:SEND,6-6-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
532 TSF:MSG:READ,0-0-6,s=255,c=3,t=8,pt=1,l=1,sg=0:0
538 TSF:MSG:FPAR OK,ID=0,D=1
624 TSF:MSG:READ,31-31-6,s=255,c=3,t=8,pt=1,l=1,sg=0:1
1267 TSF:MSG:READ,21-21-6,s=255,c=3,t=8,pt=1,l=1,sg=0:1
1546 TSF:MSG:READ,41-41-6,s=255,c=3,t=8,pt=1,l=1,sg=0:1
2088 TSM:FPAR:OK
2088 TSM:ID
2091 TSM:ID:OK
2093 TSM:UPL
2097 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
2103 TSF:MSG:READ,0-0-6,s=255,c=3,t=25,pt=1,l=1,sg=0:1
2109 TSF:MSG:PONG RECV,HP=1
2113 TSM:UPL:OK
2115 TSM:READY:ID=6,PAR=0,DIS=1
2119 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
2127 TSF:MSG:READ,0-0-6,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
2138 TSF:MSG:SEND,6-6-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.0
2148 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
2242 TSF:MSG:READ,0-0-6,s=255,c=3,t=6,pt=0,l=1,sg=0:M
2250 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=11,pt=0,l=11,sg=0,ft=0,st=OK:Water Meter
2260 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.1
2273 TSF:MSG:SEND,6-6-0-0,s=1,c=0,t=21,pt=0,l=0,sg=0,ft=0,st=OK:
2281 MCO:REG:REQ
2289 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
2297 TSF:MSG:READ,0-0-6,s=255,c=3,t=27,pt=1,l=1,sg=0:1
2304 MCO:PIM:NODE REG=1
2306 MCO:BGN:STP
2310 TSF:MSG:SEND,6-6-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
2318 MCO:BGN:INIT OK,TSP=1
32319 TSF:MSG:SEND,6-6-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
</code></pre>
]]></description><link>https://forum.mysensors.org/post/100338</link><guid isPermaLink="true">https://forum.mysensors.org/post/100338</guid><dc:creator><![CDATA[bereska]]></dc:creator><pubDate>Tue, 09 Jul 2019 07:32:52 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Tue, 09 Jul 2019 06:57:25 GMT]]></title><description><![CDATA[<p dir="auto">...just let the node count some pulses (your code states: FALLING). So just pull the counter PIN (here: D3) to ground several times.</p>
]]></description><link>https://forum.mysensors.org/post/100336</link><guid isPermaLink="true">https://forum.mysensors.org/post/100336</guid><dc:creator><![CDATA[rejoe2]]></dc:creator><pubDate>Tue, 09 Jul 2019 06:57:25 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Tue, 09 Jul 2019 06:30:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rejoe2" aria-label="Profile: rejoe2">@<bdi>rejoe2</bdi></a> thank you. How do i trigger "the counter on Node side"?</p>
]]></description><link>https://forum.mysensors.org/post/100335</link><guid isPermaLink="true">https://forum.mysensors.org/post/100335</guid><dc:creator><![CDATA[bereska]]></dc:creator><pubDate>Tue, 09 Jul 2019 06:30:38 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Tue, 09 Jul 2019 05:46:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bereska" aria-label="Profile: bereska">@<bdi>bereska</bdi></a> said in <a href="/post/100332">💬 Water Meter Pulse Sensor</a>:</p>
<blockquote>
<p dir="auto">Is it possible to get any help on this page or not?</p>
</blockquote>
<p dir="auto">Crying out loud most likely will not help...<br />
Seems your setup is a little special, so just some assumptions from one using a serial GW and not MyS-MQTT:<br />
Your controller is asked for sending an initial value, but has none yet. So no answer is sent out. Triggering the counter on Node side could help to send one (after waiting time has passed). Then have a look at your controller, if there's a value available. If, you might set the correct value, restart your node afterwards and see, if everything now works as expected?</p>
]]></description><link>https://forum.mysensors.org/post/100334</link><guid isPermaLink="true">https://forum.mysensors.org/post/100334</guid><dc:creator><![CDATA[rejoe2]]></dc:creator><pubDate>Tue, 09 Jul 2019 05:46:22 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Mon, 08 Jul 2019 21:26:57 GMT]]></title><description><![CDATA[<p dir="auto">Is it possible to get any help on this page or not?</p>
]]></description><link>https://forum.mysensors.org/post/100332</link><guid isPermaLink="true">https://forum.mysensors.org/post/100332</guid><dc:creator><![CDATA[bereska]]></dc:creator><pubDate>Mon, 08 Jul 2019 21:26:57 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Fri, 05 Jul 2019 12:44:53 GMT]]></title><description><![CDATA[<p dir="auto">looks like the problem is the node is NOT sending initial value to gw<br />
need your help modifying the sketch accordingly<br />
thank you</p>
]]></description><link>https://forum.mysensors.org/post/100275</link><guid isPermaLink="true">https://forum.mysensors.org/post/100275</guid><dc:creator><![CDATA[bereska]]></dc:creator><pubDate>Fri, 05 Jul 2019 12:44:53 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Thu, 04 Jul 2019 22:19:21 GMT]]></title><description><![CDATA[<p dir="auto">here is the sketch:</p>
<pre><code>// Enable debug prints to serial monitor
#define MY_DEBUG

// Enable and select radio type attached
#define MY_RADIO_RF24
#define MY_NODE_ID 6
//#define MY_RADIO_NRF5_ESB
//#define MY_RADIO_RFM69
//#define MY_RADIO_RFM95

#include &lt;MySensors.h&gt;

#define DIGITAL_INPUT_SENSOR 3                  // The digital input you attached your sensor.  (Only 2 and 3 generates interrupt!)

#define PULSE_FACTOR 1000                       // Number of blinks per m3 of your meter (One rotation/liter)

#define SLEEP_MODE false                        // flowvalue can only be reported when sleep mode is false.

#define MAX_FLOW 40                             // Max flow (l/min) value to report. This filters outliers.

#define CHILD_ID 1                              // Id of the sensor child

uint32_t SEND_FREQUENCY =
    30000;           // Minimum time between send (in milliseconds). We don't want to spam the gateway.

MyMessage flowMsg(CHILD_ID,V_FLOW);
MyMessage volumeMsg(CHILD_ID,V_VOLUME);
MyMessage lastCounterMsg(CHILD_ID,V_VAR1);

double ppl = ((double)PULSE_FACTOR)/1000;        // Pulses per liter

volatile uint32_t pulseCount = 0;
volatile uint32_t lastBlink = 0;
volatile double flow = 0;
bool pcReceived = false;
uint32_t oldPulseCount = 0;
uint32_t newBlink = 0;
double oldflow = 0;
double volume =0;
double oldvolume =0;
uint32_t lastSend =0;
uint32_t lastPulse =0;

void setup()
{
  // initialize our digital pins internal pullup resistor so one pulse switches from high to low (less distortion)
  pinMode(DIGITAL_INPUT_SENSOR, INPUT_PULLUP);

  pulseCount = oldPulseCount = 0;

  // Fetch last known pulse count value from gw
  request(CHILD_ID, V_VAR1);

  lastSend = lastPulse = millis();

  attachInterrupt(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), onPulse, FALLING);
}

void presentation()
{
  // Send the sketch version information to the gateway and Controller
  sendSketchInfo("Water Meter", "1.1");

  // Register this device as Water flow sensor
  present(CHILD_ID, S_WATER);
}

void loop()
{
  uint32_t currentTime = millis();

  // Only send values at a maximum frequency or woken up from sleep
  if (SLEEP_MODE || (currentTime - lastSend &gt; SEND_FREQUENCY)) {
    lastSend=currentTime;

    if (!pcReceived) {
      //Last Pulsecount not yet received from controller, request it again
      request(CHILD_ID, V_VAR1);
      return;
    }

    if (!SLEEP_MODE &amp;&amp; flow != oldflow) {
      oldflow = flow;

      Serial.print("l/min:");
      Serial.println(flow);

      // Check that we don't get unreasonable large flow value.
      // could happen when long wraps or false interrupt triggered
      if (flow&lt;((uint32_t)MAX_FLOW)) {
        send(flowMsg.set(flow, 2));                   // Send flow value to gw
      }
    }

    // No Pulse count received in 2min
    if(currentTime - lastPulse &gt; 120000) {
      flow = 0;
    }

    // Pulse count has changed
    if ((pulseCount != oldPulseCount)||(!SLEEP_MODE)) {
      oldPulseCount = pulseCount;

      Serial.print("pulsecount:");
      Serial.println(pulseCount);

      send(lastCounterMsg.set(pulseCount));                  // Send  pulsecount value to gw in VAR1

      double volume = ((double)pulseCount/((double)PULSE_FACTOR));
      if ((volume != oldvolume)||(!SLEEP_MODE)) {
        oldvolume = volume;

        Serial.print("volume:");
        Serial.println(volume, 3);

        send(volumeMsg.set(volume, 3));               // Send volume value to gw
      }
    }
  }
  if (SLEEP_MODE) {
    sleep(SEND_FREQUENCY);
  }
}

void receive(const MyMessage &amp;message)
{
  if (message.type==V_VAR1) {
    uint32_t gwPulseCount=message.getULong();
    pulseCount += gwPulseCount;
    flow=oldflow=0;
    Serial.print("Received last pulse count from gw:");
    Serial.println(pulseCount);
    pcReceived = true;
  }
}

void onPulse()
{
  if (!SLEEP_MODE) {
    uint32_t newBlink = micros();
    uint32_t interval = newBlink-lastBlink;

    if (interval!=0) {
      lastPulse = millis();
      if (interval&lt;500000L) {
        // Sometimes we get interrupt on RISING,  500000 = 0.5 second debounce ( max 120 l/min)
        return;
      }
      flow = (60000000.0 /interval) / ppl;
    }
    lastBlink = newBlink;
  }
  pulseCount++;
}```</code></pre>
]]></description><link>https://forum.mysensors.org/post/100267</link><guid isPermaLink="true">https://forum.mysensors.org/post/100267</guid><dc:creator><![CDATA[bereska]]></dc:creator><pubDate>Thu, 04 Jul 2019 22:19:21 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Thu, 04 Jul 2019 22:17:18 GMT]]></title><description><![CDATA[<p dir="auto">this is HA log:</p>
<p dir="auto">2019-07-04 23:24:05 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on mygateway1-out/6/255/3/0/11: b'Water Meter',<br />
2019-07-04 23:24:05 DEBUG (MainThread) [mysensors.gateway_mqtt] Receiving 6;255;3;0;11;Water Meter,<br />
2019-07-04 23:24:23 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on mygateway1-out/6/255/3/0/11: b'Water Meter',<br />
2019-07-04 23:24:23 DEBUG (MainThread) [mysensors.gateway_mqtt] Receiving 6;255;3;0;11;Water Meter</p>
]]></description><link>https://forum.mysensors.org/post/100266</link><guid isPermaLink="true">https://forum.mysensors.org/post/100266</guid><dc:creator><![CDATA[bereska]]></dc:creator><pubDate>Thu, 04 Jul 2019 22:17:18 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Thu, 04 Jul 2019 09:28:54 GMT]]></title><description><![CDATA[<p dir="auto">Water Meter shows up in mysensors.json and homeassistant logs but fails to appear in Homeassistant GUI.<br />
I have a dozen Nodes already successfully operating<br />
I used the default sketch on this page. Just added Node 6<br />
Looks like values are not getting through<br />
Thank you for your help</p>
]]></description><link>https://forum.mysensors.org/post/100251</link><guid isPermaLink="true">https://forum.mysensors.org/post/100251</guid><dc:creator><![CDATA[bereska]]></dc:creator><pubDate>Thu, 04 Jul 2019 09:28:54 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Sat, 15 Jun 2019 12:45:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/flopp" aria-label="Profile: flopp">@<bdi>flopp</bdi></a> which box did you buy for m-bus readings? did you work it out?<br />
''I was so lucky that my water company change the meter to a meter with wireless m-bus.<br />
So I bought a box for this and now I have 100% correct readings.''</p>
]]></description><link>https://forum.mysensors.org/post/99884</link><guid isPermaLink="true">https://forum.mysensors.org/post/99884</guid><dc:creator><![CDATA[Alehandro06]]></dc:creator><pubDate>Sat, 15 Jun 2019 12:45:05 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Wed, 13 Feb 2019 11:54:57 GMT]]></title><description><![CDATA[<p dir="auto">Don't you have another sensor to try?</p>
]]></description><link>https://forum.mysensors.org/post/97331</link><guid isPermaLink="true">https://forum.mysensors.org/post/97331</guid><dc:creator><![CDATA[gohan]]></dc:creator><pubDate>Wed, 13 Feb 2019 11:54:57 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Thu, 07 Feb 2019 11:18:04 GMT]]></title><description><![CDATA[<p dir="auto">Sorry to hijack the thread a bit,<br />
I'm using a TCRT5000 sensor to read a water meter (Zenner), it works ok until it stops detecting pulses, I have to increase the sensitivity (clockwise turn the trimpot) and it works ok for another few days/weeks, then again it needs an increase in sensitivity, like somehow it's loosing it's sensitivity .<br />
I'm already with my second sensor, the first one got to the end of the trimpot and couldn't adjust anymore.</p>
<p dir="auto">Has this happened to anyone else? It's powered by 5V, it's the LED losing power or the photosensor losing sensitivity? Any ideas?<br />
Thanks.</p>
]]></description><link>https://forum.mysensors.org/post/97187</link><guid isPermaLink="true">https://forum.mysensors.org/post/97187</guid><dc:creator><![CDATA[executivul]]></dc:creator><pubDate>Thu, 07 Feb 2019 11:18:04 GMT</pubDate></item><item><title><![CDATA[Reply to 💬 Water Meter Pulse Sensor on Mon, 14 Jan 2019 10:47:11 GMT]]></title><description><![CDATA[<p dir="auto">it looks like it is can't find the radio module. Check cables and pins numering</p>
]]></description><link>https://forum.mysensors.org/post/96548</link><guid isPermaLink="true">https://forum.mysensors.org/post/96548</guid><dc:creator><![CDATA[gohan]]></dc:creator><pubDate>Mon, 14 Jan 2019 10:47:11 GMT</pubDate></item></channel></rss>