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:

    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





Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.