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. MySensors Ethernet Gateway goes to OFFLINE state

MySensors Ethernet Gateway goes to OFFLINE state

Scheduled Pinned Locked Moved OpenHAB
86 Posts 6 Posters 29.1k Views 6 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.
  • JicJ Jic

    @pentti12

    Can you start manually your gateway with -d option to see the log?

    You should see there if your gateway its receiving messages. If you are receiving message then, the problem should be in the OH2

    jogantJ Offline
    jogantJ Offline
    jogant
    wrote on last edited by
    #47

    @Jic
    what do you mean with "start gateway manually -d option"? My gateway is a standalone device, ethernet connector on one side, nrf24 on the other, arduino in the middle connecting the other two parts.

    1 Reply Last reply
    0
    • pentti12P Offline
      pentti12P Offline
      pentti12
      wrote on last edited by
      #48

      Wait a minute! I think that from the original GatewayW5100 sketch there were missing the IP Gateway and subnet addresses!

      So I will recompile sketch and test again.

      jogantJ 1 Reply Last reply
      0
      • pentti12P pentti12

        Wait a minute! I think that from the original GatewayW5100 sketch there were missing the IP Gateway and subnet addresses!

        So I will recompile sketch and test again.

        jogantJ Offline
        jogantJ Offline
        jogant
        wrote on last edited by jogant
        #49

        @pentti12

        slowly my image gets complete. Online/Offline status is resolved by OH2 binding via polling during initialization. Value updates are sent spontaneous by the gateway via callback, afair. So the gateway needs to know the address and mask of the controller to send values.

        1 Reply Last reply
        0
        • pentti12P Offline
          pentti12P Offline
          pentti12
          wrote on last edited by
          #50

          No help after new sketch loaded into GatewayW5100. OH2 log informs the same result:

          14:49:09.484 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped

          I will take a break - to be continued on next day...

          jogantJ 1 Reply Last reply
          0
          • pentti12P pentti12

            No help after new sketch loaded into GatewayW5100. OH2 log informs the same result:

            14:49:09.484 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped

            I will take a break - to be continued on next day...

            jogantJ Offline
            jogantJ Offline
            jogant
            wrote on last edited by
            #51

            @pentti12
            "connection skipped" message occurs frequently, usually every 10 seconds. That is normal and ok. But you should see messages from the gateway everytime the sensor nodes send updates, except the value is the same as before.

            1 Reply Last reply
            0
            • pentti12P Offline
              pentti12P Offline
              pentti12
              wrote on last edited by
              #52

              I connected my laptop into Ethernet Gateway. Here is a sample of monitoring listing:

              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.4
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=11,c=1,t=0,pt=7,l=5,sg=0:21.9
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.5
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=11,c=1,t=0,pt=7,l=5,sg=0:22.0
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=11,c=1,t=0,pt=7,l=5,sg=0:21.9
              0;255;3;0;9;TSP:SANCHK:OK
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.6
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.4
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.5
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.4
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.5
              0;255;3;0;9;TSP:SANCHK:OK
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.5
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.6
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.7
              0;255;3;0;9;TSP:SANCHK:OK
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.7
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=11,c=1,t=0,pt=7,l=5,sg=0:21.8
              0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.8

              So I think that this is OK, when I have only one sensor node alive.

              But still, how I shall modify my Arduino Gateway sketch in order to get OH2 server show temperature and humidity values?

              JicJ 1 Reply Last reply
              0
              • pentti12P pentti12

                I connected my laptop into Ethernet Gateway. Here is a sample of monitoring listing:

                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.4
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=11,c=1,t=0,pt=7,l=5,sg=0:21.9
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.5
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=11,c=1,t=0,pt=7,l=5,sg=0:22.0
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=11,c=1,t=0,pt=7,l=5,sg=0:21.9
                0;255;3;0;9;TSP:SANCHK:OK
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.6
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.4
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.5
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.4
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.5
                0;255;3;0;9;TSP:SANCHK:OK
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.5
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.6
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.7
                0;255;3;0;9;TSP:SANCHK:OK
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.7
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=11,c=1,t=0,pt=7,l=5,sg=0:21.8
                0;255;3;0;9;TSP:MSG:READ 9-9-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.8

                So I think that this is OK, when I have only one sensor node alive.

                But still, how I shall modify my Arduino Gateway sketch in order to get OH2 server show temperature and humidity values?

                JicJ Offline
                JicJ Offline
                Jic
                wrote on last edited by
                #53

                @pentti12

                Could be permission problem?
                Can you connect your gateway on rpi and execute

                ls -l /dev/tty*
                

                I think you are using a ethernet gateway skecth, normaly it's should be mounted in /dev/ttyACM0

                Have you already execute

                sudo usermod -a -G dialout openhab
                

                Be sure that you have the las binding
                https://github.com/tobof/openhab2-addons/blob/MySensors/addons/binding/org.openhab.binding.mysensors/target/org.openhab.binding.mysensors-2.0.0-SNAPSHOT.jar
                and your openhab2 is updated.

                1 Reply Last reply
                0
                • pentti12P Offline
                  pentti12P Offline
                  pentti12
                  wrote on last edited by
                  #54

                  I am running the Ethernet GatewayW5100 software on Arduino UNO. I don't have rpi, I have installed OH2 on Pine64. It is running debian Jessie and it is uptodate. Also the latest mysensors binding is in use. So what to next?

                  JicJ 1 Reply Last reply
                  0
                  • pentti12P pentti12

                    I am running the Ethernet GatewayW5100 software on Arduino UNO. I don't have rpi, I have installed OH2 on Pine64. It is running debian Jessie and it is uptodate. Also the latest mysensors binding is in use. So what to next?

                    JicJ Offline
                    JicJ Offline
                    Jic
                    wrote on last edited by Jic
                    #55

                    @pentti12 I am confused.

                    Don't you need to connect your Ethernet GatewayW5100 by USB into your pine64?

                    1 Reply Last reply
                    0
                    • pentti12P Offline
                      pentti12P Offline
                      pentti12
                      wrote on last edited by
                      #56

                      OK, now Gateway is connected via USB into Pine64 and it is shown as /dev/ttyUSB0.

                      JicJ 1 Reply Last reply
                      0
                      • pentti12P pentti12

                        OK, now Gateway is connected via USB into Pine64 and it is shown as /dev/ttyUSB0.

                        JicJ Offline
                        JicJ Offline
                        Jic
                        wrote on last edited by
                        #57

                        @pentti12 said:

                        /dev/ttyUSB0

                        Now, you need to configure your binding in your OH2?
                        https://github.com/tobof/openhab2-addons/wiki/Configuration

                        1 Reply Last reply
                        0
                        • pentti12P Offline
                          pentti12P Offline
                          pentti12
                          wrote on last edited by
                          #58

                          I added into demo.things following line:

                          Bridge mysensors:bridge-ser:gateway [ serialPort="dev/ttyUSB0", sendDelay=200 ] {

                          In OH2 MySensor Serial Gateway stays OFFLINE state now. And also the Philips HUE things went OFFLINE state even if they have their own Bridge.

                          Looks bad!

                          JicJ 1 Reply Last reply
                          0
                          • pentti12P pentti12

                            I added into demo.things following line:

                            Bridge mysensors:bridge-ser:gateway [ serialPort="dev/ttyUSB0", sendDelay=200 ] {

                            In OH2 MySensor Serial Gateway stays OFFLINE state now. And also the Philips HUE things went OFFLINE state even if they have their own Bridge.

                            Looks bad!

                            JicJ Offline
                            JicJ Offline
                            Jic
                            wrote on last edited by
                            #59

                            @pentti12 This configuration is for a Serial Gateway connected to GPIO, I think.

                            You should use this one

                            Bridge mysensors:bridge-eth:gateway [ ipAddress="127.0.0.1", tcpPort=5003, sendDelay=200 ] {
                                 /** define things connected to that bridge here */
                              }
                            

                            But at this point I am really confused, I don't know how Ethernet Gateway works. I am not sure when I can help you.

                            Do you need configure you ESSID and password of your WIFI in your sketch? or the ethernet Gateway geneate their own network?

                            1 Reply Last reply
                            0
                            • pentti12P Offline
                              pentti12P Offline
                              pentti12
                              wrote on last edited by
                              #60

                              Now I am confused, why I should bridge Ethernet Gateway, if I have USB-connection to MySensors Gateway only?

                              I tried to use Ethernet Gateway connected into my local IP-network without success, so I think that I will end this work to this point. There seems no good instructions available what is missing or wrong on the MySensors openhab binding..

                              JicJ 1 Reply Last reply
                              0
                              • pentti12P pentti12

                                Now I am confused, why I should bridge Ethernet Gateway, if I have USB-connection to MySensors Gateway only?

                                I tried to use Ethernet Gateway connected into my local IP-network without success, so I think that I will end this work to this point. There seems no good instructions available what is missing or wrong on the MySensors openhab binding..

                                JicJ Offline
                                JicJ Offline
                                Jic
                                wrote on last edited by
                                #61

                                @pentti12

                                Ok, sorry, I think I was wrong.
                                Here has a similar example
                                http://www.makeuseof.com/tag/diy-smart-home-sensors-arduino-mysensors-openhab/
                                Could you try connecting it again separately, and configure in your OH2 and ethernet binding with the ip from your gatweay?

                                1 Reply Last reply
                                0
                                • pentti12P Offline
                                  pentti12P Offline
                                  pentti12
                                  wrote on last edited by
                                  #62

                                  Can someone explain, why I cannot get real values from MySensors node, which has only temperature and humidity sensors?

                                  I can get the MySensors Ethernet Gateway into ONLINE STATE. I can get humidity and Temperature Sensors ONLINE STATE, but I cannot get real values from the node.

                                  What I see from OpenHAB2 log side is:

                                  09:31:45.356 [DEBUG] [rs.internal.protocol.MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
                                  09:31:45.375 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
                                  09:31:48.356 [WARN ] [otocol.MySensorsNetworkSanityChecker] - I_VERSION message response is not arrived. Remained attempts before disconnection 1
                                  09:31:55.377 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
                                  09:32:05.380 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped

                                  I think that there must be some error in MySensors Binding at the moment, because for example the Philips HUE bridge is working corretly via Openhab2 in the same Pine64 controller.

                                  JicJ T 2 Replies Last reply
                                  0
                                  • pentti12P pentti12

                                    Can someone explain, why I cannot get real values from MySensors node, which has only temperature and humidity sensors?

                                    I can get the MySensors Ethernet Gateway into ONLINE STATE. I can get humidity and Temperature Sensors ONLINE STATE, but I cannot get real values from the node.

                                    What I see from OpenHAB2 log side is:

                                    09:31:45.356 [DEBUG] [rs.internal.protocol.MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
                                    09:31:45.375 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
                                    09:31:48.356 [WARN ] [otocol.MySensorsNetworkSanityChecker] - I_VERSION message response is not arrived. Remained attempts before disconnection 1
                                    09:31:55.377 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
                                    09:32:05.380 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped

                                    I think that there must be some error in MySensors Binding at the moment, because for example the Philips HUE bridge is working corretly via Openhab2 in the same Pine64 controller.

                                    JicJ Offline
                                    JicJ Offline
                                    Jic
                                    wrote on last edited by
                                    #63

                                    @pentti12

                                    This message is, following the information

                                    https://www.mysensors.org/download/serial_api_20

                                    node-id ; child-sensor-id ; message-type ; ack ; sub-type ; payload \n
                                    0; ;0 ;3 ;0 ;2 ;

                                    A message-type=3 means an internal message of the protocol
                                    Sub-type=2 means that it is ascking for the gateway version.

                                    You can find here how to disable it using skipStartupCheck=true
                                    https://github.com/tobof/openhab2-addons/wiki/Configuration

                                    Bridge mysensors:bridge-eth:gateway [ ipAddress="127.0.0.1", tcpPort=5003, sendDelay=200, skipStartupCheck=true ] {
                                         /** define things connected to that bridge here */
                                      }
                                    

                                    I hope this help you.

                                    1 Reply Last reply
                                    0
                                    • pentti12P pentti12

                                      Can someone explain, why I cannot get real values from MySensors node, which has only temperature and humidity sensors?

                                      I can get the MySensors Ethernet Gateway into ONLINE STATE. I can get humidity and Temperature Sensors ONLINE STATE, but I cannot get real values from the node.

                                      What I see from OpenHAB2 log side is:

                                      09:31:45.356 [DEBUG] [rs.internal.protocol.MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
                                      09:31:45.375 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
                                      09:31:48.356 [WARN ] [otocol.MySensorsNetworkSanityChecker] - I_VERSION message response is not arrived. Remained attempts before disconnection 1
                                      09:31:55.377 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
                                      09:32:05.380 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped

                                      I think that there must be some error in MySensors Binding at the moment, because for example the Philips HUE bridge is working corretly via Openhab2 in the same Pine64 controller.

                                      T Offline
                                      T Offline
                                      TimO
                                      Hero Member
                                      wrote on last edited by
                                      #64

                                      Hey @pentti12!

                                      Which gateway are you using? Serial or Ethernet? You can't use the ethernet gateway via serial connection.

                                      Which sketch are you using?

                                      If you are using ethernet gateway sketch but used the serial connection this would explain why the binding could not get any response.

                                      1 Reply Last reply
                                      0
                                      • pentti12P Offline
                                        pentti12P Offline
                                        pentti12
                                        wrote on last edited by
                                        #65

                                        I am using Ethernet Gateway in my LAN. Gateway has static IP and it is accessible (ping works). Also port number 5003 is detected correctly.

                                        I am using standard GatewayW5100.ino sketch.

                                        How can I force OH2 to use only Ethernet-connection?

                                        1 Reply Last reply
                                        0
                                        • T Offline
                                          T Offline
                                          TimO
                                          Hero Member
                                          wrote on last edited by
                                          #66

                                          Have you configured the gateway in the *.things file? How does it look?

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


                                          17

                                          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