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. MySensors 2.0: can't get openhab item definition

MySensors 2.0: can't get openhab item definition

Scheduled Pinned Locked Moved OpenHAB
3 Posts 2 Posters 1.7k Views 2 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.
  • staehlerS Offline
    staehlerS Offline
    staehler
    wrote on last edited by
    #1

    Hi,
    I'm running openhab 1.8.3 and a mys-mqtt gatway (Version1.5). Everything works fine, but I want to upgrade to MySensors 2.0.
    I built the raspberry mys-mqtt gateway version 2.0, which seems to work fine, as it finds some of my sensors. At the moment I'm not sure, why it doesn't see all sensors, might be because of the small antenna.
    The question is: how do the openhab items have to be defined.
    The gateway shows this output for my pressure sensor:

    mysGateway: Sending message on topic: MyMQTT/0/255/0/0/18
    mysGateway: TSF:MSG:READ,27-27-0,s=5,c=1,t=4,pt=7,l=5,sg=0:1026
    mysGateway: Sending message on topic: MyMQTT/27/5/1/0/4
    mysGateway: Message arrived on topic: MyMQTT/27/5/1/0/4
    mysGateway: TSF:MSG:SEND,0-0-27-27,s=5,c=1,t=4,pt=0,l=4,sg=0,ft=0,st=OK:1026
    
    

    The mosquitto shows me:

    MyMQTT/27/5/1/0/4 1026
    

    The corrsponding openhab item (which works for my mqtt gateway version 1.5) looks like:

    Number node27_pressure	"Luftdruck [%.1f hPa]"	<sensor>  (gMySensors,gInfluxDB)	{mqtt="<[mysensor:MyMQTT/27/5/V_PRESSURE:state:default]"}
    

    I fear, this old item definition isn't compatible with mysensors 2.0 any more, right?
    Regarding to the documentation and the mqtt message I think the mqtt-part in the items definition needs to be changed. Is there already a documentation available?

    My assumption is for MyMQTT/27/5/1/0/4
    27= nodeID (obvious)
    5 = sensorID (obvious, too)
    1 = message-type (set), when do I need req?
    0 = ack (no idea, what this is for)
    4 = variable definition (4=V_PRESSURE)

    Provided, my assumtion is correct: when do I need to use set and req (message-type). Which value do I need for ack?
    I also have items, which send commands from openhab to actuator, like

    Switch node24_sw0	"Schalter Ringleitung" 	<socket> (gMySensors,gInfluxDB,gAbstellkammer)	{mqtt=">[mysensor:MyMQTT/24/0/V_LIGHT:command:ON:1],>[mysensor:MyMQTT/24/0/V_LIGHT:command:OFF:0]"}
    

    How do I need to set the mqtt part than?

    Thanks for every tipp!

    1 Reply Last reply
    0
    • staehlerS Offline
      staehlerS Offline
      staehler
      wrote on last edited by
      #2

      Is nobody using openhab 1 in combination with MySensors2.0?

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Qu3Uk
        wrote on last edited by
        #3

        You need to change the MQTT topics in the OpenHab MQTT config.

        MYS 2.0 is publishing data to this topic.

        MyMQTT/27/5/1/0/4
        

        However openhab is subscribing to this topic.

        MyMQTT/27/5/V_PRESSURE
        

        Hope this helps.

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


        32

        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