Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. node var request issue

node var request issue

Scheduled Pinned Locked Moved Troubleshooting
12 Posts 3 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • epierreE Offline
    epierreE Offline
    epierre
    Hero Member
    wrote on last edited by
    #1

    Hello,

    My water meter has several issues since going 1.4 :

    • transmission/reception issues

    • reception of a variable value

      With the same hardware/software in 1.3 it was perfectly functional, not it isn't... do you have an idea how to improve the node to request the var at a frequent pace till it gets the answer or is able to read the answer ?

    thanks,

    z-wave - Vera -> Domoticz
    rfx - Domoticz <- MyDomoAtHome <- Imperihome
    mysensors -> mysensors-gw -> Domoticz

    1 Reply Last reply
    0
    • epierreE Offline
      epierreE Offline
      epierre
      Hero Member
      wrote on last edited by epierre
      #2

      @hek here is what the console shows me:
      sensor started, id 2
      send: 2-2-0-0 s=255,c=0,t=17,pt=0,l=3,st=ok:1.4
      send: 2-2-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
      send: 2-2-0-0 s=255,c=3,t=11,pt=0,l=11,st=ok:Water Meter
      send: 2-2-0-0 s=255,c=3,t=12,pt=0,l=8,st=ok:1.0 reed
      send: 2-2-0-0 s=5,c=0,t=21,pt=0,l=3,st=ok:1.4
      send: 2-2-0-0 s=5,c=2,t=24,pt=0,l=3,st=ok:1.4
      read: 0-0-2 s=5,c=3,t=24,pt=0,l=5:50623

      I don't see the println from incomming message.

      Afterward the node keeps asking the VAR_1 value to the node although answers are given:

      send: 2-2-0-0 s=5,c=2,t=24,pt=0,l=5,st=ok:50623
      read: 0-0-2 s=5,c=3,t=24,pt=0,l=5:50623
      send: 2-2-0-0 s=5,c=2,t=24,pt=0,l=5,st=ok:50623
      read: 0-0-2 s=5,c=3,t=24,pt=0,l=5:50623
      send: 2-2-0-0 s=5,c=2,t=24,pt=0,l=5,st=ok:50623
      read: 0-0-2 s=5,c=3,t=24,pt=0,l=5:50623
      

      and so on ...

      I'm not so confident this piece of code works:

      void incomingMessage(const MyMessage &message) {
       if (message.type==V_VAR1) {  
      pulseCount = oldPulseCount = message.getLong();
      Serial.print("Received last pulse count from gw:");
      Serial.println(pulseCount);
      pcReceived = true;
       }   }
      

      z-wave - Vera -> Domoticz
      rfx - Domoticz <- MyDomoAtHome <- Imperihome
      mysensors -> mysensors-gw -> Domoticz

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #3

        @epierre
        Looks like you might have mixed up command-types in your gateway when responding to requests. Should be SET (c=1).

        Right now c=3 == INTERNAL

        1 Reply Last reply
        0
        • epierreE Offline
          epierreE Offline
          epierre
          Hero Member
          wrote on last edited by
          #4

          @hek argh... values having changed, it would have been good to have such low level exchanges a bit documented as before(at least explaining you answer a get by a set...)... now that part works,

          Next I have to investigate why it is not counting anymore... so bat we can't yet make OTA updates
          https://github.com/empierre/arduino/blob/master/WaterMeterPulseSensor2.ino

          z-wave - Vera -> Domoticz
          rfx - Domoticz <- MyDomoAtHome <- Imperihome
          mysensors -> mysensors-gw -> Domoticz

          1 Reply Last reply
          0
          • epierreE Offline
            epierreE Offline
            epierre
            Hero Member
            wrote on last edited by
            #5

            ok this is now fixed, I added a led pulse too.

            @hek could wwe provide both methods in the smae sketch to handle both visual pulse and reed ? the default one does not work for reed....

            z-wave - Vera -> Domoticz
            rfx - Domoticz <- MyDomoAtHome <- Imperihome
            mysensors -> mysensors-gw -> Domoticz

            hekH 1 Reply Last reply
            0
            • epierreE epierre

              ok this is now fixed, I added a led pulse too.

              @hek could wwe provide both methods in the smae sketch to handle both visual pulse and reed ? the default one does not work for reed....

              hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              @epierre

              Please go ahead and make the addition to support reed senors.

              YveauxY 1 Reply Last reply
              0
              • hekH hek

                @epierre

                Please go ahead and make the addition to support reed senors.

                YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by
                #7

                @hek What's different from a regular button when using a reed sensor? Both have to be debounced...

                http://yveaux.blogspot.nl

                hekH 1 Reply Last reply
                0
                • YveauxY Yveaux

                  @hek What's different from a regular button when using a reed sensor? Both have to be debounced...

                  hekH Offline
                  hekH Offline
                  hek
                  Admin
                  wrote on last edited by
                  #8

                  @Yveaux

                  I have no idea.... @epierre could perhaps give some insight?

                  YveauxY 1 Reply Last reply
                  0
                  • hekH hek

                    @Yveaux

                    I have no idea.... @epierre could perhaps give some insight?

                    YveauxY Offline
                    YveauxY Offline
                    Yveaux
                    Mod
                    wrote on last edited by Yveaux
                    #9

                    @epierre @hek This is what we're talking about, right?
                    download.jpg

                    http://yveaux.blogspot.nl

                    hekH 1 Reply Last reply
                    0
                    • YveauxY Yveaux

                      @epierre @hek This is what we're talking about, right?
                      download.jpg

                      hekH Offline
                      hekH Offline
                      hek
                      Admin
                      wrote on last edited by
                      #10

                      @Yveaux

                      I might have misinterpreted @epierre. But I would guess he means that type of reed switch @Yveaux .. But I cannot understand why that would make any difference from any other pulse sensor.. Maybe the pulses are longer?

                      YveauxY 1 Reply Last reply
                      0
                      • hekH hek

                        @Yveaux

                        I might have misinterpreted @epierre. But I would guess he means that type of reed switch @Yveaux .. But I cannot understand why that would make any difference from any other pulse sensor.. Maybe the pulses are longer?

                        YveauxY Offline
                        YveauxY Offline
                        Yveaux
                        Mod
                        wrote on last edited by
                        #11

                        @hek Maybe what I said -- it has to be debounced.
                        Let's wait for input from @epierre then ;-)

                        http://yveaux.blogspot.nl

                        1 Reply Last reply
                        0
                        • epierreE Offline
                          epierreE Offline
                          epierre
                          Hero Member
                          wrote on last edited by
                          #12

                          @Yveaux @hek in fact it has to be debounced for it vibrates on rising and falling so it is important to see. maybe the bling delay would do it simply but someoone may remove the led...

                          Also through trial and error here is the way to manage it:

                            // Setup the reed 
                            pinMode(DIGITAL_INPUT_SENSOR,INPUT);
                            // Activate internal pull-up
                            digitalWrite(DIGITAL_INPUT_SENSOR,HIGH);
                            attachInterrupt(INTERRUPT, onPulse, FALLING);
                          

                          you have to power the pin to get the signal when both sides are connected.

                          z-wave - Vera -> Domoticz
                          rfx - Domoticz <- MyDomoAtHome <- Imperihome
                          mysensors -> mysensors-gw -> Domoticz

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          22

                          Online

                          11.7k

                          Users

                          11.2k

                          Topics

                          113.1k

                          Posts


                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • MySensors
                          • OpenHardware.io
                          • Categories
                          • Recent
                          • Tags
                          • Popular