Confused about groups

Hi all,

I obviously don’t understand groups as well as I thought. If I grep my items file for gSwitchedLights I have:
Group:Switch:OR(ON,OFF) gSwitchedLights "Switched light on: [(%d)]" Switch FF_Balcony_Light "Balcony light" (gExternalLights,gFirstFloor, gSwitchedLights) { channel="zwave:device:157b8d41438:node6:switch_binary" } Switch GF_Bathroom_Light "Bathroom light" <contact> (gGroundFloor, gInternalLights, gSwitchedLights) { channel="zwave:device:157b8d41438:node22:switch_binary" }

Now, if I check the status of GF_Bathroom_Light from karaf I see:
openhab> smarthome:status GF_Bathroom_Light ON

But if I check ‘gSwitchedLights’ I get NULL back. Shouldn’t this be ON (or true or something)? What am I doing wrong/misunderstanding?

As an aside, I assume that I need to have separate groups for Switched and Dimmed lights, since they’re different types?

Hmm. Rebooting Openhab2 fixed this. Strange.

I have seen some weird and inconsistent behaviors with Groups in OH 2. The biggest issue I’ve seen is removing an Item from a Group takes some maneuvering to get it to be fully removed.

It depends on what the Group is for. If you are using it to put all the members on your sitemap with one line or to iterate through in a Rule you can put any type of Item into a Group.

If you want to send an ON/OFF command to all your Switches and Dimmers using the Group you can do put them all in that one Group too. I’m not entirely certain how well or whether the OR(ON,OFF) will work right though but it is worth a try. Dimmers can accept ON/OFF commands so the commanding would work for sure.

However, if you want to have a Group to set the Dimmer value of all your Dimmers and/or know the aggregate of your Dimmers (MIN, MAX, AVG) you will need to put the Dimmers into a separate Dimmer Group.