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.9k 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.
  • fetsF Offline
    fetsF Offline
    fets
    wrote on last edited by fets
    #52

    @TimO yes I think it works with manual bindins (several discussions mention it) but I meant using paper ui as you do here :)

    1 Reply Last reply
    0
    • Cliff KarlssonC Offline
      Cliff KarlssonC Offline
      Cliff Karlsson
      wrote on last edited by
      #53

      Well if I add a door sensor and just enter some random node id/child Id it shows up as online. I never managed to add any sensor automatically even if I start the search process and resetting any sensors.

      But the problem is that I can't get any reaction from the switch. I have tried connecting a button to pin 3 and also tried just connecting a cable from pin 3 to gnd. But no reaction whatever I do.

      1 Reply Last reply
      0
      • Q Qu3Uk

        @TimO Good to know its not just me, may still be O2 it is alpha after all.

        Now to figure out these rules..

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

        @Qu3Uk : Fixed the error. The sensors were initialized before the bridge was up.

        @Cliff-Karlsson: The status of a thing in OH is not reliable and I'm yet not sure how to make it reliable because the connection between sensor and gateway is stateless, so a sensor maybe is online even if it only transmits one time per day.

        In your case: what is the output of the "start_debug.sh"? Are there messages from the MySensors Gateway logged?

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ZoTyA
          wrote on last edited by
          #55

          Nice work!

          Did anyone try the binding with FakeMySensors?

          http://forum.mysensors.org/topic/1648/test-your-home-made-controller-with-fakemysensors

          Q 1 Reply Last reply
          0
          • Z Offline
            Z Offline
            ZoTyA
            wrote on last edited by
            #56

            after OH2 restart I got "UNINITIALIZED - HANDLER_INITIALIZING_ERROR" for all already existing sensors. If I add a new sensors it works until OH2 restart

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              ZoTyA
              wrote on last edited by
              #57

              on thing removing:

              2015-08-21 19:40:36 [DEBUG] [.c.thing.internal.ThingManager:174 ] - Asking handler of thing 'mysensors:temperature:8da0bd23:Temperature_87_1' to handle its removal.
              2015-08-21 19:40:36 [INFO ] [ome.event.ThingStatusInfoEvent:43 ] - mysensors:temperature:8da0bd23:Temperature_87_1' updated: REMOVING
              2015-08-21 19:40:36 [ERROR] [.c.thing.internal.ThingManager:178 ] - The ItemHandler caused an exception while handling the removal of its thingjava.lang.NullPointerException: null
              at org.eclipse.smarthome.core.thing.internal.ThingManager$1.statusUpdated(ThingManager.java:176)
              at org.eclipse.smarthome.core.thing.internal.ThingManager.thingRemoving(ThingManager.java:361)
              at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:193)
              at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.remove(ThingRegistryImpl.java:89)
              at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.removeThing(ThingSetupManager.java:442)
              at org.eclipse.smarthome.io.rest.core.thing.setup.ThingSetupManagerResource.removeThing(ThingSetupManagerResource.java:126)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)

              1 Reply Last reply
              0
              • Z ZoTyA

                Nice work!

                Did anyone try the binding with FakeMySensors?

                http://forum.mysensors.org/topic/1648/test-your-home-made-controller-with-fakemysensors

                Q Offline
                Q Offline
                Qu3Uk
                wrote on last edited by
                #58

                @ZoTyA said:

                after OH2 restart I got "UNINITIALIZED - HANDLER_INITIALIZING_ERROR" for all already existing sensors. If I add a new sensors it works until OH2 restart

                This should be fixed but I don't think @Tim0 has released the fix yet? Might be wrong.

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

                  I'm pretty sure this time it is a bug in OH2, because my code works sometimes. :-)
                  I've found a workaround and got 10/10 clean starts of OH2 and reinitializations of the configured things.

                  Please let me know, if the error occures again!

                  Thanks for testing!!

                  1 Reply Last reply
                  0
                  • Cliff KarlssonC Offline
                    Cliff KarlssonC Offline
                    Cliff Karlsson
                    wrote on last edited by
                    #60

                    How do I keep openhab2 updated after installing?

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

                      What do you want to keep updated? The OH2 runtime? The binding?

                      I update the link of the binding (jar-file) in the first post here whenever I add or fix something. You only have to switch this jar file in your installation. In the current alpha phase it is an good idea to delete the userdata folder, but with that you will lose all already discovered and added things. I have configured all things/items that should survive a deletion of the userdata in the thing.conf, items.conf etc.

                      For the future I plan to make a pull request so that the mysensors binding will be a fixed part of OH2, but I want to ensure its stability before I do so. Additionally there are some features I would like to add before making a pull request.

                      Q 1 Reply Last reply
                      2
                      • Q Qu3Uk

                        @ZoTyA said:

                        after OH2 restart I got "UNINITIALIZED - HANDLER_INITIALIZING_ERROR" for all already existing sensors. If I add a new sensors it works until OH2 restart

                        This should be fixed but I don't think @Tim0 has released the fix yet? Might be wrong.

                        Z Offline
                        Z Offline
                        ZoTyA
                        wrote on last edited by
                        #62

                        @Qu3Uk said:

                        @ZoTyA said:

                        after OH2 restart I got "UNINITIALIZED - HANDLER_INITIALIZING_ERROR" for all already existing sensors. If I add a new sensors it works until OH2 restart

                        This should be fixed but I don't think @Tim0 has released the fix yet? Might be wrong.

                        Confirmed - it is fixed.

                        Thanks

                        1 Reply Last reply
                        0
                        • T TimO

                          What do you want to keep updated? The OH2 runtime? The binding?

                          I update the link of the binding (jar-file) in the first post here whenever I add or fix something. You only have to switch this jar file in your installation. In the current alpha phase it is an good idea to delete the userdata folder, but with that you will lose all already discovered and added things. I have configured all things/items that should survive a deletion of the userdata in the thing.conf, items.conf etc.

                          For the future I plan to make a pull request so that the mysensors binding will be a fixed part of OH2, but I want to ensure its stability before I do so. Additionally there are some features I would like to add before making a pull request.

                          Q Offline
                          Q Offline
                          Qu3Uk
                          wrote on last edited by
                          #63

                          @TimO Slightly off topic but am I right in thinking even with discovered things you still have to manually create an item for the thing in the item.conf for stuff like rules to work?

                          bpairB 1 Reply Last reply
                          0
                          • bpairB Offline
                            bpairB Offline
                            bpair
                            wrote on last edited by
                            #64

                            @Qu3Uk I asked a similar question about persistence on the OH2 forum and the response was you could set up a group and configure persistence for it. Then as the new items are dynamically found they just need to be added to the group without adding them to the config files. Possibly the same thing would work for rules.

                            1 Reply Last reply
                            0
                            • Q Qu3Uk

                              @TimO Slightly off topic but am I right in thinking even with discovered things you still have to manually create an item for the thing in the item.conf for stuff like rules to work?

                              bpairB Offline
                              bpairB Offline
                              bpair
                              wrote on last edited by
                              #65

                              @Qu3Uk Looks like they are adding some support for this: https://community.openhab.org/t/rules-allowing-regexp-for-items-and-catching-individual-items-in-a-group/2165

                              1 Reply Last reply
                              0
                              • B Offline
                                B Offline
                                BenCranston
                                wrote on last edited by
                                #66

                                @TimO I'm having difficulty with the mysensors binding and the zwave binding on OH2 startup. If both bindings are present, then mysensors gets loaded first (port=/dev/ttyS2) and then zwave tries to load (port=/dev/ttyUSB0) however it reports that it's serial port is not present. If I remove the mysensors binding jar file from addons and then start OH2, the zwave binding connects to its serial port correctly and works fine. I can then mv the mysensors binding back into addons and it will get loaded and bind correctly to it's serial port. I've tried to turn the logging up to debug and not got anything more from the bindings to tell me what's happening. any help is appreciated. thanks.

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

                                  @BenCranston : Thanks for the bug report! You're right I'm able to reproduce this error. The zwave and mysensors binding both use the same library (gnu.io) to access serial ports.

                                  1 Reply Last reply
                                  0
                                  • B Offline
                                    B Offline
                                    BenCranston
                                    wrote on last edited by
                                    #68

                                    @TimO I'm beginning to think this might be platform specific to the gnu.io library and manifest on ARM architectures. I moved my OH2 installation over to my Mac and "Viola!" both services started working without an issue. Are you on an ARM platform as well? Initially I was running the MySensors gateway off of a GPIO serial port on my Pi. As part of working this I moved the gateway to an FTDI USB connection, so both devices were /dev/ttyUSB[01]. That didn't change the behavior and they still failed to co-exist from boot. I'm going to take a look at the gnu.io RXTX stuff and see if I can find a lead there... I'm not a java programmer, so this should be fun.

                                    1 Reply Last reply
                                    0
                                    • B Offline
                                      B Offline
                                      BenCranston
                                      wrote on last edited by
                                      #69

                                      @TimO It looks like someone else ran into the same issue trying to do z-wave and enocean, both being serial connections. The discussion over on the community at openhab.org is here: https://community.openhab.org/t/serial-ports-issue/2516
                                      I wonder if that sheds any further lights on the issue. They did get a fix implemented in the EnOcean binding to play nice with the zwave binding.

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

                                        @BenCranston : Thanks for looking further into the problem. I was able to reproduce the problem on a x86 architecture.
                                        I've looked into the fix for insteon and I'm not sure if that helps, because I don't use the updateProperties() method that is fixed.

                                        I don't know zwave, so to be sure: I've changed:

                                        port=/dev/pts/1
                                        

                                        in zwave.cfg. Is that correct?
                                        (I've running a serial emulation on /dev/pts/1).

                                        Daniel OliveiraD 1 Reply Last reply
                                        0
                                        • B Offline
                                          B Offline
                                          BenCranston
                                          wrote on last edited by
                                          #71

                                          @TimO : Yes sir, that's the config step to tell the zwave binding where it's serial port is. The rest is done via files, or the habmin interface.

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


                                          13

                                          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