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 2.2 binding

openHAB 2.2 binding

Scheduled Pinned Locked Moved OpenHAB
132 Posts 32 Posters 58.2k Views 34 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.
  • L Offline
    L Offline
    LastSamurai
    Hardware Contributor
    wrote on last edited by LastSamurai
    #7

    @TimO I have a small problem here. I was trying to get into openhab (again) this time using your new 2.2 binding. I removed the old jar and installed the new one. I had also removed all things in the paper ui before. Afterwards I tried to add the gateway via things file again.

    Bundle:list says:

    190 | Installed |  80 | 2.2.0.201707241115     | MySensors Binding
    

    but this things file:

    Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyUSB0", sendDelay=200 ] {
        /** define things connected to that bridge here */
      }
    

    Only results in an error message:

    22:49:56.806 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'mysensors.things'
    22:49:56.847 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'mysensors.things' is either empty or cannot be parsed correctly!
    22:49:56.988 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mysensors.things'
    

    Any idea what I did wrong? The port is right I can receive messages via cat /dev/ttyUSB0.

    PS also is there already a timeline for when you will be able to add this binding to the official openhab "store"?
    PPS The binding also doesn't show up in the menu where you can scan for new things. Is there something more to do to install this new version? The old one was working.

    T 1 Reply Last reply
    0
    • L LastSamurai

      @TimO I have a small problem here. I was trying to get into openhab (again) this time using your new 2.2 binding. I removed the old jar and installed the new one. I had also removed all things in the paper ui before. Afterwards I tried to add the gateway via things file again.

      Bundle:list says:

      190 | Installed |  80 | 2.2.0.201707241115     | MySensors Binding
      

      but this things file:

      Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyUSB0", sendDelay=200 ] {
          /** define things connected to that bridge here */
        }
      

      Only results in an error message:

      22:49:56.806 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'mysensors.things'
      22:49:56.847 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'mysensors.things' is either empty or cannot be parsed correctly!
      22:49:56.988 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mysensors.things'
      

      Any idea what I did wrong? The port is right I can receive messages via cat /dev/ttyUSB0.

      PS also is there already a timeline for when you will be able to add this binding to the official openhab "store"?
      PPS The binding also doesn't show up in the menu where you can scan for new things. Is there something more to do to install this new version? The old one was working.

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

      @LastSamurai Looks like the binding wassn't initialized. There should be a message in the log why the init failed. My guess: gnu.io is missing. Did you execute this step: feature:install openhab-transport-serial?

      I can't give you a timeline about the integration. There is a PR here: https://github.com/openhab/openhab2-addons/pull/2066

      It took me quite some time to fulfill all requested changes and I'm now waiting for a review by Kai Kreuzer, the owner of the Repo.

      You are able to install the binding via the IoT Marketplace: https://community.openhab.org/t/distributing-bindings-through-the-iot-marketplace/24491

      MySensors Binding:
      https://marketplace.eclipse.org/search/site/mysensors

      0_1500967184688_upload-2decf7e6-76f3-4c83-a7ba-a4c91f101920

      A big disadvantage: Requirements are not fulfilled automatically. This will be added in the future. You have to execute the command above (before installing the binding) in the karaf console: feature:install openhab-transport-serial.

      L 1 Reply Last reply
      1
      • FejiF Offline
        FejiF Offline
        Feji
        wrote on last edited by
        #9

        Hi,
        When I use the 2.2.0-SNAPSHOT version of the binding, the zwave binding can't initialize the serial connection to the zwave dongle. With no mysensors things, it's OK. I made a ticket on git. I revert back to 2.1.0-SNAPSHOT and it's OK.

        T 1 Reply Last reply
        0
        • T TimO

          @LastSamurai Looks like the binding wassn't initialized. There should be a message in the log why the init failed. My guess: gnu.io is missing. Did you execute this step: feature:install openhab-transport-serial?

          I can't give you a timeline about the integration. There is a PR here: https://github.com/openhab/openhab2-addons/pull/2066

          It took me quite some time to fulfill all requested changes and I'm now waiting for a review by Kai Kreuzer, the owner of the Repo.

          You are able to install the binding via the IoT Marketplace: https://community.openhab.org/t/distributing-bindings-through-the-iot-marketplace/24491

          MySensors Binding:
          https://marketplace.eclipse.org/search/site/mysensors

          0_1500967184688_upload-2decf7e6-76f3-4c83-a7ba-a4c91f101920

          A big disadvantage: Requirements are not fulfilled automatically. This will be added in the future. You have to execute the command above (before installing the binding) in the karaf console: feature:install openhab-transport-serial.

          L Offline
          L Offline
          LastSamurai
          Hardware Contributor
          wrote on last edited by
          #10

          @TimO Thank you. I installed the transport-serial feature (again... I had it installed for the last version of the binding already) and now its working.

          1 Reply Last reply
          0
          • FejiF Feji

            Hi,
            When I use the 2.2.0-SNAPSHOT version of the binding, the zwave binding can't initialize the serial connection to the zwave dongle. With no mysensors things, it's OK. I made a ticket on git. I revert back to 2.1.0-SNAPSHOT and it's OK.

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

            @Feji I've updated the issue on github.
            https://github.com/tobof/openhab2-addons/issues/86

            1 Reply Last reply
            0
            • P Offline
              P Offline
              philro
              wrote on last edited by philro
              #12

              Hi,
              thanks for the new Version! I've got a Problem with the Network Sanity Check, it doesn't run.

              I got a ESP8266 Based Ethernet Gateway which is configured with DHCP. Everytime the DHCP Lease got renewed the Connection between the Gateway and openHAB is lost for a short Time. The Binding doesnt' recognize this. The Gateway and all Sensors marked as Online but not a single Message comes from the Gateway. I could also reproduce this if i reboot the Gateway.

              I tried different Settings for the Sanity Check but nothing worked.
              I switched to Debug-logging for the Binding. After the Connection is lost, not a single Log Entry is written.

              If i go into the Settings from the Gateway thing and change something, the binding start to communicate with the Gateway again, but all Sensors marked as offline in openHAB. There are incoming Messages from Sensors but the Binding write to log:

              20:35:10.030 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 5;2;1;0;1;67.9
              20:35:10.036 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 5 found in gateway
              20:35:10.041 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 2 not present in node 5
              

              if i restart whole openHAB all is functional again until the next time this occurs.

              Thanks for help,
              Greets Phil

              Edit: I also get the same Log entries as above if i change a Setting from the sanity check, without rebooting the Gateway.

              S T 2 Replies Last reply
              1
              • FejiF Offline
                FejiF Offline
                Feji
                wrote on last edited by
                #13

                Hi, tobof. Thx again for the serial fix :).
                However I had this issue with the power counter node :

                09:16:02.900 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable V_WATT not present
                09:16:03.285 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable V_KWH not present
                

                The Gateway and the node are in 2.2.0b, Openhab in 2.2.0 SNAPSHOT.

                T 1 Reply Last reply
                0
                • FejiF Feji

                  Hi, tobof. Thx again for the serial fix :).
                  However I had this issue with the power counter node :

                  09:16:02.900 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable V_WATT not present
                  09:16:03.285 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable V_KWH not present
                  

                  The Gateway and the node are in 2.2.0b, Openhab in 2.2.0 SNAPSHOT.

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

                  Hey @Feji !

                  When did that message appear. Could you please post the log before and after the warn message ocurres?

                  1 Reply Last reply
                  0
                  • FejiF Offline
                    FejiF Offline
                    Feji
                    wrote on last edited by
                    #15

                    Hi,

                    this is the entire log.

                    16:34:26.529 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244336630 TSF:MSG:READ,102-102-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
                    16:34:26.532 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244336655 TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:C847F69309390B8321591E8A0177300C610B45574986153FB7
                    16:34:26.535 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244336736 TSF:MSG:READ,102-102-0,s=1,c=1,t=18,pt=7,l=5,sg=1:54312.0080
                    16:34:26.559 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 102;1;1;0;18;54312.0080
                    16:34:26.569 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 102 found in gateway
                    16:34:26.577 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 102
                    16:34:26.591 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable V_KWH not present
                    16:34:46.457 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244356571 TSF:MSG:READ,102-102-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
                    16:34:46.484 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244356594 TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:894CE25CF528B67D1DEE9B37F9CFC352C330BE7EB1E10F5E74
                    16:34:46.558 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244356675 TSF:MSG:READ,102-102-0,s=1,c=1,t=17,pt=5,l=4,sg=1:195
                    16:34:46.641 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 102;1;1;0;17;195
                    16:34:46.646 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 102 found in gateway
                    16:34:46.651 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 102
                    16:34:46.655 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable V_WATT not present
                    
                    FejiF 1 Reply Last reply
                    0
                    • FejiF Feji

                      Hi,

                      this is the entire log.

                      16:34:26.529 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244336630 TSF:MSG:READ,102-102-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
                      16:34:26.532 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244336655 TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:C847F69309390B8321591E8A0177300C610B45574986153FB7
                      16:34:26.535 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244336736 TSF:MSG:READ,102-102-0,s=1,c=1,t=18,pt=7,l=5,sg=1:54312.0080
                      16:34:26.559 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 102;1;1;0;18;54312.0080
                      16:34:26.569 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 102 found in gateway
                      16:34:26.577 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 102
                      16:34:26.591 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable V_KWH not present
                      16:34:46.457 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244356571 TSF:MSG:READ,102-102-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
                      16:34:46.484 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244356594 TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:894CE25CF528B67D1DEE9B37F9CFC352C330BE7EB1E10F5E74
                      16:34:46.558 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;244356675 TSF:MSG:READ,102-102-0,s=1,c=1,t=17,pt=5,l=4,sg=1:195
                      16:34:46.641 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 102;1;1;0;17;195
                      16:34:46.646 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 102 found in gateway
                      16:34:46.651 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 102
                      16:34:46.655 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable V_WATT not present
                      
                      FejiF Offline
                      FejiF Offline
                      Feji
                      wrote on last edited by
                      #16

                      @Feji
                      I found it, the "Revert State" option was activated for this node. Now it's working as expected.
                      The log message might be more "explicit".

                      1 Reply Last reply
                      0
                      • tbowmoT Offline
                        tbowmoT Offline
                        tbowmo
                        Admin
                        wrote on last edited by
                        #17

                        @TimO

                        Trying openhab2 out.. Fresh install, with both serial and mysensors binding installed.

                        I'm using socat to make a virtual comport to node-red

                        In the openhab logs I see a lot of errors like

                        15:04:07.252 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
                        15:04:07.379 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                        java.io.IOException: Underlying input stream returned zero bytes
                        	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                        	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                        	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                        	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                        	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                        	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                        	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                        	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                        	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                        	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                        	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                        15:04:07.680 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                        java.io.IOException: Underlying input stream returned zero bytes
                        	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                        	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                        	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                        	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                        	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                        	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                        	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                        	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                        	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                        	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                        	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                        

                        I can see that the gateway indeed does answer to the 0;0;3;0;2 request, and the reply is also send on to openhab2.

                        I have tried to disable startup checks, but I get ERROR 409: conflict as a toast message in the lower right corner of paperui when I try to save settings.

                        Anything I have missed somewhere?

                        T 1 Reply Last reply
                        0
                        • T TimO

                          Dear fellow openHAB2 binding users,

                          it's time for a new release of the binding. The added functionality is low, but under the hood there were a few changes, so after the refactoring @andreacioni has done at the beginning of this year, I've done some refactoring too, with the objective to fullfil the regulations for an integration into the official openhab2-addons repository.
                          I've tried to improve the readability of the configuration and of the code itself.

                          This leads to an important point: The current release is not backwards compatible!!
                          Whatever is configured (MySensors binding related) will not work anymore with the current release.

                          But why?

                          • nodeId & childId were Strings in the old bindings and now are Integer
                          • skipStartupCheck was renamed to startupCheckEnabled

                          If you've configured the things with the *.things file you just have to do two easy steps:

                          1. Look for skipStartupCheck and switch it with startupCheckEnabled and reverse the logic (true to false and vice versa)

                          2. Look for nodeId="123", childId="456" and remove the quotation marks ", so it will look like: nodeId=123, childId=456

                          Copy the new jar file into the addons folder, start OpenHAB2 and you're good to go.

                          If you've configured the things in PaperUI the easiest way is to delete all things and rediscover them. Of course in large installations this won't be much fun.

                          I hope this won't happen again in further versions! :s

                          Fixed in this release:

                          • RGB & RGBW corrections
                          • Removed bug that prevented autodiscovery of deleted things
                          • mysensors.test fragment added / tests moved
                          • Static code analysis
                          • Move to 2.2.0 Snapshot

                          The changes in functionality were small so there is no need to install the new version asap if you are able to forgo the above mentioned functionality.

                          Downloads:
                          OpenHAB MySensors Binding 2.2.0

                          OpenHAB MySensors Binding 2.1.0 (old binding version, with old configuration if you still need it)

                          M Offline
                          M Offline
                          MagnusF
                          wrote on last edited by
                          #18

                          @TimO
                          I'm new to MySensors and openHAB and this might be vary basic questions.
                          As I only have start with a small system with openHAB on an RPi3, a serial gateway and 2 nodes so the update to openHAB 2.2 binding will probably not be a big deal.
                          In the explanation of the changes, you write "The current release is not backwards compatible" and "I hope this won't happen again in further versions!". Does this mean that a new version is backward compatible with e.g. V2.1.0 or that I in anyway must do the reconfigurations now but don't have to do it again?
                          I have configured my things in Paper UI and have to delete them but do I have to clean the *.items file and *.sitemap file? Further down in the "topic" you have a link to "https://github.com/tobof/openhab2-addons/issues/86" with a link to a new version of the binding and I wonder if this is the one I'm going to use?

                          FejiF 1 Reply Last reply
                          0
                          • M MagnusF

                            @TimO
                            I'm new to MySensors and openHAB and this might be vary basic questions.
                            As I only have start with a small system with openHAB on an RPi3, a serial gateway and 2 nodes so the update to openHAB 2.2 binding will probably not be a big deal.
                            In the explanation of the changes, you write "The current release is not backwards compatible" and "I hope this won't happen again in further versions!". Does this mean that a new version is backward compatible with e.g. V2.1.0 or that I in anyway must do the reconfigurations now but don't have to do it again?
                            I have configured my things in Paper UI and have to delete them but do I have to clean the *.items file and *.sitemap file? Further down in the "topic" you have a link to "https://github.com/tobof/openhab2-addons/issues/86" with a link to a new version of the binding and I wonder if this is the one I'm going to use?

                            FejiF Offline
                            FejiF Offline
                            Feji
                            wrote on last edited by
                            #19

                            @MagnusF
                            This version of the binding is for thus want to use two or more serial connection with openhab.
                            Before delete all your things configured in PaperUI, you should consider to dedit the org.eclipse.smarthome.core.thing.Thing.json database in /userdata/jsondb/ and delete the " " around the nodeId and childId. Before editing this file, you must stop your openhab.

                            M 1 Reply Last reply
                            0
                            • FejiF Feji

                              @MagnusF
                              This version of the binding is for thus want to use two or more serial connection with openhab.
                              Before delete all your things configured in PaperUI, you should consider to dedit the org.eclipse.smarthome.core.thing.Thing.json database in /userdata/jsondb/ and delete the " " around the nodeId and childId. Before editing this file, you must stop your openhab.

                              M Offline
                              M Offline
                              MagnusF
                              wrote on last edited by
                              #20

                              @Feji
                              Thanks for your replay! But unfortunately, that was not an answer to my thoughts.

                              1. You say "This version..." Do you mean to use two "MySensors Serial Gateways" connected to one controller with OpenHAB?
                                Does this mean that if I connect one more "MySensor Serial Gateway" to my controller that I will have one more "MySensor Serial Gateway" thing but with another bridge definition?
                              2. In the file "org.eclipse.smarthome.core.thing.Thing.json" there are no things defined with i.e. nodeid="1" and childid="2" it looks like this
                                "mysensors:temperature:709db93f:temperature_2_1" i.e. nodeid 2 childid 1. Do I look in the wrong file?
                              T 1 Reply Last reply
                              0
                              • L Offline
                                L Offline
                                LastSamurai
                                Hardware Contributor
                                wrote on last edited by
                                #21

                                After I fixed the initial errors with the help from this thread I am now trying to use my RGBW nodes with openhab. I have had several issues with that though:

                                • If I add the item via the paperUI:
                                  • On/Off (status) works just fine
                                  • Setting a color at full saturation/brightness works well too
                                  • I am not sure if that is intended but I want to use only the white leds on the RGBW strip sometimes. Mixed white values just look very bad. I can't seem to be able to do this with openhab. Settings the saturation slider to 0 sends ffffffff and sometimes just 00000000. Is there any way to just send 000000ff? Domoticz does this automatically when setting the color to white and home assistant has a seperate white slider that should allow the same thing
                                  • When trying to change the brightness the node only receives a new color value of length null (no dimmer message) and I get the following error message in the openhab log:
                                
                                21:51:17.801 [ERROR] [nternal.event.MySensorsEventRegister] - Event broadcasting throw an exception
                                java.lang.StringIndexOutOfBoundsException: String index out of range: 2
                                        at java.lang.String.substring(String.java:1963)[:1.8.0_131]
                                        at org.openhab.binding.mysensors.converter.MySensorsRGBWTypeConverter.fromString(MySensorsRGBWTypeConverter.java:27)
                                        at org.openhab.binding.mysensors.converter.MySensorsTypeConverter.stateFromChannel(MySensorsTypeConverter.java:33)
                                        at org.openhab.binding.mysensors.handler.MySensorsThingHandler.handleChildUpdateEvent(MySensorsThingHandler.java:275)
                                        at org.openhab.binding.mysensors.handler.MySensorsThingHandler.sensorUpdateEvent(MySensorsThingHandler.java:198)
                                        at org.openhab.binding.mysensors.internal.event.MySensorsEventRegister.lambda$4(MySensorsEventRegister.java:129)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
                                        at java.lang.Iterable.forEach(Iterable.java:75)[:1.8.0_131]
                                        at org.openhab.binding.mysensors.internal.event.MySensorsEventRegister.notifyNodeUpdateEvent(MySensorsEventRegister.java:125)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
                                        at org.openhab.binding.mysensors.internal.gateway.MySensorsGateway.handleSetReqMessage(MySensorsGateway.java:566)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
                                        at org.openhab.binding.mysensors.internal.gateway.MySensorsGateway.handleIncomingMessage(MySensorsGateway.java:461)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
                                        at org.openhab.binding.mysensors.internal.gateway.MySensorsGateway.messageReceived(MySensorsGateway.java:372)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
                                        at org.openhab.binding.mysensors.internal.event.MySensorsEventRegister.lambda$1(MySensorsEventRegister.java:85)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
                                        at java.lang.Iterable.forEach(Iterable.java:75)[:1.8.0_131]
                                        at org.openhab.binding.mysensors.internal.event.MySensorsEventRegister.notifyMessageReceived(MySensorsEventRegister.java:81)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
                                        at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:365)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
                                        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_131]
                                        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
                                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
                                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
                                        at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
                                

                                I had no success at all trying to define the things via the things file. I described my setup and the problem here. (Short version: definition via node id doesn't seem to work for me and I have no idea what items/sitemaps to use to control the rgbw nodes).
                                Any help would be great (@TimO )

                                1 Reply Last reply
                                0
                                • tbowmoT tbowmo

                                  @TimO

                                  Trying openhab2 out.. Fresh install, with both serial and mysensors binding installed.

                                  I'm using socat to make a virtual comport to node-red

                                  In the openhab logs I see a lot of errors like

                                  15:04:07.252 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
                                  15:04:07.379 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                                  java.io.IOException: Underlying input stream returned zero bytes
                                  	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                                  	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                                  	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                                  	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                                  	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                                  	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                                  	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                                  	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                                  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                                  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                                  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                                  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                                  	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                                  15:04:07.680 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                                  java.io.IOException: Underlying input stream returned zero bytes
                                  	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                                  	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                                  	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                                  	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                                  	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                                  	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                                  	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                                  	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                                  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                                  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                                  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                                  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                                  	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                                  

                                  I can see that the gateway indeed does answer to the 0;0;3;0;2 request, and the reply is also send on to openhab2.

                                  I have tried to disable startup checks, but I get ERROR 409: conflict as a toast message in the lower right corner of paperui when I try to save settings.

                                  Anything I have missed somewhere?

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

                                  @tbowmo

                                  1. How are socat and node-red linked? Please post the full socat command. I'm using socat -d -d pty,raw,echo=0 pty,raw,echo=0 to fake a serial port to test the binding.

                                  2. Does the binding recover after the exception is thrown. If message is received that is not expected (0 size length, wrong format etc) an exception is thrown, but the next message that is received should work just fine. The binding should recover from "wrong" message.

                                  3. Is DEBUG enabled? --> log:set DEBUG org.openhab.binding.mysensors

                                  4. I've not yet seen the ERROR 409: conflict toast message. Are there any hints in the log what is going on there? Maybe there are exceptions at startup of openhab2?

                                  1 Reply Last reply
                                  0
                                  • M MagnusF

                                    @Feji
                                    Thanks for your replay! But unfortunately, that was not an answer to my thoughts.

                                    1. You say "This version..." Do you mean to use two "MySensors Serial Gateways" connected to one controller with OpenHAB?
                                      Does this mean that if I connect one more "MySensor Serial Gateway" to my controller that I will have one more "MySensor Serial Gateway" thing but with another bridge definition?
                                    2. In the file "org.eclipse.smarthome.core.thing.Thing.json" there are no things defined with i.e. nodeid="1" and childid="2" it looks like this
                                      "mysensors:temperature:709db93f:temperature_2_1" i.e. nodeid 2 childid 1. Do I look in the wrong file?
                                    T Offline
                                    T Offline
                                    TimO
                                    Hero Member
                                    wrote on last edited by
                                    #23

                                    @MagnusF said in openHAB 2.2 binding:

                                    You say "This version..." Do you mean to use two "MySensors Serial Gateways" connected to one controller with OpenHAB?
                                    Does this mean that if I connect one more "MySensor Serial Gateway" to my controller that I will have one more "MySensor Serial Gateway" thing but with another bridge definition?

                                    This special version is only needed, if you're using another binding that also uses a serial device (RFXCOM, zwave, ebus ...). Two serial gateways with the MySensors binding work just fine. And yes, you are able to use more than one bridge/gateway. (I'm using: 1x RF24 Ethernet, 1x RFM69 Ethernet, 1x Serial gateway)

                                    In the file "org.eclipse.smarthome.core.thing.Thing.json" there are no things defined with i.e. nodeid="1" and childid="2" it looks like this
                                    "mysensors:temperature:709db93f:temperature_2_1" i.e. nodeid 2 childid 1. Do I look in the wrong file?

                                    If you have used an older version of the MySensors binding and have configured the things via PaperUI the old configuration won't work with the new releases of the binding. The old configuration still works with the old binding (2.1). The safest way to switch to the new binding / configuration is to delete the old items and discover them again. It should be possible to migrate the jsondb file, but I've not done this before, so I can't help you there.

                                    1 Reply Last reply
                                    0
                                    • tbowmoT Offline
                                      tbowmoT Offline
                                      tbowmo
                                      Admin
                                      wrote on last edited by
                                      #24

                                      @TimO

                                      The ERROR 409 was because I had defined the binding in a things file, and then tried to use paper ui to add sensors, apparently that is not allowed..

                                      I use

                                      socat PTY,link=/dev/ttyS81,mode=666,group=dialout,raw PTY,link=/dev/ttyUSB21,mode=666,group=dialout,raw
                                      

                                      To start socat up, nodered is listening on ttyS81, and openhab is on ttyUSB21.

                                      I have now deleted the things file, and configured the gateway through paperui, I have disabled startup check so the gateway seems to be online.

                                      If I do a cat /dev/ttyUSB21 I get the data from the gateway, so node-red is passing on the data without problems.

                                      But openhab still spews out errors in the log every other second or so:

                                      21:13:46.531 [DEBUG] [col.serial.MySensorsSerialConnection] - Request disconnection flag setted to: true
                                      21:13:48.097 [INFO ] [col.serial.MySensorsSerialConnection] - Connection request disconnection...
                                      21:13:48.097 [DEBUG] [col.serial.MySensorsSerialConnection] - Request disconnection flag setted to: false
                                      21:13:48.098 [DEBUG] [col.serial.MySensorsSerialConnection] - Shutting down serial connection!
                                      21:13:48.098 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Stopping Writer thread
                                      21:13:48.099 [WARN ] [rsAbstractConnection$MySensorsWriter] - Interrupted MySensorsWriter
                                      21:13:48.099 [DEBUG] [rsAbstractConnection$MySensorsReader] - Stopping Reader thread
                                      21:13:48.099 [WARN ] [rsAbstractConnection$MySensorsReader] - Interrupted MySensorsReader
                                      21:13:48.143 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to OFFLINE for device: mysensors:humidity:9f16ca21
                                      21:13:48.145 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to OFFLINE for device: mysensors:humidity:8124dc86
                                      21:13:48.146 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [9,10]
                                      21:13:48.146 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to OFFLINE for device: mysensors:temperature:6b7baead
                                      21:13:48.146 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:humidity:9f16ca21' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
                                      21:13:48.151 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:temperature:6b7baead' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
                                      21:13:48.152 [DEBUG] [col.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB21 [baudRate:115200]
                                      21:13:48.157 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:humidity:8124dc86' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
                                      21:13:48.157 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:temperature:6b7baead' changed from OFFLINE (BRIDGE_OFFLINE) to OFFLINE
                                      21:13:48.160 [DEBUG] [col.serial.MySensorsSerialConnection] - Successfully connected to serial port.
                                      21:13:48.163 [DEBUG] [col.serial.MySensorsSerialConnection] - Waiting 3 seconds to allow correct reset trigger on serial connection opening
                                      21:13:48.166 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:humidity:8124dc86' changed from OFFLINE (BRIDGE_OFFLINE) to OFFLINE
                                      21:13:48.167 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-ser:53441a70' changed from ONLINE to OFFLINE
                                      21:13:48.173 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:temperature:6b7baead' changed from OFFLINE (COMMUNICATION_ERROR) to OFFLINE (BRIDGE_OFFLINE)
                                      21:13:48.174 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:humidity:9f16ca21' changed from OFFLINE (BRIDGE_OFFLINE) to OFFLINE
                                      21:13:48.178 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:humidity:8124dc86' changed from OFFLINE (COMMUNICATION_ERROR) to OFFLINE (BRIDGE_OFFLINE)
                                      21:13:48.182 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:humidity:9f16ca21' changed from OFFLINE (COMMUNICATION_ERROR) to OFFLINE (BRIDGE_OFFLINE)
                                      21:13:51.166 [WARN ] [col.serial.MySensorsSerialConnection] - Skipping I_VERSION connection test, not recommended...
                                      21:13:51.169 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:humidity:9f16ca21
                                      21:13:51.174 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [9,10]
                                      21:13:51.174 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:humidity:8124dc86
                                      21:13:51.175 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:temperature:6b7baead
                                      21:13:51.186 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 10-0 not registered yet, registering...
                                      21:13:51.190 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 9-1 not registered yet, registering...
                                      21:13:51.185 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 10-1 not registered yet, registering...
                                      21:13:51.175 [INFO ] [col.serial.MySensorsSerialConnection] - Successfully connected to MySensors Bridge.
                                      21:13:51.195 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-ser:53441a70' changed from OFFLINE to ONLINE
                                      21:13:51.199 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:humidity:9f16ca21' changed from OFFLINE to ONLINE
                                      21:13:51.202 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:temperature:6b7baead' changed from OFFLINE to ONLINE
                                      21:13:51.203 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:humidity:8124dc86' changed from OFFLINE to ONLINE
                                      21:13:51.275 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                                      java.io.IOException: Underlying input stream returned zero bytes
                                      	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                                      	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                                      	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                                      	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                                      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                                      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                                      	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                                      21:13:52.229 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                                      java.io.IOException: Underlying input stream returned zero bytes
                                      	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                                      	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                                      	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                                      	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                                      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                                      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                                      	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                                      21:13:52.552 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                                      java.io.IOException: Underlying input stream returned zero bytes
                                      	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                                      	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                                      	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                                      	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                                      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                                      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                                      	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                                      21:13:54.392 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                                      java.io.IOException: Underlying input stream returned zero bytes
                                      	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                                      	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                                      	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                                      	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                                      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                                      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                                      	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                                      21:13:56.816 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                                      java.io.IOException: Underlying input stream returned zero bytes
                                      	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                                      	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                                      	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                                      	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                                      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                                      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                                      	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                                      21:13:57.963 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
                                      java.io.IOException: Underlying input stream returned zero bytes
                                      	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0]
                                      	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0]
                                      	at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0]
                                      	at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0]
                                      	at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0]
                                      	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[186:org.openhab.binding.mysensors:2.2.0.201707241115]
                                      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0]
                                      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0]
                                      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0]
                                      	at java.lang.Thread.run(Thread.java:744)[:1.8.0]
                                      
                                      1 Reply Last reply
                                      0
                                      • tbowmoT Offline
                                        tbowmoT Offline
                                        tbowmo
                                        Admin
                                        wrote on last edited by
                                        #25

                                        @TimO

                                        Found my issue after digging through both openhab and nodered..

                                        I had forgotten to add /n to data sent out on the virtual serial port towards openhab. As soon as I added that, then everything was working..

                                        Now, I just have to grasp the concept in openhab, which might take some time.

                                        1 Reply Last reply
                                        0
                                        • P philro

                                          Hi,
                                          thanks for the new Version! I've got a Problem with the Network Sanity Check, it doesn't run.

                                          I got a ESP8266 Based Ethernet Gateway which is configured with DHCP. Everytime the DHCP Lease got renewed the Connection between the Gateway and openHAB is lost for a short Time. The Binding doesnt' recognize this. The Gateway and all Sensors marked as Online but not a single Message comes from the Gateway. I could also reproduce this if i reboot the Gateway.

                                          I tried different Settings for the Sanity Check but nothing worked.
                                          I switched to Debug-logging for the Binding. After the Connection is lost, not a single Log Entry is written.

                                          If i go into the Settings from the Gateway thing and change something, the binding start to communicate with the Gateway again, but all Sensors marked as offline in openHAB. There are incoming Messages from Sensors but the Binding write to log:

                                          20:35:10.030 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 5;2;1;0;1;67.9
                                          20:35:10.036 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 5 found in gateway
                                          20:35:10.041 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 2 not present in node 5
                                          

                                          if i restart whole openHAB all is functional again until the next time this occurs.

                                          Thanks for help,
                                          Greets Phil

                                          Edit: I also get the same Log entries as above if i change a Setting from the sanity check, without rebooting the Gateway.

                                          S Offline
                                          S Offline
                                          syren
                                          wrote on last edited by syren
                                          #26

                                          @philro I have the same issue on the 2.2 binding: when the esp8266 based ethernet gateway is restartet, only restarting the Openhab service to appears to restore communication between openhab and the gateway

                                          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