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.0 binding

openHAB 2.0 binding

Scheduled Pinned Locked Moved OpenHAB
534 Posts 88 Posters 481.6k Views 99 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.
  • A Offline
    A Offline
    Andrew Currie
    wrote on last edited by
    #402

    After moving from my ubuntu laptop to RP3 I have had success!!
    Flashed the sd card with the latest openhabian, waited for everything to auto install on the RP3 and could then install the my sensors (ethernet) gateway on the pi and also open a karaf console to log openhab2 via a remote/headless ssh. My remote browser could open the paper ui via openhabianpi:8080 and I added the ethernet gateway successfully. Adding the motion sensor needed the node id 2 and child id 1 as set by the Arduino sketch. The light level sensor was then turned on and it just showed up as my sensors (2,2) in the paper ui inbox so this level of discovery works! The sensors now show tripped status/light level in the paper ui control.
    Looks like I can now progress to using My Sensors to control the mi-lights already working in openhab2.
    Thanks Tim for all your work on the binding

    1 Reply Last reply
    0
    • AndrewZA Offline
      AndrewZA Offline
      AndrewZ
      wrote on last edited by
      #403

      @TimO , I just noticed a weird behavior - I've changed configuration for another binding and restarted it from the console but that killed mysensors binding:

      2017-03-04 13:07:19.110 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'demo.things'
      2017-03-04 13:07:19.123 [ERROR] [col.serial.MySensorsSerialConnection] - Interrupted reset time wait
      2017-03-04 13:07:19.124 [WARN ] [col.serial.MySensorsSerialConnection] - Skipping I_VERSION connection test, not recommended...
      2017-03-04 13:07:19.125 [INFO ] [col.serial.MySensorsSerialConnection] - Successfully connected to MySensors Bridge.
      2017-03-04 13:07:19.125 [WARN ] [col.serial.MySensorsSerialConnection] - Network Sanity Checker thread disabled from bridge configuration

      2017-03-04 13:07:21.141 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
      2017-03-04 13:07:21.149 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
      2017-03-04 13:07:33.161 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
      2017-03-04 13:07:33.163 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:1)

      Complete stop/start of OH is the only solution so far.

      andreacioniA 1 Reply Last reply
      0
      • AndrewZA AndrewZ

        @TimO , I just noticed a weird behavior - I've changed configuration for another binding and restarted it from the console but that killed mysensors binding:

        2017-03-04 13:07:19.110 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'demo.things'
        2017-03-04 13:07:19.123 [ERROR] [col.serial.MySensorsSerialConnection] - Interrupted reset time wait
        2017-03-04 13:07:19.124 [WARN ] [col.serial.MySensorsSerialConnection] - Skipping I_VERSION connection test, not recommended...
        2017-03-04 13:07:19.125 [INFO ] [col.serial.MySensorsSerialConnection] - Successfully connected to MySensors Bridge.
        2017-03-04 13:07:19.125 [WARN ] [col.serial.MySensorsSerialConnection] - Network Sanity Checker thread disabled from bridge configuration

        2017-03-04 13:07:21.141 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
        2017-03-04 13:07:21.149 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
        2017-03-04 13:07:33.161 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
        2017-03-04 13:07:33.163 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:1)

        Complete stop/start of OH is the only solution so far.

        andreacioniA Offline
        andreacioniA Offline
        andreacioni
        wrote on last edited by
        #404

        Hi @AndrewZ , yes this is a known issue (I just openend an issue here) with the binding. Just out of curiosity, have you changed something in things file?

        AndrewZA 1 Reply Last reply
        0
        • andreacioniA andreacioni

          Hi @AndrewZ , yes this is a known issue (I just openend an issue here) with the binding. Just out of curiosity, have you changed something in things file?

          AndrewZA Offline
          AndrewZA Offline
          AndrewZ
          wrote on last edited by
          #405

          @andreacioni thank you
          Yes, it was a change in the .things file, but it was related to another binding.

          andreacioniA 1 Reply Last reply
          0
          • AndrewZA AndrewZ

            @andreacioni thank you
            Yes, it was a change in the .things file, but it was related to another binding.

            andreacioniA Offline
            andreacioniA Offline
            andreacioni
            wrote on last edited by
            #406

            @AndrewZ things file update trigger a reload of all binding declared inside it, nothing strange. ;) Follow the above link to keep track of the status of this issue.

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

              I just tried to get the openhab 2 binding up and running. I have a serial gateway and domoticz + openhab running on a pi. I stopped the domoticz service and installed the serial and mysensors addons for openhab like mentioned in the github readme (bundle:list showed them both). I also added the openhab user to the dialout group.
              I then created a demo.things file in config/things with

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

              The log of openhab shows these errors though:

              2017-03-19 00:03:59.855 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
              2017-03-19 00:03:59.897 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:46)
              

              Any idea why? This works just fine:

              cat /dev/ttyUSB0
              
              AndrewZA 1 Reply Last reply
              0
              • L LastSamurai

                I just tried to get the openhab 2 binding up and running. I have a serial gateway and domoticz + openhab running on a pi. I stopped the domoticz service and installed the serial and mysensors addons for openhab like mentioned in the github readme (bundle:list showed them both). I also added the openhab user to the dialout group.
                I then created a demo.things file in config/things with

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

                The log of openhab shows these errors though:

                2017-03-19 00:03:59.855 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
                2017-03-19 00:03:59.897 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:46)
                

                Any idea why? This works just fine:

                cat /dev/ttyUSB0
                
                AndrewZA Offline
                AndrewZA Offline
                AndrewZ
                wrote on last edited by AndrewZ
                #408

                @LastSamurai please check the group ownership

                $ ls -l /dev/ttyUSB0
                

                Make sure the port you're using is included in EXTRA_JAVA_OPTS as described here

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

                  Thank you, that helped! Should anyone ever face the same problem: after changing the EXTRA_JAVA_OPTS I also needed to restart openhab (more likely the java vm).

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

                    So openhab is running now and discovers my sensors when I restart them while scanning. My RGBW controller nodes pop up as RGBW sensors though. The on/off switch works, but what do I have to do to actually control the colors?
                    I tried editing the 4 variables but that doesn't seem to change the lights.

                    0_1490048386134_upload-9bf82cdd-ddd8-4249-973e-65bd30a3a959

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

                      @LastSamurai : What does your sketch expect? One ASCII formated RGB code like described here: https://www.mysensors.org/download/serial_api_20 or a value between 0 and 100% per color (r,g,b,w)? I see different implementations (in openhab and in mysensors) and maybe we have to adjust the binding.

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

                        @TimO Right, I guess thats the problem. I have written my sketch against domoticz, so it expects either a 6 bit hex string (rgb = e.g. ff00ff) or a 9 bit (idk why) rgbw hex string (e.g. #ff00ff00).
                        According to the mysensors docu "ff00ff00" would be right, I guess.

                        T RVMRVMR 2 Replies Last reply
                        0
                        • AndrewZA Offline
                          AndrewZA Offline
                          AndrewZ
                          wrote on last edited by
                          #413

                          Just noticed in the log:

                          [WARN ] [.discovery.MySensorsDiscoveryService] - Cannot automatic discover thing node: 0, child: 255 please insert it manually
                          

                          Is that normal or any additional configuration is needed?
                          Thanks!

                          T 1 Reply Last reply
                          0
                          • AndrewZA AndrewZ

                            Just noticed in the log:

                            [WARN ] [.discovery.MySensorsDiscoveryService] - Cannot automatic discover thing node: 0, child: 255 please insert it manually
                            

                            Is that normal or any additional configuration is needed?
                            Thanks!

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

                            @AndrewZ hmmmm, a child that represents itself with an id of 255 shouldn't exist. 255 is used for battery status for example. What's the message that comes in before that?

                            AndrewZA 1 Reply Last reply
                            1
                            • L LastSamurai

                              @TimO Right, I guess thats the problem. I have written my sketch against domoticz, so it expects either a 6 bit hex string (rgb = e.g. ff00ff) or a 9 bit (idk why) rgbw hex string (e.g. #ff00ff00).
                              According to the mysensors docu "ff00ff00" would be right, I guess.

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

                              @LastSamurai I'm working on a solution! RGB seems easy, but I haven't looked at RGBW. The Colopicker in OpenHAB only sends RGB.

                              L 1 Reply Last reply
                              0
                              • T TimO

                                @AndrewZ hmmmm, a child that represents itself with an id of 255 shouldn't exist. 255 is used for battery status for example. What's the message that comes in before that?

                                AndrewZA Offline
                                AndrewZA Offline
                                AndrewZ
                                wrote on last edited by
                                #416

                                @TimO here is the output:

                                2017-03-23 20:51:32.531 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
                                2017-03-23 20:51:33.754 [WARN ] [.discovery.MySensorsDiscoveryService] - Cannot automatic discover thing node: 0, child: 255 please insert it manually
                                2017-03-23 20:51:33.772 [INFO ] [al.protocol.ip.MySensorsIpConnection] - Successfully connected to MySensors Bridge.
                                
                                T 1 Reply Last reply
                                0
                                • AndrewZA AndrewZ

                                  @TimO here is the output:

                                  2017-03-23 20:51:32.531 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
                                  2017-03-23 20:51:33.754 [WARN ] [.discovery.MySensorsDiscoveryService] - Cannot automatic discover thing node: 0, child: 255 please insert it manually
                                  2017-03-23 20:51:33.772 [INFO ] [al.protocol.ip.MySensorsIpConnection] - Successfully connected to MySensors Bridge.
                                  
                                  T Offline
                                  T Offline
                                  TimO
                                  Hero Member
                                  wrote on last edited by
                                  #417

                                  @AndrewZ the message occurs right after startup and before the bridge gets connected?! Just ignore the message if everything else is working fine. :D
                                  I'll release the refactored version soon. It's already available via the new IoT marketplace.

                                  AndrewZA 1 Reply Last reply
                                  1
                                  • T TimO

                                    @AndrewZ the message occurs right after startup and before the bridge gets connected?! Just ignore the message if everything else is working fine. :D
                                    I'll release the refactored version soon. It's already available via the new IoT marketplace.

                                    AndrewZA Offline
                                    AndrewZA Offline
                                    AndrewZ
                                    wrote on last edited by
                                    #418

                                    @TimO yes, message occurs on startup and I'm already using version from marketplace, I see it as market:binding-3328323 - 1.0

                                    T 1 Reply Last reply
                                    0
                                    • AndrewZA AndrewZ

                                      @TimO yes, message occurs on startup and I'm already using version from marketplace, I see it as market:binding-3328323 - 1.0

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

                                      @AndrewZ oh okay! I will look at it!

                                      1 Reply Last reply
                                      0
                                      • T TimO

                                        @LastSamurai I'm working on a solution! RGB seems easy, but I haven't looked at RGBW. The Colopicker in OpenHAB only sends RGB.

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

                                        @TimO Cool, I'll test it once you are done. Domoticz only allows to either use the white channel or a RGB value (without the white) at the moment. Perhaps it can be done similarly in openhab.

                                        T 1 Reply Last reply
                                        0
                                        • L LastSamurai

                                          @TimO Cool, I'll test it once you are done. Domoticz only allows to either use the white channel or a RGB value (without the white) at the moment. Perhaps it can be done similarly in openhab.

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

                                          @LastSamurai Could you please take a look at this: https://github.com/tobof/openhab2-addons/issues/76 ?

                                          I've added the RGB & RGBW channels and because I'm not that confident about the RGBW implementation I'm kindly asking you to test the implementation and give me some feedback. :-)
                                          The conversion from HSB, which is used by OpenHAB2 internally, to RGBW left me pretty confused. ;-)

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


                                          20

                                          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