Link several things to one item and one item to several things

* Platform information:

  • Hardware: Raspberry Pi 2 + Tradfri gateway + several tradfri bulbs
  • OS: openrhabbianpi, latest
  • openHAB version: 2 … something. just installed ^^

* Issue:
I have the Tradfri GW and several bulbs. Lets talk of just the white bulbs to keep it simple. 3 of them are installed in one of my ceiling lamps.
So, for the first i’d like to link all the bulbs to one item, so openhab “knows”, there are 3 bulbs, but all of them should do the same actions at the same time.
I created one item “brightness” as type “dimmer” and linked the brightness channel of all bulbs to this item. Now i see all 3 bulbs separated but when i pull the dimmer of one, all 3 do the same thing. This is right, but i mentioned to have all the bulbs shown as one thing. Is this possible?

And the second point is: I’d like to link a second item, a switch, to all 3 bulbs. So it is linked at the same time as the dimmer, but the switch only (yeah, this is logic XD ) switches between 0% and “last state” of the bulbs-brightness. Is this possible too?
PS: as i created a second item, a switch, and linked it to the brightness channel of all 3 bulbs. Everything stopped working then! So i could not even dimm them. After deleting the switch, i could dimm them again …

I’m having strange networking issues right now so can’t provide the links.

Look at the Groups section of the Items Doc. Create a Group:Dimmer and add all the bulbs to this Group. Use the Group as the Item to control all the lights as one and put the Group on the sitemap or HABPanel.

This is another approach if you never want to control or see the status of each bulb individually, or mix bulbs from different technologies.

See them where? If you have one Item linked to each channel and only put this one Item on your sitemap or HABPanel you should be set. If you are looking at PaperUI, know that PaperUI is an administration UI, not a user’s interface. As an administration UI it will always show all your Things and PaperUI created Items.

Yes. Just put your Dimmer Item or Group:Dimmer on your sitemap or HABPanel as a Switch, or in your rules sendCommand(ON). Dimmer Items can receive ON/OFF commands.

1 Like

Create a Group:Dimmer and add all the bulbs to this Group. Use the Group as the Item to control all the lights as one and put the Group on the sitemap or HABPanel.

Wow … this is kinda confusing first, because you need one GUI to administrate and another to control things and both must be configurated independent ^^
But i figured it out. I deleted the one dimmer item, created 3 of them. Linked every dimmer to one bulb. Then created the groupd and linked all items to this group. Then started HABpanel and created a widget with the group and voila … it works like i want it to :smiley:
First success. Thanks!

Just put your Dimmer Item or Group:Dimmer on your sitemap or HABPanel as a Switch

Yay :smiley: nice, this works too.
I’m also alsways “hunting” bugs ^^ so guess i found one.
As mentioned i created a widget as dimmer of the dimmer group. This works fine.
Now i created a widget as switch of dimmer group. Works also fine switching “last state” and off.
BUT! when i pull the dimmer widget to 50 percent, then turn off the switch and pull the dimmer again to (lets say) 60%, lights go on with 60% brightness, but switch still says “off”.
Nothing special, just want to mention it :wink:

Thanks for the help.
I’ll continue to experiment :slight_smile:
Next project will be the try to link my Google Home to Tradfri mit openHAB as kinda “translator”.

You don’t really configure PaperUI. It just sort of is. But you use it to create Items and Things and install bindings and such. You wouldn’t want to expose those to a regular user of your home automation.

The Beginner’s Tutorial is supposed to make this clear. If it isn’t then let us know so we can improve the tutorial.

If it isn’t then let us know so we can improve the tutorial.

Well, i’m not a pro in such things and after trying hassio and failing it (cause it just doesnt want to find any of my devices) openhab was the second thing i tried and it was like the tutorial told me to use PaperUI for beginning.
Maybe it was just me skipping a few steps and missed out the “use HABpanel for controls” part :slight_smile:

But overall i can tell you, its pretty much a nice thing.
Easy to install and initial config and after reading a bit docs also easy to administrate and control.
I love it :smiley:

Glad to hear it. Let us know when we can help out.

As you get advanced and start to work with Rules, don’t miss out on the Design Pattern postings which show generic ways to solve common problems.

1 Like

Just one more Question about this…
I created some Dashboards on HABpanel and some widgets and such … works nice.
But when i open up the HABpanel page on my smartphone its just empty. Do openHAB offer different pages for different devices?

HABPanel has the option of saving a different panel for each device. You need to save it on the server and make it the default to have the same panel available on more than one device.

I’m not HABPanel expert so search the forum and read the docs for how to do that.

1 Like

Thanks.
If someone else is looking for that:

  • Open HABpanel on PC.
  • Click on top left on the 3 bars.
  • Click at bottom left on the gear-wheel.
  • Select “Save the current configuration to a new panel configuration” and choose a name whatever you want.
  • Now open up HABpanel on the other device you like.
  • Select “advanced” and “import”.
  • Chooste the name you given your panel before.