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.7k 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.
  • E Offline
    E 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
    • H Offline
      H 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
      • E Offline
        E 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
        • E Offline
          E 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

          H 1 Reply Last reply
          0
          • E 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....

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

            @epierre

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

            Y 1 Reply Last reply
            0
            • H hek

              @epierre

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

              Y Offline
              Y 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

              H 1 Reply Last reply
              0
              • Y Yveaux

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

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

                @Yveaux

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

                Y 1 Reply Last reply
                0
                • H hek

                  @Yveaux

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

                  Y Offline
                  Y 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

                  H 1 Reply Last reply
                  0
                  • Y Yveaux

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

                    H Offline
                    H 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?

                    Y 1 Reply Last reply
                    0
                    • H 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?

                      Y Offline
                      Y 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
                      • E Offline
                        E 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

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        12

                        Online

                        12.0k

                        Users

                        11.2k

                        Topics

                        113.4k

                        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