Mapping multiple items to the same thing/channel

While refactoring my openHAB2 setup, during a process copying and renaming files, I ended up with multiple items (with different names) mapped to the same thing/channel (a Z-Wave device).

Before cleaning up the mess, I decided to play around with it for a while to see how it worked. As far as I can see it works without any problems; state updates from the device (thing) are posted to both items, and commands initiated by any of the items are sent to the device (thing).

This leads me to wonder if it is OK to do this, and even if it is actually so that this works by design, rather than by chance?

From a technical perspective, are there any reasons for not doing this? Any pitfalls down the road that I should be aware of?

1 Like

That is how I would expect it to work. I’ve not seen nor read anything to indicate that mapping one Channel to more than one Item would be a problem. And in fact I’ve inadvertently done the same because I had my mode set to Simple Mode which means OH 2 has been creating all sorts of Items for me behind the scenes so most of my zwave Items have been duplicated all this time.

It is adding more CPU and memory load to your system. It is probably imperceptible though. It could also add a smidgen of latency in the binding’s ability to send the updates to Items since it has more than one to send it to. Again, this is probably imperceptible.

1 Like

It is by design! It is even supported directly in the Paper UI (when disabling the “simple linking mode”):

Regards,
Kai

That’s what I hoped and expected, but it is always good to have it confirmed by a reliable source, :slight_smile:

Obviously this is not to be taken as me not considering @rlkoshak a reliable source! I think you got my meaning, :slight_smile:

1 Like

I’m far less reliable than the developers. I have been caught out leaping to the wrong conclusion on a number of occasions.