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.
  • T TimO

    @the-trung yes, the binding seems to be installed. Serial transport is needed for MySensors. I'm not able to answer questions about mcp binding.

    RVMRVMR Offline
    RVMRVMR Offline
    RVMRVM
    wrote on last edited by RVMRVM
    #462

    @TimO Hey all, looks everything seems to work now, but now i have defined the bindings by the paper UI, and work with the rule definition as show by 'doctor64' ....
    thanks for the help
    Roger

    T 1 Reply Last reply
    0
    • FusedHe3F FusedHe3

      Hi @TimO,

      I also tried the RGB Light and it seems to be working! (I am using Maghac's RGB LED strip sketch)
      Auto discovery worked instantly. I did have to work with the .items file to get the color picker instead of a text input. I also get these two errors every time I send a command:

      16:57:36.770 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'rgbLight01' received command 124,89,100
      16:57:36.809 [INFO ] [marthome.event.ItemStateChangedEvent] - rgbLight01 changed from 359,91,100 to 124,89,100
      16:57:37.117 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable 2 not present
      16:57:37.222 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable 3 not present
      

      As I'm relatively new to MySensors, I was wondering if it is normal that the RGB Light Sensor channel is used for this. Or is this just temporary until an actual RGB channel is made?

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

      @FusedHe3 Thank you for testing and your input!

      The sketch you are using is representing itself as a RGB sensor and the log you've posted looks good.

      About the fiddling with the .items file and the color picker: Thank you! That should'nt be needed anymore, I've changed it here: RGB-Test-Binding

      FusedHe3F 2 Replies Last reply
      0
      • RVMRVMR RVMRVM

        @TimO Hey all, looks everything seems to work now, but now i have defined the bindings by the paper UI, and work with the rule definition as show by 'doctor64' ....
        thanks for the help
        Roger

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

        @RVMRVM The definitions carlyler posted looks fine and I've tried to implement this logic into the binding so you won't need the rule anymore. Feel free to test my binding or stay with the rule. Hopefully both would lead to the same result. :)

        RVMRVMR 1 Reply Last reply
        0
        • D doctor64

          Hello!
          I just started to play with OpenHab2 and new binding? thank you for great work.
          But, i discover some strange behavior:
          Openhab2, ethernet gateway, 3 mysensor nodes, all nodes sucessfully detected and configured in PaperUI, but some data looks like not updated. Looking to log i note some suspicious lines like:

          00:28:47.077 [DEBUG] [rsAbstractConnection$MySensorsReader] - 3;1;1;0;0;24.6
          00:28:47.078 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
          00:28:47.078 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 3
          00:28:47.078 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable 0 not present
          

          Sorry, i don't know how to dump OpenHab configuration, but item configured.
          Any suggestions?

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

          Hey @doctor64 !

          Please open a new topic. This one is getting really huge. :-)

          Please check if the temperature channel is linked. In PaperUI you may do this by moving to "Configuration" -> "Things" and click on the sensor data.

          D 1 Reply Last reply
          0
          • T TimO

            @FusedHe3 Thank you for testing and your input!

            The sketch you are using is representing itself as a RGB sensor and the log you've posted looks good.

            About the fiddling with the .items file and the color picker: Thank you! That should'nt be needed anymore, I've changed it here: RGB-Test-Binding

            FusedHe3F Offline
            FusedHe3F Offline
            FusedHe3
            wrote on last edited by
            #466

            @TimO No problem, glad to help!

            I'll try to alter the sketch and use the new version of the binding as soon as I have my LED strip running again.

            1 Reply Last reply
            0
            • T TimO

              @RVMRVM The definitions carlyler posted looks fine and I've tried to implement this logic into the binding so you won't need the rule anymore. Feel free to test my binding or stay with the rule. Hopefully both would lead to the same result. :)

              RVMRVMR Offline
              RVMRVMR Offline
              RVMRVM
              wrote on last edited by RVMRVM
              #467

              @TimO Perfect, is OK for RGB & RGBW... but now the datastring you send is a decimal string, not a HEX-string as they used normal, it is not a big problem to change this feature in the node script, if you want to have a decimal string.
              How do you handle the white color, becaus this is not included in the datastring info. maybe by a switch and a other variable .
              something like this:

              0_1497272329084_upload-bc139de4-29ff-4760-ac5e-7746249546fc

              Roger

              T 1 Reply Last reply
              0
              • RVMRVMR RVMRVM

                @TimO Perfect, is OK for RGB & RGBW... but now the datastring you send is a decimal string, not a HEX-string as they used normal, it is not a big problem to change this feature in the node script, if you want to have a decimal string.
                How do you handle the white color, becaus this is not included in the datastring info. maybe by a switch and a other variable .
                something like this:

                0_1497272329084_upload-bc139de4-29ff-4760-ac5e-7746249546fc

                Roger

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

                @RVMRVM Interesting. Do you have a corresponding log for me?

                Here's my test:

                [INFO ] [arthome.event.ItemCommandEvent:43   ] - Item 'mysensors_rgbLight_8a7ca179_rgblight_199_0_rgb' received command 71,46,91
                [DEBUG] [.c.thing.internal.ThingManager:366  ] - Delegating command '71,46,91' for item 'mysensors_rgbLight_8a7ca179_rgblight_199_0_rgb' to handler for channel 'mysensors:rgbLight:8a7ca179:rgblight_199_0:rgb'
                [DEBUG] [.m.c.MySensorsRGBTypeConverter:63   ] - Converting RGB Int to Hex: R d4, G e8, B 7d
                [DEBUG] [b.m.i.gateway.MySensorsGateway:563  ] - Node 199 found in gateway
                [DEBUG] [b.m.i.gateway.MySensorsGateway:567  ] - Child 0 found in node 199
                [DEBUG] [ractConnection$MySensorsWriter:524  ] - Sending to MySensors: 199;0;1;0;40;d4e87d
                
                RVMRVMR 2 Replies Last reply
                0
                • T TimO

                  @RVMRVM Interesting. Do you have a corresponding log for me?

                  Here's my test:

                  [INFO ] [arthome.event.ItemCommandEvent:43   ] - Item 'mysensors_rgbLight_8a7ca179_rgblight_199_0_rgb' received command 71,46,91
                  [DEBUG] [.c.thing.internal.ThingManager:366  ] - Delegating command '71,46,91' for item 'mysensors_rgbLight_8a7ca179_rgblight_199_0_rgb' to handler for channel 'mysensors:rgbLight:8a7ca179:rgblight_199_0:rgb'
                  [DEBUG] [.m.c.MySensorsRGBTypeConverter:63   ] - Converting RGB Int to Hex: R d4, G e8, B 7d
                  [DEBUG] [b.m.i.gateway.MySensorsGateway:563  ] - Node 199 found in gateway
                  [DEBUG] [b.m.i.gateway.MySensorsGateway:567  ] - Child 0 found in node 199
                  [DEBUG] [ractConnection$MySensorsWriter:524  ] - Sending to MySensors: 199;0;1;0;40;d4e87d
                  
                  RVMRVMR Offline
                  RVMRVMR Offline
                  RVMRVM
                  wrote on last edited by RVMRVM
                  #469

                  @TimO this is the log of the node:
                  15:33:19.326> 15054 TSF:MSG:READ,0-0-23,s=1,c=1,t=26,pt=0,l=10,sg=0:231,81,100
                  this is the result from the rule routine:
                  15:39:17.479> 10919 TSF:MSG:READ,0-0-23,s=1,c=1,t=26,pt=0,l=6,sg=0:FF5E28

                  1 Reply Last reply
                  0
                  • T TimO

                    Hey @doctor64 !

                    Please open a new topic. This one is getting really huge. :-)

                    Please check if the temperature channel is linked. In PaperUI you may do this by moving to "Configuration" -> "Things" and click on the sensor data.

                    D Offline
                    D Offline
                    doctor64
                    wrote on last edited by
                    #470

                    Hello @TimO !
                    I delete all things and items (btw, seems like items not deleted completely, and re-apperas after item re-create), create things again and not see error anymore. Some black magic in action, looks like.
                    I will create separate topic if this issue appears again. Thank you!

                    1 Reply Last reply
                    0
                    • T TimO

                      @FusedHe3 Thank you for testing and your input!

                      The sketch you are using is representing itself as a RGB sensor and the log you've posted looks good.

                      About the fiddling with the .items file and the color picker: Thank you! That should'nt be needed anymore, I've changed it here: RGB-Test-Binding

                      FusedHe3F Offline
                      FusedHe3F Offline
                      FusedHe3
                      wrote on last edited by
                      #471

                      @TimO Just tried the changes you made. Color picker now worked straight away! :smile:

                      I also checked the sketch and it seems to be declaring itself as an RGB Light, not as a sensor. But could it be that what I see in the PaperUI are just the labels that still need to be changed?

                      void presentation()
                      {
                        // Send the Sketch Version Information to the Gateway
                        sendSketchInfo(SN, SV);
                        present(CHILD_ID_LIGHT, S_RGB_LIGHT);
                      }
                      


                      One last question: the Variable 2 not present error I get everytime a command is send, is that because those two variables aren't set in the sketch I'm using?

                      Thanks!

                      T 1 Reply Last reply
                      0
                      • edsteveE Offline
                        edsteveE Offline
                        edsteve
                        wrote on last edited by
                        #472

                        Hi,

                        just a quick question:
                        OpenHab2 can be used without touching any code right?
                        I use mysensors serial gateway. Tried to set it up all day yesterday from skratch. Also with OpenHabian. But no success.
                        So it seems i still have to edit files and folders manually in order to get it running right?

                        I got Domoticz working after short time. Was expecting OpenHab2 makes it even more easy :/

                        T 1 Reply Last reply
                        0
                        • FusedHe3F FusedHe3

                          @TimO Just tried the changes you made. Color picker now worked straight away! :smile:

                          I also checked the sketch and it seems to be declaring itself as an RGB Light, not as a sensor. But could it be that what I see in the PaperUI are just the labels that still need to be changed?

                          void presentation()
                          {
                            // Send the Sketch Version Information to the Gateway
                            sendSketchInfo(SN, SV);
                            present(CHILD_ID_LIGHT, S_RGB_LIGHT);
                          }
                          


                          One last question: the Variable 2 not present error I get everytime a command is send, is that because those two variables aren't set in the sketch I'm using?

                          Thanks!

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

                          @FusedHe3 Please enable DEBUG mode in the karaf console and paste the output around Variable 2 not present here.

                          FusedHe3F 1 Reply Last reply
                          0
                          • edsteveE edsteve

                            Hi,

                            just a quick question:
                            OpenHab2 can be used without touching any code right?
                            I use mysensors serial gateway. Tried to set it up all day yesterday from skratch. Also with OpenHabian. But no success.
                            So it seems i still have to edit files and folders manually in order to get it running right?

                            I got Domoticz working after short time. Was expecting OpenHab2 makes it even more easy :/

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

                            @edsteve Yes, that's one goal of the binding. For the serial gateway the hardest part is to determine the path of the serial port. Something like: /dev/ttyUSB0 or /dev/ttyACM0 if you're using Linux.

                            What exactly does not work? Please attach a log from the karaf console.

                            1 Reply Last reply
                            0
                            • edsteveE Offline
                              edsteveE Offline
                              edsteve
                              wrote on last edited by edsteve
                              #475

                              @TimO
                              I use Nano Neo as Hardware with Armbian Linux and OpenHabian on top. The bundle:list showed me mysensors.
                              I don't find any Things. Where do i have to put this info: /dev/ttyUSB0 or /dev/ttyACM0?? In which config file?
                              Now i get an error with karaf saying "connection refused" when i try:

                              ssh -p 8101 openhab@localhost
                              

                              Yesterday it worked... the karaf thing make it even more difficult.

                              EDIT: I just found out that i have to make a demo.things file with the code for the serial gateway.... And for sure that was not the last file which needs manual editing. I go back to Domoticz. Till OpenHab becomes same easy.

                              1 Reply Last reply
                              0
                              • T TimO

                                @FusedHe3 Please enable DEBUG mode in the karaf console and paste the output around Variable 2 not present here.

                                FusedHe3F Offline
                                FusedHe3F Offline
                                FusedHe3
                                wrote on last edited by
                                #476

                                @TimO Thanks for investigating!
                                Here's the log, but I don't know if it's of any more help.

                                18:36:25.233 [DEBUG] [.converter.MySensorsRGBTypeConverter] - Converting RGB Int to Hex: R 05, G 71, B ff
                                18:36:25.295 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 10 found in gateway
                                18:36:25.321 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 10
                                18:36:25.408 [INFO ] [marthome.event.ItemStateChangedEvent] - RGBLEDStrip_Color changed from 15,100,100 to 214,98,100
                                18:36:25.346 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 10;1;1;0;40;0571ff
                                18:36:25.365 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'RGBLEDStrip_Color' received command 214,98,100
                                18:36:25.840 [DEBUG] [rsAbstractConnection$MySensorsReader] - 10;1;1;0;2;1
                                18:36:25.863 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 10 found in gateway
                                18:36:25.895 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 10
                                18:36:25.919 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable 2 not present
                                18:36:26.209 [DEBUG] [rsAbstractConnection$MySensorsReader] - 10;1;1;0;3;100
                                18:36:26.232 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 10 found in gateway
                                18:36:26.254 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 10
                                18:36:26.276 [WARN ] [rs.internal.gateway.MySensorsGateway] - Variable 3 not present
                                

                                I guess it may have something to do with a V_light and V_dimmer answer that is being send by the node. (As a reminder: I'm using this this one.)

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

                                  @TimO So I finally got around to testing the RGBW version of the plugin. I tested it with one sensor (light and the battery voltage) and an RGBW node.
                                  0_1497559852937_upload-304efabd-cb8d-431a-8287-a6203833c303

                                  Results:

                                  • RGBW color settings works well. Its a message of lengths 8 (e.g. 00ff5100) instead of the 9 from domoticz (#00ff5100). So I had to change my node's code. But your solution looks cleaner, so I guess thats fine :+1: What didn't work are all the other values beside "color". As you can see I changed the variable 1-4 and it gets send to the node as message type 24-27, which are custom variables... why did you use these?
                                  • RGBW on/off did not work. The "status" button does nothing. Log below. Would be nice to have a button to send on/off commands to the nodes.
                                  • Light and Voltage sensors seem to work just fine

                                  By the way, short question about openhab 2: what is the difference between things and items? Seems like items/sitemaps are used in the "old" frontends to display sensors/actors. Are things the same for the new paperUI? I have just used that one yet. And why do I have to declare the gateway in a file while the rest is auto discovered (also it seems like some of you also added their sensors to the file with the gateway definition)?
                                  Seems to be hard to find up-to-date easy information on these things, so thanks in advance for an explanation.

                                  Log from the status button:

                                  22:55:02.378 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'mysensors_rgbwLight_gateway_rgbwlight_10_1_status' received command OFF
                                  22:55:02.402 [WARN ] [ensors.handler.MySensorsThingHandler] - Variable not found, cannot handle command for thing mysensors:rgbwLight:gateway:rgbwlight_10_1 of type status
                                  22:55:02.440 [INFO ] [marthome.event.ItemStateChangedEvent] - mysensors_rgbwLight_gateway_rgbwlight_10_1_status changed from ON to OFF
                                  
                                  T 1 Reply Last reply
                                  0
                                  • L Offline
                                    L Offline
                                    LastSamurai
                                    Hardware Contributor
                                    wrote on last edited by
                                    #478

                                    By the way has someone running openhab together with an echo (alexa)? I am currently trying to use that combination and at least with the RGBW nodes there seems to be no reaction (yet) to the commands.

                                    1 Reply Last reply
                                    0
                                    • ? Offline
                                      ? Offline
                                      A Former User
                                      wrote on last edited by
                                      #479

                                      0_1497733545612_upload-12d1dea2-7f4f-4571-9891-5ca9c8864170
                                      Hello,
                                      With 2 nodes, first has 1 child with id 0 , second has 2 children, id 0 and id 1, I get the following in the logs. Second node is not picked up.
                                      Used the openhab2 zip and the jar from here http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.1.0-SNAPSHOT.jar for the installation.
                                      All the configuration was done from the paperui.
                                      Any thoughts ?
                                      Best regards,
                                      Romeo

                                      T 1 Reply Last reply
                                      0
                                      • ? A Former User

                                        0_1497733545612_upload-12d1dea2-7f4f-4571-9891-5ca9c8864170
                                        Hello,
                                        With 2 nodes, first has 1 child with id 0 , second has 2 children, id 0 and id 1, I get the following in the logs. Second node is not picked up.
                                        Used the openhab2 zip and the jar from here http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.1.0-SNAPSHOT.jar for the installation.
                                        All the configuration was done from the paperui.
                                        Any thoughts ?
                                        Best regards,
                                        Romeo

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

                                        @frg Please enter log:set DEBUG org.openhab.binding.mysensors in the karaf console and post the debug log of the binding here.

                                        1 Reply Last reply
                                        0
                                        • L LastSamurai

                                          @TimO So I finally got around to testing the RGBW version of the plugin. I tested it with one sensor (light and the battery voltage) and an RGBW node.
                                          0_1497559852937_upload-304efabd-cb8d-431a-8287-a6203833c303

                                          Results:

                                          • RGBW color settings works well. Its a message of lengths 8 (e.g. 00ff5100) instead of the 9 from domoticz (#00ff5100). So I had to change my node's code. But your solution looks cleaner, so I guess thats fine :+1: What didn't work are all the other values beside "color". As you can see I changed the variable 1-4 and it gets send to the node as message type 24-27, which are custom variables... why did you use these?
                                          • RGBW on/off did not work. The "status" button does nothing. Log below. Would be nice to have a button to send on/off commands to the nodes.
                                          • Light and Voltage sensors seem to work just fine

                                          By the way, short question about openhab 2: what is the difference between things and items? Seems like items/sitemaps are used in the "old" frontends to display sensors/actors. Are things the same for the new paperUI? I have just used that one yet. And why do I have to declare the gateway in a file while the rest is auto discovered (also it seems like some of you also added their sensors to the file with the gateway definition)?
                                          Seems to be hard to find up-to-date easy information on these things, so thanks in advance for an explanation.

                                          Log from the status button:

                                          22:55:02.378 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'mysensors_rgbwLight_gateway_rgbwlight_10_1_status' received command OFF
                                          22:55:02.402 [WARN ] [ensors.handler.MySensorsThingHandler] - Variable not found, cannot handle command for thing mysensors:rgbwLight:gateway:rgbwlight_10_1 of type status
                                          22:55:02.440 [INFO ] [marthome.event.ItemStateChangedEvent] - mysensors_rgbwLight_gateway_rgbwlight_10_1_status changed from ON to OFF
                                          
                                          T Offline
                                          T Offline
                                          TimO
                                          Hero Member
                                          wrote on last edited by
                                          #481

                                          @LastSamurai Thank you for the feedback!!

                                          I'm glad RGBW seems to work. :-)
                                          RGBW status indeed wasn't working, that definately was a bug and is fixed now (for RGB too).

                                          About your general questions:

                                          You don't have to define the gateway in the things file. It is not discovered automatically, as this is something that is not very easy to implement (i.e. search for serial connections on windows / linux, search for network devices, is it a gateway or not?)
                                          You may just use PaperUI: Configurations -> Things and hit the white plus sign in the blue circle and select serial or ethernet gateway. :-)

                                          When it comes to things and items: for me, a thing is a sensor. For example the RGBW sensor is a thing in the OpenHab world. There are a few channels (children) that are frequently found, when this sensor is used: one channel for RGBW, one for status and occasionally var1-var4 and battery. The thing is defined by its channels. The thing is a representation of the hardware in this case.
                                          The items are the representation for the UI and the user. The user uses the Color picker and the thing/hardware needs a string (#aabbccdd). There may be "hardware" behind an item but there is no need to. An example is the lastUpdate channel/item. The information is not send by the sensor, it is generated by the controller/binding.

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


                                          19

                                          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