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 479.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.
  • K Offline
    K Offline
    kolaf
    Hero Member
    wrote on last edited by
    #94

    Thanks, that was quick. However, something is not right:

    2015-11-23 17:47:17 [DEBUG] [i.DiscoveryServiceRegistryImpl:333  ] - Triggering scan for thing types '[mysensors:humidity, mysensors:temperature, mysensors:light, mysensors:multimeter, mysensors:power, mysensors:baro, mysensors:door, mysensors:motion, mysensors:smoke, mysensors:dimmer, mysensors:cover, mysensors:wind, mysensors:rain, mysensors:uv, mysensors:weight, mysensors:distance, mysensors:light-level]' on 'MySensorsDiscoveryService'...
    2015-11-23 17:47:17 [ERROR] [i.DiscoveryServiceRegistryImpl:339  ] - Cannot trigger scan for thing types '[mysensors:humidity, mysensors:temperature, mysensors:light, mysensors:multimeter, mysensors:power, mysensors:baro, mysensors:door, mysensors:motion, mysensors:smoke, mysensors:dimmer, mysensors:cover, mysensors:wind, mysensors:rain, mysensors:uv, mysensors:weight, mysensors:distance, mysensors:light-level]' on 'MySensorsDiscoveryService'!java.lang.NullPointerException: null
        at org.openhab.binding.mysensors.service.DiscoveryThread.stop(DiscoveryThread.java:23)
        at org.openhab.binding.mysensors.discovery.MySensorsDiscoveryService.stopScan(MySensorsDiscoveryService.java:63)
        at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.startScan(AbstractDiscoveryService.java:173)
        at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:336)
        at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScans(DiscoveryServiceRegistryImpl.java:321)
        at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:172)
        at org.eclipse.smarthome.io.rest.core.discovery.DiscoveryResource.scan(DiscoveryResource.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
    
    1 Reply Last reply
    0
    • T Offline
      T Offline
      TimO
      Hero Member
      wrote on last edited by
      #95

      @kolaf: Interesting. I'm not able to reproduce the error. Did you clean the userdata directory? OH2 gets stuck, when the xml-Definition changes, because it uses some sort of cache.

      Because it is somewhat annoying to start from the scratch after deleting userdata, I define fixed things (like the gateway) in the *.things file.

      https://github.com/wishmoooop/openhab2/tree/master/addons/binding/org.openhab.binding.mysensors

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kolaf
        Hero Member
        wrote on last edited by
        #96

        Thanks, it seems that that was the problem.

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

          Hi everyone. Just to let you know OpenHAB 2.0.0 first BETA release is available. Unfortunatelly Tim0's binding is throwing some errors while OpenHAB tryes to install it.

          2016-01-13 13:46:25.314 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/home/pi/OpenHAB2/Downloads/OpenHAB-Beta/addons/org.openhab.binding.mysensors-2.0.0-SNAPSHOT.jar
          org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mysensors [166]
            Unresolved requirement: Import-Package: gnu.io
          
                  at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
                  at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
                  at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
                  at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
                  at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[8:org.apache.felix.fileinstall:3.5.0]
                  at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
                  at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
          

          Let me know Tim0 if I can help you fix this.
          Thanks, regards.
          Gonzalo.

          1 Reply Last reply
          0
          • dakkyD Offline
            dakkyD Offline
            dakky
            wrote on last edited by
            #98

            kewl, thank 4 digging this up. I'm just evaluating openHab2 :D

            Controller: Raspberry Pi 2 :: Openhab2 :: with @TimO MySensors Binding
            Gateway: Arduino MEGA 2560 R3 :: W5100 :: Ethernet GW

            Software: MySensors 2.0development

            1 Reply Last reply
            0
            • O Offline
              O Offline
              ofverstedt
              wrote on last edited by
              #99

              Hi Timo,

              Regarding the errors in OH2beta, see this post for a possible solution.

              Some other questions:
              Is it possible to access sensors with different "V_types" for example V_VAR1 to a temperature sensor? I would like to send out numbers to my sensor nodes from rules.

              I was not able to get the battery level to work.
              my item looks like this:

              Number SHBat "Storehouse Node Battery Level [%f %%]"       (nSH,gBAT) { channel="mysensors:temperature:gateway:SHtemp_in:battery" }
              

              What is wrong?

              Thank you for a great work!

              /Tomas

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

                Hi Tomas!

                Thanks for the hint, I will take a closer look!

                @ofverstedt said:

                I would like to send out numbers to my sensor nodes from rules.

                This is currently not possible, but it will be. It is on my ToDo list. :-)
                The current solution with the serial binding in OH 1.X is complicated, but leaves a lot of freedom for the user and I would like to preserve as much freedom as possible.

                I've implemented some new features a while ago, like resending of messages if no ACK is received. But the Repo is out of date. I will fix that.

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

                  Hi Tim0.
                  Really nice work with this binding. Huge step forward into a official MySensors OpenHAB binding.

                  It would be nice to have the repo updated so as to try the new features you have implemented.

                  Have you had time to check why we are gewtting that error at OpenHAB 2 Beta while trying to install the binding?

                  Let me know if there is any way in which I can help.
                  Thanks, regards!

                  Gonzalo.

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

                    Hi @gonzalonal !

                    I'm working on it. Due to the changes in the OH git repository my environment is all messed up. :-(

                    1 Reply Last reply
                    0
                    • andreacioniA Offline
                      andreacioniA Offline
                      andreacioni
                      wrote on last edited by andreacioni
                      #103

                      This kind of problem (as I've read online) in this release of OH seems to be not only related to this binding. One suggestion that I found is here: https://github.com/openhab/openhab-distro/issues/82 (last comment) or here: https://github.com/openhab/openhab-distro/issues/81

                      I've tested it without success but I don't know if I've done it right. I've also try to build myself a rfxcom binding (this one use gnu.io) and it has the same issue

                      hope this help

                      EDIT: this work for me, run on OSGI console: feature:install openhab-transport-serial and restart OH

                      G T 2 Replies Last reply
                      0
                      • andreacioniA andreacioni

                        This kind of problem (as I've read online) in this release of OH seems to be not only related to this binding. One suggestion that I found is here: https://github.com/openhab/openhab-distro/issues/82 (last comment) or here: https://github.com/openhab/openhab-distro/issues/81

                        I've tested it without success but I don't know if I've done it right. I've also try to build myself a rfxcom binding (this one use gnu.io) and it has the same issue

                        hope this help

                        EDIT: this work for me, run on OSGI console: feature:install openhab-transport-serial and restart OH

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

                        @andreacioni said:

                        This kind of problem (as I've read online) in this release of OH seems to be not only related to this binding. One suggestion that I found is here: https://github.com/openhab/openhab-distro/issues/82 (last comment) or here: https://github.com/openhab/openhab-distro/issues/81

                        I've tested it without success but I don't know if I've done it right. I've also try to build myself a rfxcom binding (this one use gnu.io) and it has the same issue

                        hope this help

                        EDIT: this work for me, run on OSGI console: feature:install openhab-transport-serial and restart OH

                        Hi @andreacioni.

                        You saved the day. It worked for me.
                        Here the steps I did to make it work.

                        1- Download latest snapshot from https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ (Download offline version)
                        2- Unzip the file.
                        3- Run start_debug.sh
                        4- In console write "feature:install openhab-runtime-compat1x"
                        5- Ctrl-D to exit/shutdown OpenHAB
                        6- Once exited, copy MySensors binding to addons folder.
                        7- Start againg OpenHAB-
                        8- Thats it. It should work

                        Remember to copy your serial thing to things folder.
                        Regards!
                        Gonzalo

                        1 Reply Last reply
                        0
                        • andreacioniA andreacioni

                          This kind of problem (as I've read online) in this release of OH seems to be not only related to this binding. One suggestion that I found is here: https://github.com/openhab/openhab-distro/issues/82 (last comment) or here: https://github.com/openhab/openhab-distro/issues/81

                          I've tested it without success but I don't know if I've done it right. I've also try to build myself a rfxcom binding (this one use gnu.io) and it has the same issue

                          hope this help

                          EDIT: this work for me, run on OSGI console: feature:install openhab-transport-serial and restart OH

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

                          @andreacioni: Absolultly amazing! Thanks!

                          I don't understand why this helps though because the changes in the code I have to do have nothing to do with OH1 (compability).

                          I hope to provide an adjusted version today or tomorrow along with a clean and working repository.

                          Thanks for your patience! :-)

                          andreacioniA 1 Reply Last reply
                          0
                          • T TimO

                            @andreacioni: Absolultly amazing! Thanks!

                            I don't understand why this helps though because the changes in the code I have to do have nothing to do with OH1 (compability).

                            I hope to provide an adjusted version today or tomorrow along with a clean and working repository.

                            Thanks for your patience! :-)

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

                            @TimO I'think the OH1 compatibility is not the problem. It seems that OH2 beta1 have not installed transport feature and so it has no definition for the gno.io pakage, so I'think there's nothing to do on your code :D

                            PS tell me when the new repo is OK that I download it and try to add the baudrate config ;) Thanks!!

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

                              So, I would like to show you my current status. I've tested it against my mini MySensors environment and it looks good so far. Feel free to test.

                              1. Download latest snapshot from cloudbees: https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-offline/target/openhab-offline-2.0.0-SNAPSHOT.zip

                              2. Unzip file (into a directory like oh2).

                              3. Download the current binding from Binding and place it in the addons directory under oh2.

                              4. Configure addons, things, items and sitemap. Example?! addons.cfg, demo.things , demo.items, demo.sitemap

                              5. Start "start_debug.sh", "start_debug.bat" ...

                              6. In the karaf console enter: "feature:install openhab-transport-serial".

                              7. MySensors Plugin "should" start. ;-)

                              8: "log:set debug" + "log:tail" to see debug output.

                              Github and documentation will follow, please refer to the "old" Readme and the examples.

                              andreacioniA 1 Reply Last reply
                              0
                              • T TimO

                                So, I would like to show you my current status. I've tested it against my mini MySensors environment and it looks good so far. Feel free to test.

                                1. Download latest snapshot from cloudbees: https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-offline/target/openhab-offline-2.0.0-SNAPSHOT.zip

                                2. Unzip file (into a directory like oh2).

                                3. Download the current binding from Binding and place it in the addons directory under oh2.

                                4. Configure addons, things, items and sitemap. Example?! addons.cfg, demo.things , demo.items, demo.sitemap

                                5. Start "start_debug.sh", "start_debug.bat" ...

                                6. In the karaf console enter: "feature:install openhab-transport-serial".

                                7. MySensors Plugin "should" start. ;-)

                                8: "log:set debug" + "log:tail" to see debug output.

                                Github and documentation will follow, please refer to the "old" Readme and the examples.

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

                                @TimO Hi Tim, for debugging outupt of the binding I need to write: log:set DEBUG org.openhab.binding.mysensors, without this I cannot see anything about binding logs

                                G 1 Reply Last reply
                                0
                                • andreacioniA andreacioni

                                  @TimO Hi Tim, for debugging outupt of the binding I need to write: log:set DEBUG org.openhab.binding.mysensors, without this I cannot see anything about binding logs

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

                                  @andreacioni Hi andreacioni. Same issue with debug mode with me. Thanks for the tip!

                                  @TimO: V_STOP for Rollershutter sensors, is a MySensors binding limitation, or it is not implemented in OH2 yet?

                                  Another thing I've noticed is that every item added, despite being a regular switch or a rollershutter, is is being added as:

                                  Battery Level
                                  mysensors:cover:gateway:Cover_1_0:battery
                                  MySensors Battery Channel

                                  Is this the intended behavior for every node of my sensor, despite having or not a battery?

                                  Regards.
                                  Gonzalo.

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

                                    @gonzalonal said:

                                    V_STOP for Rollershutter sensors, is a MySensors binding limitation, or it is not implemented in OH2 yet?

                                    It is a limitation of OH2 and I don't understand the limitation. It is very confusing, because with the "RollerShutter" widget in OH2 I get three buttons: UP, DOWN and STOP. UP and down calls the handler in which I generate the MySensors message. STOP don't call the handler and therefore I can't do anything. I need to dig deeper.

                                    Battery Level
                                    mysensors:cover:gateway:Cover_1_0:battery
                                    MySensors Battery Channel

                                    Is this the intended behavior for every node of my sensor, despite having or not a battery?

                                    This is intended behavior. The battery status is send via an internal message and there is no presentation if a sensor has a battery or not.
                                    I've therefore added the battery channel to every item. In Paper UI you are able to simply disable the channel by clicking the blue circle next to the battery channel or in the configuration file you have to specify the channel, if you want to use it. If the battery channel is not defined for a thing it won't receive the battery status.

                                    For the future: maybe there is a way to hide the channel as long as there was no battery status received and display it only when used. But currently I don't see an easy way to implement that.

                                    Greetings!
                                    Tim

                                    G 1 Reply Last reply
                                    0
                                    • T TimO

                                      @gonzalonal said:

                                      V_STOP for Rollershutter sensors, is a MySensors binding limitation, or it is not implemented in OH2 yet?

                                      It is a limitation of OH2 and I don't understand the limitation. It is very confusing, because with the "RollerShutter" widget in OH2 I get three buttons: UP, DOWN and STOP. UP and down calls the handler in which I generate the MySensors message. STOP don't call the handler and therefore I can't do anything. I need to dig deeper.

                                      Battery Level
                                      mysensors:cover:gateway:Cover_1_0:battery
                                      MySensors Battery Channel

                                      Is this the intended behavior for every node of my sensor, despite having or not a battery?

                                      This is intended behavior. The battery status is send via an internal message and there is no presentation if a sensor has a battery or not.
                                      I've therefore added the battery channel to every item. In Paper UI you are able to simply disable the channel by clicking the blue circle next to the battery channel or in the configuration file you have to specify the channel, if you want to use it. If the battery channel is not defined for a thing it won't receive the battery status.

                                      For the future: maybe there is a way to hide the channel as long as there was no battery status received and display it only when used. But currently I don't see an easy way to implement that.

                                      Greetings!
                                      Tim

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

                                      @TimO
                                      Great TimO. Thanks for clarifying this topic.
                                      Regards.
                                      Gonzalo

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

                                        @gonzalonal : I found a solution for V_STOP! It will be available soon.

                                        But more important: @andreacioni is doing some great work improving the stability and performance of the binding!!

                                        I just wanted to let you know, that the binding is currently under heavy development. :+1:

                                        G 1 Reply Last reply
                                        4
                                        • T TimO

                                          @gonzalonal : I found a solution for V_STOP! It will be available soon.

                                          But more important: @andreacioni is doing some great work improving the stability and performance of the binding!!

                                          I just wanted to let you know, that the binding is currently under heavy development. :+1:

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

                                          @TimO
                                          Great news TimO. Really nice to hear that.
                                          Regarding STOP functionality for the binding, I have read somewhere that the supported commands by OpenHAB, for RollerShutter items, are Up, Down and StopMove. Have yoy tried something like this?

                                          Regards
                                          Gonzalo.

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


                                          15

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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