Group state does not update when items update

Hi all,

Still quite new to OpenHab, but very happy with it at the moment. I’m trying out the use of groups so that I can switch off all my lights at one, eventually. Right now, I’m just trying to show the number of active lights in my basicUI.

When I open the basic UI, It presents 2 light switches, that I can use to switch on/off the lights. In addition, it has a text saying “Number of lights on” which mentions the number of lights that are switched on. This number is correct, but is not updated when I switch on/off a light unless I refresh the page. Is there something that I’m missing here? Or does this need to be covered with a rule (I hope not, and if so: how)?


Group gLights

Switch Light1 <switch> (gLights) { channel="loxone:..." }
Switch Light2 <switch> (gLights) { channel="loxone:..." }

Group:Number:SUM gLights "Number of lights switched on: [%d]" <slider>


Text item=gLights
Switch item=Light1 label="Light 1"
Switch item=Light2 label="Light 2"

My configuration:

  • openhab2 version 2.2.0~20171206234049-1
  • OSX
  • java version 1.8.0_151

Thank you!

You have defined your gLights group twice which could be causing problems. Remove the first one and see if that makes a difference.

That doesn’t seem to solve the issue, unfortunately. Indeed, I noticed that the icon also doesn’t change colour from green (light on) to red (light off) unless I refresh the page. It seems to be something to do with updates not happening in BasicUI. Symptoms that I now identified:

  • The “number of lights switched on” is not updated in BasicUI unless I refresh the page.
  • The icon for a light does not change colour when pressed in BasicUI unless I refresh the page.
  • Switching a light in PaperUI does not change the state of that light in the BasicUI.
  • Switching a light in BasicUI does change the state of that light in PaperUI.

This is true in Chrome, Safari and Firefox.

Did you already restart openhAB?

Restarting made it work! Thank you!