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. Development
  3. Multiple messages to same node, seems to miss one.

Multiple messages to same node, seems to miss one.

Scheduled Pinned Locked Moved Development
17 Posts 4 Posters 2.9k Views 3 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.
  • CrankyCoderC CrankyCoder

    I have a small 2 relay module node in my bedroom for the lights on both sides of my bed.

    At night my openhab system sends the mqtt messages to turn off the lights. I have been monitoring the nodes for a few nights and as you can see the messages from openhab to the mqtt are showing up and they are very close together at the time of arrival on mqtt.

    However, it seems one of the lights doesn't always turn off. I have to then manually do it. Just wondering if this is something anyone else has run in to. I even have the ack turned on and doesn't seem to have changed the behavior.

    0_1525992894070_a6c7b6b5-a350-4ca2-a8a8-e110d9cb95af-image.png

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

    @crankycoder You didn't describe your hardware, but if it's based on nRF24 the issue could be that this radio has a 3 level deep queue for incoming messages. If more than 3 messages come in faster than the node can handle, the last message(s) will get lost.
    You can counter this by either sending the messages with more time inbetween or turn on message buffering by defining MY_RX_MESSAGE_BUFFER_FEATURE (make sure the nRF24 IRQ pin is connected!)
    There's some discussion on the topic here: https://www.mysensors.org/build/serial_gateway

    http://yveaux.blogspot.nl

    CrankyCoderC 2 Replies Last reply
    0
    • electrikE Offline
      electrikE Offline
      electrik
      wrote on last edited by
      #3

      Is this feature MY_RX_MESSAGE_BUFFER_FEATURE somehow available on the ESP8266 gateway too? Or an alternative?

      mfalkviddM 1 Reply Last reply
      0
      • YveauxY Yveaux

        @crankycoder You didn't describe your hardware, but if it's based on nRF24 the issue could be that this radio has a 3 level deep queue for incoming messages. If more than 3 messages come in faster than the node can handle, the last message(s) will get lost.
        You can counter this by either sending the messages with more time inbetween or turn on message buffering by defining MY_RX_MESSAGE_BUFFER_FEATURE (make sure the nRF24 IRQ pin is connected!)
        There's some discussion on the topic here: https://www.mysensors.org/build/serial_gateway

        CrankyCoderC Offline
        CrankyCoderC Offline
        CrankyCoder
        wrote on last edited by
        #4

        @yveaux apologies. I have a raspberry pi mqtt gateway. there is a repeater in between the gateway and the module under the bed. I will look into that buffer feature or see if i can get openhab to slow down the group commands.

        Home Automation Tinkerer
        www.CrankyCoder.net

        Controller: HomeAssistant in Kubernetes
        Gateway: MQTTClientGateway
        MySensors: 2.3

        1 Reply Last reply
        0
        • electrikE electrik

          Is this feature MY_RX_MESSAGE_BUFFER_FEATURE somehow available on the ESP8266 gateway too? Or an alternative?

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

          @electrik yes it is available
          Edit: Sorry, seems like it is not available on esp8266.

          electrikE 1 Reply Last reply
          1
          • mfalkviddM mfalkvidd

            @electrik yes it is available
            Edit: Sorry, seems like it is not available on esp8266.

            electrikE Offline
            electrikE Offline
            electrik
            wrote on last edited by
            #6

            @mfalkvidd That is good to hear. What should I do to have that enabled?

            mfalkviddM 1 Reply Last reply
            0
            • YveauxY Yveaux

              @crankycoder You didn't describe your hardware, but if it's based on nRF24 the issue could be that this radio has a 3 level deep queue for incoming messages. If more than 3 messages come in faster than the node can handle, the last message(s) will get lost.
              You can counter this by either sending the messages with more time inbetween or turn on message buffering by defining MY_RX_MESSAGE_BUFFER_FEATURE (make sure the nRF24 IRQ pin is connected!)
              There's some discussion on the topic here: https://www.mysensors.org/build/serial_gateway

              CrankyCoderC Offline
              CrankyCoderC Offline
              CrankyCoder
              wrote on last edited by
              #7

              @yveaux is this something that could be a problem at the repeater and the node itself? I don't think it's the gateway as the messages aren't coming in, it's being delivered to the node.

              Home Automation Tinkerer
              www.CrankyCoder.net

              Controller: HomeAssistant in Kubernetes
              Gateway: MQTTClientGateway
              MySensors: 2.3

              1 Reply Last reply
              0
              • electrikE electrik

                @mfalkvidd That is good to hear. What should I do to have that enabled?

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

                @electrik It should have been sufficient to follow the documentation, but it seems like MY_RX_MESSAGE_BUFFER_FEATURE is only available for atmega328 (or perhaps also for SAMD and Linux/Raspberry Pi but definitely not for esp8266).

                I have created an issue to clarify the documentation.

                Thanks to @Yveaux for notifying me.

                electrikE 1 Reply Last reply
                0
                • mfalkviddM mfalkvidd

                  @electrik It should have been sufficient to follow the documentation, but it seems like MY_RX_MESSAGE_BUFFER_FEATURE is only available for atmega328 (or perhaps also for SAMD and Linux/Raspberry Pi but definitely not for esp8266).

                  I have created an issue to clarify the documentation.

                  Thanks to @Yveaux for notifying me.

                  electrikE Offline
                  electrikE Offline
                  electrik
                  wrote on last edited by
                  #9

                  @mfalkvidd all right thanks. Is there an alternative to avoid losing messages on an ESP8266 MQTT gateway?

                  YveauxY 1 Reply Last reply
                  0
                  • electrikE electrik

                    @mfalkvidd all right thanks. Is there an alternative to avoid losing messages on an ESP8266 MQTT gateway?

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

                    @electrik decrease the message rate or the number of messages sent in bursts

                    http://yveaux.blogspot.nl

                    electrikE 1 Reply Last reply
                    0
                    • YveauxY Yveaux

                      @electrik decrease the message rate or the number of messages sent in bursts

                      electrikE Offline
                      electrikE Offline
                      electrik
                      wrote on last edited by electrik
                      #11

                      @yveaux What is a rate that is still expected to be possible? Or, how often is the buffer from the NRF emptied?

                      YveauxY 1 Reply Last reply
                      0
                      • electrikE electrik

                        @yveaux What is a rate that is still expected to be possible? Or, how often is the buffer from the NRF emptied?

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

                        @electrik that's a tough one... Every time loop() executes, or if you call eg wait() the queue is emptied.
                        So it all depends on what you do in your sketch.

                        http://yveaux.blogspot.nl

                        electrikE 1 Reply Last reply
                        1
                        • YveauxY Yveaux

                          @electrik that's a tough one... Every time loop() executes, or if you call eg wait() the queue is emptied.
                          So it all depends on what you do in your sketch.

                          electrikE Offline
                          electrikE Offline
                          electrik
                          wrote on last edited by
                          #13

                          @yveaux so by calling wait () a couple of times in the loop, it will be processed more often. I will try that, thanks

                          1 Reply Last reply
                          0
                          • electrikE Offline
                            electrikE Offline
                            electrik
                            wrote on last edited by
                            #14

                            @Yveaux do you know if there are plans to support this buffering on the ESP8266 or the ESP32? Is it all related to SoftSPI?

                            YveauxY 1 Reply Last reply
                            0
                            • electrikE electrik

                              @Yveaux do you know if there are plans to support this buffering on the ESP8266 or the ESP32? Is it all related to SoftSPI?

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

                              @electrik the problem is the arduino port, not the mySensors stack. Last time I checked the issue on GitHub was still unresolved...

                              http://yveaux.blogspot.nl

                              YveauxY 1 Reply Last reply
                              1
                              • YveauxY Yveaux

                                @electrik the problem is the arduino port, not the mySensors stack. Last time I checked the issue on GitHub was still unresolved...

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

                                @yveaux This seems to be the original issue, which is closed: https://github.com/esp8266/Arduino/issues/1943
                                That sounds hopeful, but no time to check it right now...

                                http://yveaux.blogspot.nl

                                electrikE 1 Reply Last reply
                                2
                                • YveauxY Yveaux

                                  @yveaux This seems to be the original issue, which is closed: https://github.com/esp8266/Arduino/issues/1943
                                  That sounds hopeful, but no time to check it right now...

                                  electrikE Offline
                                  electrikE Offline
                                  electrik
                                  wrote on last edited by
                                  #17

                                  @yveaux Did you find some time already to have a look at this? :-)

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


                                  15

                                  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