Sensor and Children
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?
@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.
@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
@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.
@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...