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. Controllers
  3. OpenHAB
  4. openhab binding mysensors

openhab binding mysensors

Scheduled Pinned Locked Moved OpenHAB
3 Posts 2 Posters 707 Views 2 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.
  • M Offline
    M Offline
    MDS
    wrote on last edited by
    #1

    I have a problem with lost message when openhab change two relay at the same time.
    The relay are on the same node (arduino Pro Mini with nRF24L01+) and openhab is connect via WiFi Gateway using ESP32.
    I am investigate to see if the problem is a buffer messages because the node receive multiple message (for the same child/relay).
    In effect seem that mysensors binding on openhab duble the message:

    2021-03-14 18:57:02.898 [ome.event.ItemCommandEvent] - Item 'LuceEsternaAia_Status' received command OFF
    
    2021-03-14 18:57:02.903 [nt.ItemStatePredictedEvent] - LuceEsternaAia_Status predicted to become OFF
    
    ==> /var/log/openhab2/openhab.log <==
    
    2021-03-14 18:57:02.954 [DEBUG] [ensors.handler.MySensorsThingHandler] - Adapter: class org.openhab.binding.mysensors.converter.MySensorsOnOffTypeConverter loaded
    
    2021-03-14 18:57:02.965 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
    
    2021-03-14 18:57:02.969 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 3
    
    2021-03-14 18:57:02.974 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 3;3;1;1;2;0
    
    ==> /var/log/openhab2/events.log <==
    
    2021-03-14 18:57:03.027 [vent.ItemStateChangedEvent] - LuceEsternaAia_Status changed from ON to OFF
    
    ==> /var/log/openhab2/openhab.log <==
    
    2021-03-14 18:57:03.081 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 3;3;1;1;2;0
    
    2021-03-14 18:57:03.140 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;3;1;1;2;0
    
    2021-03-14 18:57:03.146 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
    
    2021-03-14 18:57:03.149 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 3
    
    2021-03-14 18:57:03.151 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: status(V_STATUS) value to: OFF
    
    2021-03-14 18:57:03.159 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 3/3 to 2021-03-14T18:57:03.000+0100
    
    2021-03-14 18:57:03.172 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;3;1;1;2;0
    
    2021-03-14 18:57:03.174 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
    
    2021-03-14 18:57:03.176 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 3
    
    2021-03-14 18:57:03.179 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: status(V_STATUS) value to: OFF
    
    2021-03-14 18:57:03.184 [INFO ] [rsAbstractConnection$MySensorsWriter] - ACK received for message: 3;3;1;1;2;0
    
    2021-03-14 18:57:03.187 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 3/3 to 2021-03-14T18:57:03.000+0100
    

    It's correct ?
    If yes, on the node I can use:

    #define MY_RX_MESSAGE_BUFFER_FEATURE
    #define MY_RX_MESSAGE_BUFFER_SIZE (6)
    

    but on ESP32 gateway what I can do?

    Thanks in advance for the help.

    Massimo

    N 1 Reply Last reply
    0
    • M MDS

      I have a problem with lost message when openhab change two relay at the same time.
      The relay are on the same node (arduino Pro Mini with nRF24L01+) and openhab is connect via WiFi Gateway using ESP32.
      I am investigate to see if the problem is a buffer messages because the node receive multiple message (for the same child/relay).
      In effect seem that mysensors binding on openhab duble the message:

      2021-03-14 18:57:02.898 [ome.event.ItemCommandEvent] - Item 'LuceEsternaAia_Status' received command OFF
      
      2021-03-14 18:57:02.903 [nt.ItemStatePredictedEvent] - LuceEsternaAia_Status predicted to become OFF
      
      ==> /var/log/openhab2/openhab.log <==
      
      2021-03-14 18:57:02.954 [DEBUG] [ensors.handler.MySensorsThingHandler] - Adapter: class org.openhab.binding.mysensors.converter.MySensorsOnOffTypeConverter loaded
      
      2021-03-14 18:57:02.965 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
      
      2021-03-14 18:57:02.969 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 3
      
      2021-03-14 18:57:02.974 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 3;3;1;1;2;0
      
      ==> /var/log/openhab2/events.log <==
      
      2021-03-14 18:57:03.027 [vent.ItemStateChangedEvent] - LuceEsternaAia_Status changed from ON to OFF
      
      ==> /var/log/openhab2/openhab.log <==
      
      2021-03-14 18:57:03.081 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 3;3;1;1;2;0
      
      2021-03-14 18:57:03.140 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;3;1;1;2;0
      
      2021-03-14 18:57:03.146 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
      
      2021-03-14 18:57:03.149 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 3
      
      2021-03-14 18:57:03.151 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: status(V_STATUS) value to: OFF
      
      2021-03-14 18:57:03.159 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 3/3 to 2021-03-14T18:57:03.000+0100
      
      2021-03-14 18:57:03.172 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;3;1;1;2;0
      
      2021-03-14 18:57:03.174 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
      
      2021-03-14 18:57:03.176 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 3
      
      2021-03-14 18:57:03.179 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: status(V_STATUS) value to: OFF
      
      2021-03-14 18:57:03.184 [INFO ] [rsAbstractConnection$MySensorsWriter] - ACK received for message: 3;3;1;1;2;0
      
      2021-03-14 18:57:03.187 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 3/3 to 2021-03-14T18:57:03.000+0100
      

      It's correct ?
      If yes, on the node I can use:

      #define MY_RX_MESSAGE_BUFFER_FEATURE
      #define MY_RX_MESSAGE_BUFFER_SIZE (6)
      

      but on ESP32 gateway what I can do?

      Thanks in advance for the help.

      Massimo

      N Offline
      N Offline
      ncollins
      wrote on last edited by
      #2

      @MDS I looked into this a bit after seeing the same double message in the log. You have ACK setup for these nodes? In the mysensors binding code, it looks like the bridge sends a message then waits for an ACK, and resends if it doesn't get the ACK within a specific amount of time. Unfortunately, it looks like it waits 0ms for the first ACK (doesn't wait) and automatically retransmits = guaranteed duplicate sent. It hasn't really caused any problems for me.

      As for the dropped messages, do you have a delay set up on your bridge config [sendDelay=200]? 1416af8a-28bf-42e8-8c20-9718545523c3-image.png

      Can you post your arduino code?

      M 1 Reply Last reply
      0
      • N ncollins

        @MDS I looked into this a bit after seeing the same double message in the log. You have ACK setup for these nodes? In the mysensors binding code, it looks like the bridge sends a message then waits for an ACK, and resends if it doesn't get the ACK within a specific amount of time. Unfortunately, it looks like it waits 0ms for the first ACK (doesn't wait) and automatically retransmits = guaranteed duplicate sent. It hasn't really caused any problems for me.

        As for the dropped messages, do you have a delay set up on your bridge config [sendDelay=200]? 1416af8a-28bf-42e8-8c20-9718545523c3-image.png

        Can you post your arduino code?

        M Offline
        M Offline
        MDS
        wrote on last edited by
        #3

        @ncollins Great! Seem the problem is the delay. With 1 ms or 100 ms I have double message, but with 200 ms I only one message. Thanks a lot.

        1 Reply Last reply
        1

        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


        18

        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