Sensor and Children


  • Mod

    Is it wanted behaviour that a sensor, let's say with 1 dht sensor (== 2 children), sees each child as a different 'thing' and not just one?


  • Hero Member

    @marceltrapman Yes! 🙂 But of course we're open to other ideas. For example, I've a node with three lights together with a temperature and humidity sensor.
    In OpenHAB I've five things.


  • Mod

    @TimO The zwave binding sees a multi sensor (temp, humid, lux, movement) as one thing. This makes that they show up as one thing in paper ui as well. Makes management a lot easier (although I must admit that the amount of items is much much more).

    Just thinking out loud 🙂


  • Hero Member

    @marceltrapman I see the big advantage in that. But there is a big disadvantage too. This way we need to hardcode every possible thing, like in zwave: https://github.com/openhab/org.openhab.binding.zwave/tree/master/ESH-INF/thing

    So, if someone creates a relay with temperature node: we need a new thing.
    If a second relay is added to node above: an additional thing.
    A third relay ...
    A irrigation controller with 32 valves ... 😄

    An additional problem: how do we distinguish between different child ids? Currently you are free to use child id 1-254 for a node. If I hardcode this, the child id in the binding needs to match the child id in the sketch.


  • Mod

    @TimO Hmm, why hardcode?

    I give the sensor a name and version (which is not yet used by the binding if I am correct).
    I define the children which have ids and types.
    So, the binding can recognise the parent (name, version) and the child (id, type).

    I am not yet familiar with the internals of OpenHAB and a binding (maybe I should learn that first 🙂 ) but I assume (or should I say hope) that you can 'glue' them together on the fly...


Log in to reply
 

Suggested Topics

  • 22
  • 4
  • 132
  • 135
  • 2
  • 19

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts