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. Things definition vs nodes and childIDs

Things definition vs nodes and childIDs

Scheduled Pinned Locked Moved OpenHAB
4 Posts 2 Posters 655 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.
  • F Offline
    F Offline
    fredswed
    wrote on last edited by
    #1

    Hi guys,

    I've set up a couple of MySensors nodes in OpenHAB and it's working fine. However, I am a bit surprised by the number of things definitions I need.

    Currently, I have defined one thing per MySensors childID.
    Is this really necessary or have I missed something?

    Wouldn't it be more preferable to define one thing per MySensors node?
    (Things in OpenHAB should are meant to represent the physical layer which seems to align well with the MySensors node level.)

    For example, I have a (node manager) temperature/humidity node with battery status, defined in three OpenHAB things:

    Thing temperature MYS_Node10_Temp  "MYS 10-0 Temperature" [ nodeId=10, childId=1 ]
    Thing humidity    MYS_Node10_Humid "MYS 10-1 Humidity"    [ nodeId=10, childId=2 ]
    Thing multimeter  MYS_Node10_Maint "MYS 10-1 Maintenance" [ nodeId=10, childId=201 ]
    

    I have a total of five items linked to the things:

    Number MYS_10_Temp    "Temp [%.1f°C]"    <temperature> (gTemp, gMySensors)   ["CurrentTemperature"] { 
        channel="mysensors:temperature:MYS_gw1:MYS_Node10_Temp:temp" }
    Number MYS_10_Humid   "Humid [%.1f%%]"   <humidity>    (gHumid, gMySensors)  ["CurrentHumidity"] { 
        channel="mysensors:humidity:MYS_gw1:MYS_Node10_Humid:hum" } 
    Number MYS_10_BatStatus "Batteristatus [%.1f%%]" <batterylevel>     (gBattery, gMySensors) { 
        channel="mysensors:multimeter:MYS_gw1:MYS_Node10_Maint:battery" }
    Number MYS_10_BatVoltage "Batterispänning [%.1f]" <batterylevel>     (gBattery, gMySensors) { 
        channel="mysensors:multimeter:MYS_gw1:MYS_Node10_Maint:volt" }
    DateTime MYS_10_LastUpdate "Last update [%1$ta %1$tR]" <time>  (gLastUpdate, gMySensors) { 
        channel="mysensors:multimeter:MYS_gw1:MYS_Node10_Maint:lastupdate" }
    

    Is there a smarter or more efficient way of settings this up?

    G 1 Reply Last reply
    0
    • F fredswed

      Hi guys,

      I've set up a couple of MySensors nodes in OpenHAB and it's working fine. However, I am a bit surprised by the number of things definitions I need.

      Currently, I have defined one thing per MySensors childID.
      Is this really necessary or have I missed something?

      Wouldn't it be more preferable to define one thing per MySensors node?
      (Things in OpenHAB should are meant to represent the physical layer which seems to align well with the MySensors node level.)

      For example, I have a (node manager) temperature/humidity node with battery status, defined in three OpenHAB things:

      Thing temperature MYS_Node10_Temp  "MYS 10-0 Temperature" [ nodeId=10, childId=1 ]
      Thing humidity    MYS_Node10_Humid "MYS 10-1 Humidity"    [ nodeId=10, childId=2 ]
      Thing multimeter  MYS_Node10_Maint "MYS 10-1 Maintenance" [ nodeId=10, childId=201 ]
      

      I have a total of five items linked to the things:

      Number MYS_10_Temp    "Temp [%.1f°C]"    <temperature> (gTemp, gMySensors)   ["CurrentTemperature"] { 
          channel="mysensors:temperature:MYS_gw1:MYS_Node10_Temp:temp" }
      Number MYS_10_Humid   "Humid [%.1f%%]"   <humidity>    (gHumid, gMySensors)  ["CurrentHumidity"] { 
          channel="mysensors:humidity:MYS_gw1:MYS_Node10_Humid:hum" } 
      Number MYS_10_BatStatus "Batteristatus [%.1f%%]" <batterylevel>     (gBattery, gMySensors) { 
          channel="mysensors:multimeter:MYS_gw1:MYS_Node10_Maint:battery" }
      Number MYS_10_BatVoltage "Batterispänning [%.1f]" <batterylevel>     (gBattery, gMySensors) { 
          channel="mysensors:multimeter:MYS_gw1:MYS_Node10_Maint:volt" }
      DateTime MYS_10_LastUpdate "Last update [%1$ta %1$tR]" <time>  (gLastUpdate, gMySensors) { 
          channel="mysensors:multimeter:MYS_gw1:MYS_Node10_Maint:lastupdate" }
      

      Is there a smarter or more efficient way of settings this up?

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

      @fredswed As far as I know, there isn't a better way. A thing is indeed a phisycal object, and a node groups several of them. :shrug:

      Can I ask you which kind of connection/gateway are you using? I'm strugling with the mqtt gateway and the binding.

      Thanks

      F 1 Reply Last reply
      1
      • G Guillermo Schimmel

        @fredswed As far as I know, there isn't a better way. A thing is indeed a phisycal object, and a node groups several of them. :shrug:

        Can I ask you which kind of connection/gateway are you using? I'm strugling with the mqtt gateway and the binding.

        Thanks

        F Offline
        F Offline
        fredswed
        wrote on last edited by
        #3

        @guillermo-schimmel Thanks for your response - I would rather consider the node to be the single physical object that provides one or several capabilities (items). Much the same way the Hue, Trådfri or BigAssFan bindings do it.

        I currently use a ESP8266 gateway connected by WiFi. I've tried the MQTT connection but couldn't really see any real benefit. The downside was that it was really hard to troubleshoot in OpenHAB as I needed the old mqtt binding for other stuff. I noted that OH2.4 switched to the new Eclipse MQTT binding so I expect it to be easier to set up MySensors with MQTT in OH2.4 and later.

        G 1 Reply Last reply
        0
        • F fredswed

          @guillermo-schimmel Thanks for your response - I would rather consider the node to be the single physical object that provides one or several capabilities (items). Much the same way the Hue, Trådfri or BigAssFan bindings do it.

          I currently use a ESP8266 gateway connected by WiFi. I've tried the MQTT connection but couldn't really see any real benefit. The downside was that it was really hard to troubleshoot in OpenHAB as I needed the old mqtt binding for other stuff. I noted that OH2.4 switched to the new Eclipse MQTT binding so I expect it to be easier to set up MySensors with MQTT in OH2.4 and later.

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

          @fredswed Yes I'm testing that now. I think it's working. Auto discovery is nice.

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


          31

          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