Control multiple channels with one item (Zigbee)

Hi guys,

I’m fairly new to the smart home area.

I’ve set up openhab on a raspberry using the openhabian distribution.
My goal is to connect a few zigbee devices using the zigbee binding and a cc2531. This actually works out quite well (except for the xiaomi door sensor… I’ll try my luck with that further though.)

One question which arose for me today is:
What’s the best way to control 2 things (or channels) using one item?
I have a Phillips dimmer switch and a phillips hue lamp.
My plan is to be able to control the lamp using alexa, the openhab app and the dimmer switch. If I try to add the same item to the dimmer and the lamp, then nothing happens if I press a button on the dimmer.
I found out that if I add an item to the lamp and another item to the dimmer, and then add the item of the lamp to the dimmer with the profile system.follow instead of system.default, then it somehow works. (As in clicking on the dimmer and making the lamp go on or off). Though it is kinda delayed (as in “follows”)
What’s the best way based on your experience to link those two items together?

Thank you!
Best regards, Alex

Control them via groups and rules? Way easiest and must configurable option.
FYI you can also set up groups in Z2m. This is helpful for switches, identical lamps etc

1 Like

Thank you.
I’ll try out zigbee2mqtt and also the rules.
Up until now I just tried the experimental rule engine in the paper ui, but I dont think it’s possible to save a dimmer value in a variable there and then assign that to the dimmer value of the lamp.
Maybe I can do that with the “real” rules.

honestly it’s not so hard what you are trying to accomplish. I don’t know the paperui rules, never used them. Always sticked with the files.
However I guess you want to control a lamp both via openhab (interface via web browser or app) and the physical dimmer.
The solution is pretty simple:

  • you set everything up in zigbee2mqtt
  • you but in the things file of mqtt these two devices (lamp and dimmer)
  • add there the channels that these devices expose
  • add in an items file for every channel an item
  • then make one rule: when dimmer item changes its value
  • in this rule, simply send the current dimmer value to the brightness/color item of the lamp that you defined

Done. I know it may be hard to understand at the beginning, however here are many examples of how to configure zigbee2mqtt and how to handle rules. After you understand this, it’s a piece of cake.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.