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. Presentation of 3rd sensor for a node fails....

Presentation of 3rd sensor for a node fails....

Scheduled Pinned Locked Moved Troubleshooting
10 Posts 7 Posters 2.2k Views 7 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.
  • C Offline
    C Offline
    chaeron
    wrote on last edited by
    #1

    Hi:

    I've got a remote sensor with 3 child sensors....temp, humidity and battery voltage.

    Gateway is a ESP6266 running the MQTT sketch.

    Both sensor and GW are running the latest 2.0.0 stable code base.

    When the sensor node powers up it registers fine....but only successfully sends the first two presentation requests. The 3rd request (for multimeter voltage) fails for some reason.

    If I put a 500 ms delay between the presentation of the 2nd and 3rd sensors, it succeeds.

    Any idea what might be causing this? Is the gateway just not responding fast enough to the first two requests?

    Here is the debug log from the sensor node startup, without delays, so the 3rd presentation fails. Interesting that the first registration request also fails.

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=104)
    TSM:FPAR
    TSP:MSG:SEND 104-104-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-104 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=104)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:MSG:READ 0-0-104 s=255,c=3,t=25,pt=1,l=1,sg=0:1
    TSP:MSG:PONG RECV (hops=1)
    TSP:CHKUPL:OK
    TSM:UPL:OK
    TSM:READY
    TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
    TSP:MSG:SEND 104-104-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
    TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
    TSP:MSG:READ 0-0-104 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=11,pt=0,l=20,sg=0,ft=0,st=ok:DHT-22 Humidity-Temp
    TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=12,pt=0,l=4,sg=0,ft=0,st=ok:1.04
    TSP:MSG:SEND 104-104-0-0 s=0,c=0,t=7,pt=0,l=0,sg=0,ft=0,st=ok:
    TSP:MSG:SEND 104-104-0-0 s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=ok:
    !TSP:MSG:SEND 104-104-0-0 s=200,c=0,t=30,pt=0,l=0,sg=0,ft=0,st=fail:
    Request registration...
    !TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=fail:2
    TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=2,st=ok:2
    TSP:MSG:READ 0-0-104 s=255,c=3,t=27,pt=1,l=1,sg=0:1
    Node registration=1
    Init complete, id=104, parent=0, distance=1, registration=1

    Thanks!

    YveauxY 1 Reply Last reply
    0
    • C chaeron

      Hi:

      I've got a remote sensor with 3 child sensors....temp, humidity and battery voltage.

      Gateway is a ESP6266 running the MQTT sketch.

      Both sensor and GW are running the latest 2.0.0 stable code base.

      When the sensor node powers up it registers fine....but only successfully sends the first two presentation requests. The 3rd request (for multimeter voltage) fails for some reason.

      If I put a 500 ms delay between the presentation of the 2nd and 3rd sensors, it succeeds.

      Any idea what might be causing this? Is the gateway just not responding fast enough to the first two requests?

      Here is the debug log from the sensor node startup, without delays, so the 3rd presentation fails. Interesting that the first registration request also fails.

      Starting sensor (RNNNA-, 2.0.0)
      TSM:INIT
      TSM:RADIO:OK
      TSP:ASSIGNID:OK (ID=104)
      TSM:FPAR
      TSP:MSG:SEND 104-104-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSP:MSG:READ 0-0-104 s=255,c=3,t=8,pt=1,l=1,sg=0:0
      TSP:MSG:FPAR RES (ID=0, dist=0)
      TSP:MSG:PAR OK (ID=0, dist=1)
      TSM:FPAR:OK
      TSM:ID
      TSM:CHKID:OK (ID=104)
      TSM:UPL
      TSP:PING:SEND (dest=0)
      TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
      TSP:MSG:READ 0-0-104 s=255,c=3,t=25,pt=1,l=1,sg=0:1
      TSP:MSG:PONG RECV (hops=1)
      TSP:CHKUPL:OK
      TSM:UPL:OK
      TSM:READY
      TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
      TSP:MSG:SEND 104-104-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
      TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
      TSP:MSG:READ 0-0-104 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=11,pt=0,l=20,sg=0,ft=0,st=ok:DHT-22 Humidity-Temp
      TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=12,pt=0,l=4,sg=0,ft=0,st=ok:1.04
      TSP:MSG:SEND 104-104-0-0 s=0,c=0,t=7,pt=0,l=0,sg=0,ft=0,st=ok:
      TSP:MSG:SEND 104-104-0-0 s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=ok:
      !TSP:MSG:SEND 104-104-0-0 s=200,c=0,t=30,pt=0,l=0,sg=0,ft=0,st=fail:
      Request registration...
      !TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=fail:2
      TSP:MSG:SEND 104-104-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=2,st=ok:2
      TSP:MSG:READ 0-0-104 s=255,c=3,t=27,pt=1,l=1,sg=0:1
      Node registration=1
      Init complete, id=104, parent=0, distance=1, registration=1

      Thanks!

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

      @chaeron assuming you're using nrf24 as radio, I guess messages get lost during presentation as the gateway is not able to handle all incoming packets. The nRF has a 3 message buffer which is too small to handle all the incoming packets. Introducing a small delay will give the gw time to process the messages.
      Not much else you can do, apart from enable queuing of incoming messages, but this isn't supported for esp (yet)...

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chaeron
        wrote on last edited by
        #3

        Yes....I"m using NRF24 radios at both ends.

        Didn't realize they had a 3 message buffer only. That might explain it. Delays seem to help out, and since the sensors only send stuff intermittently, don't affect anything.

        Sensor nodes are all based on Pro Mini's running at 3.3v, 8mhz.

        I found that sending two messages consecutively, with no code between (battery % and voltage in my case) could have similar symptoms....2nd send fails. Adding a short delay seems to help this.

        Thanks!

        1 Reply Last reply
        0
        • mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          This is a common symptom. Using a delay seems to be the most common solution/workaround.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gloob
            wrote on last edited by
            #5

            Is there a recommendation how long the delay should be?

            I tried 50ms and it was working but I think the shorter the time, the better it would be for a batterie based sensor node.

            mfalkviddM 1 Reply Last reply
            0
            • G gloob

              Is there a recommendation how long the delay should be?

              I tried 50ms and it was working but I think the shorter the time, the better it would be for a batterie based sensor node.

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #6

              @gloob for the presentation it doesn't matter. The presentation is done when the node boots. If your node reboots often you have other problems :)

              For other messages, nobody knows. A delay shouldn't be needed at all, but seems to help, so you'll have to experiment.

              1 Reply Last reply
              0
              • F Offline
                F Offline
                flopp
                wrote on last edited by
                #7

                we talking about "gw.wait()" or "delay()"?

                1 Reply Last reply
                0
                • EfflonE Offline
                  EfflonE Offline
                  Efflon
                  wrote on last edited by
                  #8

                  I was just about to post a similar conclusion after a hard night trying to figure out why one of my three presentations didn't work (was it my code, HASS, the mqtt-gateway Mys2.1.0 etc..).
                  Introducing a short gw.wait(X) between each presentation did indeed help. In my case it has been quite random if the second or third presentation fails to register. 20ms was to short but 100ms seems to work
                  Is there anywhere this could be saved for later, e.g. in the TempHumidity sketch?

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    robosensor
                    wrote on last edited by
                    #9

                    Maybe someone tried slightly more smart way of sending presentation messages instead of using delay? Can we use bool ack param of present() function to check delivery and send next (or resend current) only after we have received delivery report?

                    EfflonE 1 Reply Last reply
                    0
                    • R robosensor

                      Maybe someone tried slightly more smart way of sending presentation messages instead of using delay? Can we use bool ack param of present() function to check delivery and send next (or resend current) only after we have received delivery report?

                      EfflonE Offline
                      EfflonE Offline
                      Efflon
                      wrote on last edited by
                      #10

                      @robosensor
                      I have tried the bool in the present() function but it doesn't help setting it to true...

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


                      16

                      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