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 4 MySensors Binding

openHAB 4 MySensors Binding

Scheduled Pinned Locked Moved OpenHAB
19 Posts 9 Posters 229 Views 8 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.
  • N niccodemi

    Hi @ben999

    I used to have OH3 with MySensors Ethernet gateway but now I have upgraded to OH4 and it seems the only option is to connect MySensors network to OH via MQTT.
    I flashed MySensors mqtt_gateway and installed Mosquitto on same machine where OH4 is installed (ip=192.168.1.yyy). I also installed MQTT binding in OH4.

    Can you please advise how did you configure things and items file? In OH3 I had them configured in textual format.

    Things file in OH3

    Bridge mysensors:bridge-eth:gateway [ ipAddress="192.168.1.xxx", tcpPort=5003, sendDelay=300, startupCheckEnabled=false, networkSanCheckEnabled=true ] {
    	 light			relunderstair0101 [ nodeId=1, childId=1, requestAck=false ]
    

    Items file in OH3

    Switch relunderstair0101  "LED-stairs" { channel="mysensors:light:gateway:relunderstair0101:status" }
    
    ben999B Offline
    ben999B Offline
    ben999
    wrote on last edited by ben999
    #8

    @niccodemi I am no expert and am having a tough time with these files as well !!!

    My .things file looks like so :

    Bridge mqtt:broker:mosquitto "MySensorsGateway"@"Home" [host="openhabian", port="1883", secure=false]
    {
    	Thing topic garageDoor01 "Garage"@"Basement" {
    		Channels:
    			Type contact :	garageDoor01switch	[stateTopic="mysensors-out/19/1/1/0/16", transformationPattern="MAP:contact.map"]
    			Type datetime : garageDoor01switch_LastUpdate
    	}
    

    As far as i understand, you're missing that "linktopic" descrption...

    N 1 Reply Last reply
    0
    • ben999B ben999

      @niccodemi I am no expert and am having a tough time with these files as well !!!

      My .things file looks like so :

      Bridge mqtt:broker:mosquitto "MySensorsGateway"@"Home" [host="openhabian", port="1883", secure=false]
      {
      	Thing topic garageDoor01 "Garage"@"Basement" {
      		Channels:
      			Type contact :	garageDoor01switch	[stateTopic="mysensors-out/19/1/1/0/16", transformationPattern="MAP:contact.map"]
      			Type datetime : garageDoor01switch_LastUpdate
      	}
      

      As far as i understand, you're missing that "linktopic" descrption...

      N Offline
      N Offline
      niccodemi
      wrote on last edited by
      #9

      @ben999 Thank you. I managed to get sensors data coming into OH.

      Would you happen to have also any thing / item example for switch / relay sketch?

      1 Reply Last reply
      0
      • F Offline
        F Offline
        forexsieno
        wrote on last edited by
        #10

        Hello anybody runing openhab4 with latest bindings (3.3.0) and serial gateway?
        I'm not able to get the bindings active. They are installed but not active.

        d2c88d93-f48c-4149-87ae-864a0d9cc88a-image.png

        diag gives following message:

        7cf09807-9953-4235-bafd-cc3986e25756-image.png

        Any ideas?

        N 1 Reply Last reply
        0
        • F forexsieno

          Hello anybody runing openhab4 with latest bindings (3.3.0) and serial gateway?
          I'm not able to get the bindings active. They are installed but not active.

          d2c88d93-f48c-4149-87ae-864a0d9cc88a-image.png

          diag gives following message:

          7cf09807-9953-4235-bafd-cc3986e25756-image.png

          Any ideas?

          N Offline
          N Offline
          niccodemi
          wrote on last edited by niccodemi
          #11

          @forexsieno I am running OH4 but have migrated MySensors to MQTTGateway. Below example of how to control relays.

          thing file

          Bridge mqtt:broker:Mosquitto "Mysensors MQTT Broker" [host="192.xxx.xxx.xxx", secure=false, port=1883, clientID="Openhab"] 
          {
              Thing topic relunderstair "Relay" (mqtt:broker:Mosquitto) {
                  Channels:
                      Type switch : relunderstair0101 "LED-stairs" [ stateTopic="mygateway1-out/1/1/0/0/2", commandTopic ="mygateway1-in/1/1/0/0/2", on="1", off="0" ]
              }
           }
          

          item file

          Switch relunderstair0101  "LED-stairs" { channel="mqtt:topic:Mosquitto:relunderstair:relunderstair0101" }
          
          1 Reply Last reply
          0
          • Z zkarolyi

            Hi,

            After changed to develop branch, the make was successfull, but how to get MySensors binding?
            I have found this: https://github.com/tobof/openhab-addons/wiki/Installation but it is for OpenHab 3.
            When I installed the jar, I get this error:

            [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.mysensors-3.1.0.jar
            
            org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mysensors [265]
            
              Unresolved requirement: Import-Package: org.apache.commons.lang; version="[2.6.0,3.0.0)"
            

            How to get a new binding?
            How to solve this?

            ChachaC Offline
            ChachaC Offline
            Chacha
            wrote on last edited by
            #12

            Hi @zkarolyi

            You can download the 3.2.0-Snapshot version from here:
            https://forum.mysensors.org/post/110626

            It is working in OH3 and OH4!

            There is also a 3.3.0-Snapshot version, but it doesn't work in OH4.
            See my post here: https://forum.mysensors.org/post/113864

            1 Reply Last reply
            0
            • Z zkarolyi

              Hi,

              After changed to develop branch, the make was successfull, but how to get MySensors binding?
              I have found this: https://github.com/tobof/openhab-addons/wiki/Installation but it is for OpenHab 3.
              When I installed the jar, I get this error:

              [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.mysensors-3.1.0.jar
              
              org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mysensors [265]
              
                Unresolved requirement: Import-Package: org.apache.commons.lang; version="[2.6.0,3.0.0)"
              

              How to get a new binding?
              How to solve this?

              C Offline
              C Offline
              CyborgAndy
              wrote on last edited by CyborgAndy
              #13

              Hi @zkarolyi

              Download org.openhab.binding.mysensors-4.0.4-SNAPSHOT.jar from my Google Disk and try it.
              I only tested as a MySensors MQTT Gateway

              kerberosK Z 2 Replies Last reply
              0
              • C CyborgAndy

                Hi @zkarolyi

                Download org.openhab.binding.mysensors-4.0.4-SNAPSHOT.jar from my Google Disk and try it.
                I only tested as a MySensors MQTT Gateway

                kerberosK Offline
                kerberosK Offline
                kerberos
                wrote on last edited by
                #14

                Hi @CyborgAndy

                many thanks for providing the binding update for MySensors 4.0.4! I upgrade my OpenHAB 3.4.4 a few minutes ago to 4.0.4 successfully with your binding update. I use a USB connected serial-gateway. The OpenHAB manual installation upgrade works perfect. I need to do afterwards the following steps in the Karaf console, to get the gateway online again, after the update:

                feature:install openhab-transport-serial
                feature:install openhab-core-io-transport-mqtt
                feature:install openhab-core-io-transport-serial-javacomm
                

                Many thanks again!
                kerberos

                1 Reply Last reply
                0
                • kerberosK Offline
                  kerberosK Offline
                  kerberos
                  wrote on last edited by
                  #15

                  As x-mas gift :santa: works with OpenHAB 4.1 as well...

                  1 Reply Last reply
                  1
                  • C CyborgAndy

                    Hi @zkarolyi

                    Download org.openhab.binding.mysensors-4.0.4-SNAPSHOT.jar from my Google Disk and try it.
                    I only tested as a MySensors MQTT Gateway

                    Z Offline
                    Z Offline
                    zkarolyi
                    wrote on last edited by
                    #16

                    Hi @CyborgAndy

                    Really thank you for this jar so much, I finally managed to bring my sensors to life!
                    A thousand thanks and gratitude!

                    zkarolyi

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      adds666
                      wrote on last edited by
                      #17

                      As an OH3 user looking to upgrade, I'm wondering, do all of the binding points from OH to mysensor nodes, children etc work after upgrade and loading this new .jar?

                      Or do I have to re-build everything in OH?

                      kerberosK 2 Replies Last reply
                      0
                      • A adds666

                        As an OH3 user looking to upgrade, I'm wondering, do all of the binding points from OH to mysensor nodes, children etc work after upgrade and loading this new .jar?

                        Or do I have to re-build everything in OH?

                        kerberosK Offline
                        kerberosK Offline
                        kerberos
                        wrote on last edited by
                        #18
                        This post is deleted!
                        1 Reply Last reply
                        0
                        • A adds666

                          As an OH3 user looking to upgrade, I'm wondering, do all of the binding points from OH to mysensor nodes, children etc work after upgrade and loading this new .jar?

                          Or do I have to re-build everything in OH?

                          kerberosK Offline
                          kerberosK Offline
                          kerberos
                          wrote on last edited by
                          #19

                          Hi @adds666

                          I did in between the switch from 2.5.12 to 3.4.4 a change from pure textual configuration in 2.5.12 to a UI configuration in 3.4.4. This requires some homework. Can't remember beside the exchanged mysensors binding files anything else to upgrade to 4.0.4 from 3.4.4 and finally to current 4.1.1. Keep in mind, I use a OpenHAB manual installation on a non-Debian Linux system, not openHABian. This may have an influence, but I don't expect any hiccups.

                          kerberos

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


                          24

                          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