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 480.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.
  • L Offline
    L Offline
    LastSamurai
    Hardware Contributor
    wrote on last edited by
    #397

    Hi, just a short question as I haven't found any up to date information about it: I am thinking about switching from domoticz to openHab 2 (as I really like the new UIs and the auto discovery). I am using an ESP8266 based MQTT gateway. Does openhab 2 on a raspi work with Mysensors using MQTT and does it support the new sensors/actor types added Mysensors 2 (specially RGBW)?

    Thank you!

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Fabien
      wrote on last edited by
      #398

      Yes you can using proxy items and rules. see example here : https://github.com/mortommy/MySensorDioder
      But why not switching to ethernet/serial gateway with @TimO OH2 plugin ?

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

        Thanks @Fabien I have a serial gateway too, but I liked the idea of a MQTT gateway more because its much more flexible. Does Tims plugin not support MQTT? I wanted to use that.

        andreacioniA 1 Reply Last reply
        0
        • L LastSamurai

          Thanks @Fabien I have a serial gateway too, but I liked the idea of a MQTT gateway more because its much more flexible. Does Tims plugin not support MQTT? I wanted to use that.

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

          Hi @LastSamurai , currently Timo is working on MQTT gateway but I don't know precisely when it will be available to all.

          @TimO said in openHAB 2.0 binding:

          @Fabien Thank you for your feedback!
          And: I've waited for that question according firmware updates to come up. :-D

          I've looked into it and I'm very interested but till now there is only the implementation in the library, I've not seen an implementation in a binding. I'll continue to look at it, but with low priority. :-)

          Current priority list is:

          1. Include binding in OH2 repository.
          2. Test and include the big refactoring from @andreacioni .
          3. Add MQTT gateway (proof of concept working, full integration after refactoring).
          4. Add little feature requests, add sensors ...
          1 Reply Last reply
          0
          • L Offline
            L Offline
            LastSamurai
            Hardware Contributor
            wrote on last edited by
            #401

            Ok, I will keep an eye on this one and stay with the serial gateway for now.

            1 Reply Last reply
            0
            • 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
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          16

                                          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