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
    #49

    @TimO Hope you had a nice vacation!
    Is there already some new version of the binding to test?

    I was on vacation too lately and when I powered my openhab system back on I got lots of problems with my gateway and sensor connections. First I got a never ending circle of failing startup checks (although I could already switch lights). After I disabled the check it seemed to work. But when restarting a sensor node (that did not send any values after the controller restart) I got this error:

    16:55:54.552 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;159004 Skipping security for command 3 type 16
    16:55:54.604 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;159011 TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    16:55:54.747 [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_144]
            at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0_144]
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0_144]
            at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0_144]
            at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0_144]
            at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0_144]
            at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0_144]
            at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[205:org.openhab.binding.mysensors:2.2.0.201707241115]
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_144]
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_144]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144]
            at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]
    

    Any idea why or how to fix this? Everything was working fine before

    PS I also just got another error while switching a light (the light still worked though):

    
    17:08:31.549 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
    java.text.ParseException: class java.text.ParseException : Message length is not > 4
            at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[205:org.openhab.binding.mysensors:2.2.0.201707241115]
            at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[205:org.openhab.binding.mysensors:2.2.0.201707241115]
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_144]
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_144]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144]
            at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]
    17:08:31.678 [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_144]
            at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0_144]
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0_144]
            at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0_144]
            at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0_144]
            at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0_144]
            at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0_144]
            at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:335)[205:org.openhab.binding.mysensors:2.2.0.201707241115]
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_144]
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_144]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144]
            at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]
    
    1 Reply Last reply
    0
    • L Offline
      L Offline
      LastSamurai
      Hardware Contributor
      wrote on last edited by
      #50

      Ok I reflashed the gateway and it's gotten a little better. Still have some errors though.

      T 1 Reply Last reply
      0
      • L LastSamurai

        Ok I reflashed the gateway and it's gotten a little better. Still have some errors though.

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

        Hi @LastSamurai !

        You've debug enabled on the gateway, have you? Looks like the binding does not like the (debug) output from the gateway.
        But the binding should recover just fine from the exception, only the (debug) message that has lead to this exception won't be parsed.

        L 1 Reply Last reply
        0
        • T TimO

          Hi @LastSamurai !

          You've debug enabled on the gateway, have you? Looks like the binding does not like the (debug) output from the gateway.
          But the binding should recover just fine from the exception, only the (debug) message that has lead to this exception won't be parsed.

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

          Wow, you are right of course. Debugging is indeed enabled... but than I can just ignore the errors, thank you.
          @TimO said in openHAB 2.2 binding:

          Hi @LastSamurai !

          You've debug enabled on the gateway, have you? Looks like the binding does not like the (debug) output from the gateway.
          But the binding should recover just fine from the exception, only the (debug) message that has lead to this exception won't be parsed.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            LastSamurai
            Hardware Contributor
            wrote on last edited by
            #53

            So I disabled debug output on the gateway to avoid the error messages but I still have problems with my setup. I used to have a motion sensor that worked with openhab. Now when the sensor sends a motion event to the gateway nothing happens in openhab.

            Part of the log of the motion sensor:

            6236 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
            6307 MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255
            6367 TSF:TDI:TSL
            6385 MCO:SLP:WUP=-1
            6406 TSF:TRI:TSB
            6424 MCO:SLP:MS=86400000,SMS=0,I1=1,M1=1,I2=255,M2=255
            6481 TSF:TDI:TSL
            6500 MCO:SLP:WUP=1
            6520 TSF:TRI:TSB
            6541 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
            6612 MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255
            6670 TSF:TDI:TSL
            

            So it seems like the message gets send succesfully but on the openhab log I see no mentioning of that (although I enable debug output for mysensors and I can switch on/off some led nodes). Any ideas why? I really want to get this working again.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              LastSamurai
              Hardware Contributor
              wrote on last edited by
              #54

              Sorry for bothering you guys, I figured out the problem: I have installed domoticz on the same raspberry and after a restart I forgot to turn it off. So all the missing data was "hidden" away by domoticz instead of openhab.

              T 1 Reply Last reply
              0
              • L LastSamurai

                Sorry for bothering you guys, I figured out the problem: I have installed domoticz on the same raspberry and after a restart I forgot to turn it off. So all the missing data was "hidden" away by domoticz instead of openhab.

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

                @LastSamurai :smile:
                I'm glad you've found the problem, I was out of ideas. ;-)

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  LastSamurai
                  Hardware Contributor
                  wrote on last edited by
                  #56

                  The problem is that the motion sensor still doesn't show up at the gateway although it gets an answer from it. I disabled domoticz though so I need to find another reason ;( Earlier it showed up in domoticz ... strange. I will try to change the id and see if OH picks it up then.
                  Btw @TimO Any idea yet when you will be able to work on the github issues I posted?

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    gonzalonal
                    wrote on last edited by gonzalonal
                    #57

                    Hi @TimO and @andreacioni.
                    Back in the day link we discussed about request type of messages being supported by the binding and the complex scenario it created.
                    Are there any plans to continue developing this feature?

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

                      @LastSamurai I can't say when I'm able to solve those issues.

                      According the ACK problem I need to enable ACK support in my network at home, which was something I already wanted to do a long time ago but haven't found the time yet.

                      The RGBW is a tough nut for me. I don't have a RGBW node to test with and the conversion HSB <=> RGBW is driving me crazy. The algorithm for the conversion can be found here: https://github.com/tobof/openhab2-addons/blob/MySensors_Binding/addons/binding/org.openhab.binding.mysensors/src/main/java/org/openhab/binding/mysensors/converter/MySensorsRGBWTypeConverter.java

                      @gonzalonal May I ask you to add an issue on github? This would allow me track those enhancement requests. Thank you!

                      1 Reply Last reply
                      1
                      • G Offline
                        G Offline
                        gonzalonal
                        wrote on last edited by gonzalonal
                        #59

                        Yes, sure. I'll do that to keep track.

                        By the way, I have RGBW led strip and I am using it with mysensors with no issues. Would you mind telling me what's wrong so I can recreate the scenario?

                        L 1 Reply Last reply
                        0
                        • G gonzalonal

                          Yes, sure. I'll do that to keep track.

                          By the way, I have RGBW led strip and I am using it with mysensors with no issues. Would you mind telling me what's wrong so I can recreate the scenario?

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

                          @gonzalonal said in openHAB 2.2 binding:

                          Yes, sure. I'll do that to keep track.

                          By the way, I have RGBW led strip and I am using it with mysensors with no issues. Would you mind telling me what's wrong so I can recreate the scenario?

                          You can find the issues here. Basically you (I ;)) can't set RGBW nodes to display pure white colors via openhab, dimming is not working (error confirmed by TimO) and most importantly ACK isn't working properly (for me at least). If you can help with any of this (especially the conversion HSB <=> RGBW) you are most welcome.

                          G 1 Reply Last reply
                          0
                          • L LastSamurai

                            @gonzalonal said in openHAB 2.2 binding:

                            Yes, sure. I'll do that to keep track.

                            By the way, I have RGBW led strip and I am using it with mysensors with no issues. Would you mind telling me what's wrong so I can recreate the scenario?

                            You can find the issues here. Basically you (I ;)) can't set RGBW nodes to display pure white colors via openhab, dimming is not working (error confirmed by TimO) and most importantly ACK isn't working properly (for me at least). If you can help with any of this (especially the conversion HSB <=> RGBW) you are most welcome.

                            G Offline
                            G Offline
                            gonzalonal
                            wrote on last edited by gonzalonal
                            #61

                            Please kindly check my contribution in the git issue. Maybe it will help to clarify your issues.

                            @LastSamurai said in openHAB 2.2 binding:

                            @gonzalonal said in openHAB 2.2 binding:

                            Yes, sure. I'll do that to keep track.

                            By the way, I have RGBW led strip and I am using it with mysensors with no issues. Would you mind telling me what's wrong so I can recreate the scenario?

                            You can find the issues here. Basically you (I ;)) can't set RGBW nodes to display pure white colors via openhab, dimming is not working (error confirmed by TimO) and most importantly ACK isn't working properly (for me at least). If you can help with any of this (especially the conversion HSB <=> RGBW) you are most welcome.

                            1 Reply Last reply
                            1
                            • L Offline
                              L Offline
                              LastSamurai
                              Hardware Contributor
                              wrote on last edited by
                              #62

                              @gonzalonal I saw it earlier but did not understand it fully. I will take another look at it later.

                              @TimO I might have found the error... maybe. I reflashed the motion sensor (with cleared eeprom before) and removed the static id and signing. Now I see that the problem seems to be that the node is unable to get an ID. Any idea what's happening herer? Is there a setting concerning that somewhere?

                              Log from the node:

                              ...
                              102477 TSM:FAIL:RE-INIT
                              102479 TSM:INIT
                              102488 TSM:INIT:TSP OK
                              102490 TSM:FPAR
                              102492 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                              103426 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
                              103432 TSF:MSG:FPAR OK,ID=0,D=1
                              104501 TSM:FPAR:OK
                              104503 TSM:ID
                              104503 TSM:ID:REQ
                              104507 TSF:MSG:SEND,255-255-0-0,s=55,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                              106516 TSM:ID
                              106516 TSM:ID:REQ
                              106520 TSF:MSG:SEND,255-255-0-0,s=20,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                              108529 TSM:ID
                              108529 TSM:ID:REQ
                              108533 TSF:MSG:SEND,255-255-0-0,s=241,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                              110542 TSM:ID
                              110542 TSM:ID:REQ
                              110546 TSF:MSG:SEND,255-255-0-0,s=206,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                              112556 !TSM:ID:FAIL
                              112558 TSM:FAIL:CNT=6
                              112560 TSM:FAIL:DIS
                              112562 TSF:TDI:TSL
                              ...
                              

                              Log from the openhab server:

                              15:21:32.127 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;34;3;0;3;
                              15:21:34.135 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;0;3;0;3;
                              15:21:36.147 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;221;3;0;3;
                              ...
                              

                              and lots more similar requests with different ids.

                              T 1 Reply Last reply
                              0
                              • L LastSamurai

                                @gonzalonal I saw it earlier but did not understand it fully. I will take another look at it later.

                                @TimO I might have found the error... maybe. I reflashed the motion sensor (with cleared eeprom before) and removed the static id and signing. Now I see that the problem seems to be that the node is unable to get an ID. Any idea what's happening herer? Is there a setting concerning that somewhere?

                                Log from the node:

                                ...
                                102477 TSM:FAIL:RE-INIT
                                102479 TSM:INIT
                                102488 TSM:INIT:TSP OK
                                102490 TSM:FPAR
                                102492 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                103426 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
                                103432 TSF:MSG:FPAR OK,ID=0,D=1
                                104501 TSM:FPAR:OK
                                104503 TSM:ID
                                104503 TSM:ID:REQ
                                104507 TSF:MSG:SEND,255-255-0-0,s=55,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                                106516 TSM:ID
                                106516 TSM:ID:REQ
                                106520 TSF:MSG:SEND,255-255-0-0,s=20,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                                108529 TSM:ID
                                108529 TSM:ID:REQ
                                108533 TSF:MSG:SEND,255-255-0-0,s=241,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                                110542 TSM:ID
                                110542 TSM:ID:REQ
                                110546 TSF:MSG:SEND,255-255-0-0,s=206,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
                                112556 !TSM:ID:FAIL
                                112558 TSM:FAIL:CNT=6
                                112560 TSM:FAIL:DIS
                                112562 TSF:TDI:TSL
                                ...
                                

                                Log from the openhab server:

                                15:21:32.127 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;34;3;0;3;
                                15:21:34.135 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;0;3;0;3;
                                15:21:36.147 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;221;3;0;3;
                                ...
                                

                                and lots more similar requests with different ids.

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

                                @LastSamurai Upgrade the binding. You're using the current beta of MySensors and the request for I'd has changed.

                                L 1 Reply Last reply
                                0
                                • T TimO

                                  @LastSamurai Upgrade the binding. You're using the current beta of MySensors and the request for I'd has changed.

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

                                  @TimO Ahh thank you! I am using version 2.2 linked in the first post of this thread though. Where do I get a newer version? Maybe I overlooked it but I am not seeing any newer releases.

                                  T 1 Reply Last reply
                                  0
                                  • L LastSamurai

                                    @TimO Ahh thank you! I am using version 2.2 linked in the first post of this thread though. Where do I get a newer version? Maybe I overlooked it but I am not seeing any newer releases.

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

                                    @LastSamurai just replace the jar from the link above. I'm doing small changes from time to time.

                                    L 1 Reply Last reply
                                    0
                                    • T TimO

                                      @LastSamurai just replace the jar from the link above. I'm doing small changes from time to time.

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

                                      @TimO Thank you again for the help. Everything is now back up and running :+1: With the new jar my node could finally get a new id and after also enabling signing again everything worked as expected.
                                      Can I see anywhere that you updated the jar file? I am using the current beta of mysensors mostly so I would also need to use an updated version of the openhab plugin.

                                      1 Reply Last reply
                                      0
                                      • N Offline
                                        N Offline
                                        Nicklas Starkel
                                        wrote on last edited by
                                        #67

                                        @TimO , is this binding supported via mysensors MQTT gateway?
                                        In previous bending inormation you had some text indicating that you would implement it. But all that is gone.
                                        So I'm thinking you either implemented it, or aborted that feature :)

                                        T 1 Reply Last reply
                                        0
                                        • N Nicklas Starkel

                                          @TimO , is this binding supported via mysensors MQTT gateway?
                                          In previous bending inormation you had some text indicating that you would implement it. But all that is gone.
                                          So I'm thinking you either implemented it, or aborted that feature :)

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

                                          @Nicklas-Starkel It happens, that MQTT support is sadly still on the to do list. There were some changes in the Smarthome MQTT library and we need to adopt them now.

                                          Here's the Issue: https://github.com/tobof/openhab2-addons/issues/98

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


                                          22

                                          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