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 binding

openHAB binding

Scheduled Pinned Locked Moved OpenHAB
89 Posts 30 Posters 55.6k Views 33 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.
  • Kodiak80K Kodiak80

    I'm trying to get a single Dallas Temp sensor displayed in OpenHAB using the Serial Gateway. I'm running the MySensors v2 Dallas Temp sketch, and I'm seeing my sensor in the logs. However, I'm getting the following:

    2016-09-28 07:34:21.805 [ERROR] [i.internal.GenericItemProvider] - Binding configuration of type 'mysensors' of item ?Temperature? could not be parsed correctly.
    java.lang.NullPointerException: null
    	at java.util.regex.Matcher.getTextLength(Matcher.java:1234) ~[na:1.7.0_101]
    	at java.util.regex.Matcher.reset(Matcher.java:308) ~[na:1.7.0_101]
    	at java.util.regex.Matcher.<init>(Matcher.java:228) ~[na:1.7.0_101]
    	at java.util.regex.Pattern.matcher(Pattern.java:1088) ~[na:1.7.0_101]
    	at org.openhab.binding.mysensors.internal.MySensorsGenericBindingProvider.validateItemType(MySensorsGenericBindingProvider.java:57) ~[na:na]
    	at org.openhab.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:347) [org.openhab.model.item_1.8.3.jar:na]
    	at org.openhab.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:324) [org.openhab.model.item_1.8.3.jar:na]
    	at org.openhab.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:171) [org.openhab.model.item_1.8.3.jar:na]
    	at org.openhab.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:390) [org.openhab.model.item_1.8.3.jar:na]
    	at org.openhab.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:159) [org.openhab.model.core_1.8.3.jar:na]
    	at org.openhab.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:100) [org.openhab.model.core_1.8.3.jar:na]
    	at org.openhab.model.core.internal.folder.FolderObserver.checkFolder(FolderObserver.java:142) [org.openhab.model.core_1.8.3.jar:na]
    	at org.openhab.model.core.internal.folder.FolderObserver.run(FolderObserver.java:99) [org.openhab.model.core_1.8.3.jar:na]
    
    

    My item definition looks like the following:

    Number  Temperature           "Temp [%s °C]"     <temperature>   (gBio,gTemperature)     {mysensors=105;1;V_TEMP}
    

    As a follow-on, I've been trying to understand the {mysensors=105;1;V_TEMP} binding and what the semicolon separated values represent. So far I've been following example code, and haven't found the right documentation. Can someone point me to the right place? I appreciate any help.

    bklB Offline
    bklB Offline
    bkl
    wrote on last edited by
    #74

    Hi @Kodiak80

    Your are missing the " item definition should be.

    Number  Temperature           "Temp [%s °C]"     <temperature>   (gBio,gTemperature)     {mysensors="105;1;V_TEMP"}
    

    The values is just

    node-id;child-sensor-id;sub-type
    
    1 Reply Last reply
    0
    • bklB bkl

      @NickBuilder
      From what i know sendCommand should be the way to go.

      myElecVar.sendCommand(0);
      

      That should send the value to your sensor, and then update its value of pulseCount

      NickBuilderN Offline
      NickBuilderN Offline
      NickBuilder
      wrote on last edited by
      #75

      @bkl
      Ok. But for some reason the new value is not accepted in my case. I will try and see if the serial terminal, when connected to the sensor, will give a hint on what’s going on. It would be nice if the debug of the binding could show what is actually being sent to (and possibly through) the gateway. Is this possible already by ”activating” a certain debug.xml module?

      The serial binding is quite clear in this regard as the message with payload according to the mysensor protocol is displayed in the debug log.

      1 Reply Last reply
      0
      • Velo17V Offline
        Velo17V Offline
        Velo17
        wrote on last edited by
        #76

        ...trying to download the jar from the link in the first post, but server is not reachable. Is there any other URL to this .jar?

        1 Reply Last reply
        0
        • jerseyguy1996J Offline
          jerseyguy1996J Offline
          jerseyguy1996
          wrote on last edited by
          #77

          @bkl First off I want to thank you for the MySensors openhab binding. It works wonderfully!

          In the MySensors 2.0 there is an internal message that doesn't seem to be handled by the binding. I believe it needs to be handled in MySensorsBinding.java. I would do it myself but my knowledge of Java sucks....to put it lightly. The internal message is:

          I_DISCOVER_RESPONSE
          

          so my openhab log keeps getting spammed with:

          2016-10-21 22:16:21.653 [INFO ] [.b.m.internal.MySensorsBinding] - No item configured for "4;255;I_DISCOVER_RESPONSE"
          2016-10-21 22:26:21.374 [INFO ] [.b.m.internal.MySensorsBinding] - No item configured for "4;255;I_DISCOVER_RESPONSE"
          2016-10-21 22:36:22.127 [INFO ] [.b.m.internal.MySensorsBinding] - No item configured for "4;255;I_DISCOVER_RESPONSE"
          2016-10-21 22:46:21.847 [INFO ] [.b.m.internal.MySensorsBinding] - No item configured for "4;255;I_DISCOVER_RESPONSE"
          2016-10-21 22:56:21.569 [INFO ] [.b.m.internal.MySensorsBinding] - No item configured for "4;255;I_DISCOVER_RESPONSE"
          

          I'm assuming that we just need to add a line to:

          public void incommingMessage(Message message)
          

          to handle it but I would rather let you do it since like I said....I suck with Java. Is that something that would be an easy fix?

          1 Reply Last reply
          1
          • A Offline
            A Offline
            andreground
            wrote on last edited by
            #78

            Ethernet gw binding source seems to be missing in github repo.

            Any clue?

            Thanks

            : Compilation failure:
            [ERROR] /root/openhab/bundles/binding/org.openhab.binding.mysensors/src/main/java/org/openhab/binding/mysensors/internal/MySensorsBinding.java:[17]
            [ERROR] import org.openhab.binding.mysensors.internal.gateway.Ethernet;
            [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            [ERROR] The import org.openhab.binding.mysensors.internal.gateway.Ethernet cannot be resolved
            [ERROR] /root/openhab/bundles/binding/org.openhab.binding.mysensors/src/main/java/org/openhab/binding/mysensors/internal/MySensorsBinding.java:[117]
            [ERROR] gateway = new Ethernet(prop.getProperty("host"), Integer.parseInt(prop.getProperty("port", "5003")));
            [ERROR] ^^^^^^^^
            [ERROR] Ethernet cannot be resolved to a type
            [ERROR] 2 problems (2 errors)
            [ERROR] -> [Help 1]
            [ERROR]
            [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
            [ERROR] Re-run Maven using the -X switch to enable full debug logging.
            [ERROR]
            [ERROR] For more information about the errors and possible solutions, please read the following articles:
            [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
            [ERROR]
            [ERROR] After correcting the problems, you can resume the build with the command
            [ERROR] mvn <goals> -rf :org.openhab.binding.mysensors

            1 Reply Last reply
            0
            • F Offline
              F Offline
              Fritzin
              wrote on last edited by
              #79

              How do I add the "my-sensors" add on to openhab2.0. I openhab2 up and running based on their rasp-image. I have downloaded a couple other adds and install just fine. I don't know how to place the .jar file into the adds. Is there a clear guide on how to get this done ? PLS HELP!

              1 Reply Last reply
              0
              • andredtsA Offline
                andredtsA Offline
                andredts
                wrote on last edited by
                #80

                @bkl Hi,

                Use this biding from it`s beginning, many thanks again. Just want to know if there is any function like the "ack" as there is on OH2 binding, where gateway re-sends the msg 5 times if it does not hear from the sensor after a command. It´s a killer function to make it more reliable, but I´m not ready for OH2 yet.

                Thanks

                1 Reply Last reply
                0
                • parachutesjP Offline
                  parachutesjP Offline
                  parachutesj
                  wrote on last edited by parachutesj
                  #81

                  Hi,
                  after my openHAB system completely failed I had to re-install everying. I had MySensors configured the old way with a lot of rules with the serial binding I thought I give the binding a try.
                  In general it works but I have issues with S_COVER, not sure how to configure this.
                  But of course in openhab it is a single Rollershutter item... I think I could do a workaround in creating in total 4 items and only show my rollershutter and then have a rule and based on up/down/stop update the 3 items.

                  Anyhow, seems to complex.

                  What is best practice here?

                  The sensor presents itself with this:

                   * Example item: 188;2;V_UP                 - Window covering. Up.
                   * Example item: 188;2;V_DOWN               - Window covering. Down.
                   * Example item: 188;2;V_STOP               - Window covering. Stop.
                   * Example item: 188;2;V_PERCENTAGE         - Percentage value. 0-100 (%) ```
                  parachutesjP 1 Reply Last reply
                  0
                  • parachutesjP parachutesj

                    Hi,
                    after my openHAB system completely failed I had to re-install everying. I had MySensors configured the old way with a lot of rules with the serial binding I thought I give the binding a try.
                    In general it works but I have issues with S_COVER, not sure how to configure this.
                    But of course in openhab it is a single Rollershutter item... I think I could do a workaround in creating in total 4 items and only show my rollershutter and then have a rule and based on up/down/stop update the 3 items.

                    Anyhow, seems to complex.

                    What is best practice here?

                    The sensor presents itself with this:

                     * Example item: 188;2;V_UP                 - Window covering. Up.
                     * Example item: 188;2;V_DOWN               - Window covering. Down.
                     * Example item: 188;2;V_STOP               - Window covering. Stop.
                     * Example item: 188;2;V_PERCENTAGE         - Percentage value. 0-100 (%) ```
                    parachutesjP Offline
                    parachutesjP Offline
                    parachutesj
                    wrote on last edited by parachutesj
                    #82

                    I saw STOP in S_cover is not supported in OH2 - what about OH1? Anyone?

                    T 1 Reply Last reply
                    0
                    • parachutesjP parachutesj

                      I saw STOP in S_cover is not supported in OH2 - what about OH1? Anyone?

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

                      @parachutesj According OH2: That was fixed a looooooong time ago. :D

                      Refer to: https://github.com/tobof/openhab2-addons/wiki/Examples for an example (cover).

                      parachutesjP 1 Reply Last reply
                      1
                      • T TimO

                        @parachutesj According OH2: That was fixed a looooooong time ago. :D

                        Refer to: https://github.com/tobof/openhab2-addons/wiki/Examples for an example (cover).

                        parachutesjP Offline
                        parachutesjP Offline
                        parachutesj
                        wrote on last edited by
                        #84

                        @TimO thank you.
                        and what is with OH1? Not getting it to work.
                        Does not seem that STOP works, UP & DOWN and PERCENTAGE work

                        T 1 Reply Last reply
                        0
                        • parachutesjP parachutesj

                          @TimO thank you.
                          and what is with OH1? Not getting it to work.
                          Does not seem that STOP works, UP & DOWN and PERCENTAGE work

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

                          @parachutesj I can't help you with this version of the binding, I've never used it.

                          parachutesjP 1 Reply Last reply
                          0
                          • T TimO

                            @parachutesj I can't help you with this version of the binding, I've never used it.

                            parachutesjP Offline
                            parachutesjP Offline
                            parachutesj
                            wrote on last edited by
                            #86

                            @TimO Thanks anyway. I am slowly moving into the OH2 direction - still a lot of things to be clarified and configured

                            1 Reply Last reply
                            0
                            • G Offline
                              G Offline
                              Guillermo Schimmel
                              wrote on last edited by
                              #87

                              Hello guys, who can unpin this post?

                              It is terribly outdated.

                              The effort for an openhab-mysensors binding is still valid but several things changed on OpenHAB, making this a lot easier.

                              mfalkviddM 1 Reply Last reply
                              0
                              • G Guillermo Schimmel

                                Hello guys, who can unpin this post?

                                It is terribly outdated.

                                The effort for an openhab-mysensors binding is still valid but several things changed on OpenHAB, making this a lot easier.

                                mfalkviddM Offline
                                mfalkviddM Offline
                                mfalkvidd
                                Mod
                                wrote on last edited by
                                #88

                                @guillermo-schimmel done. Is there some other post that should be pinned instead?

                                G 1 Reply Last reply
                                0
                                • mfalkviddM mfalkvidd

                                  @guillermo-schimmel done. Is there some other post that should be pinned instead?

                                  G Offline
                                  G Offline
                                  Guillermo Schimmel
                                  wrote on last edited by
                                  #89

                                  @mfalkvidd Thanks! Just give me a couple of days and I will try to make a new tutorial for mysensors+openhab.

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


                                  8

                                  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