Zigbee2mqtt groups - update of the status of each entity of the group

Thanks for the great zigbee2mqtt; installed it on a nuc / hassio / docker environment. So far running smoothly.

Have a couple of hue lights.

Played with the new “group” functionality in zigbee2mqtt. Also running fine but there is one issue I am struggling to solve (just starting with mqtt).

I have a light group “kitchen” defined.

This group obviously has a couple of entities.

When I change the state of this group to for instance “on” the light bulbs are getting on.

But,

the several entities of the group

light.led1, light.led2, light.led3

are not getting this new status “on” within the UI.

How can I get the status of the entities of an group refreshed / synced in home assistant?

On a z-wave network the entities are updated without any further actions (by design of the network), in zigbee/mqtt it seems to be that the entities needs to be refreshed by code?

Does anybody have an idea?

Thanks
fregatte

Will try to make it more clear.

My light group is “lights_kitch_window” (group defined via “zigbee2mqtt/bridge/group/lights_kitch_window/add”).

One entity of this group is:
“hue_kitch_ssw_1”

switching on the light group (all leds of the group are shining; status of the light group within the UI changing accordingly:

zigbee2mqtt:debug 5/12/2019, 8:30:21 PM Received MQTT message on ‘zigbee2mqtt/lights_kitch_window/set’ with data ‘{“state”: “ON”}’
zigbee2mqtt:info 5/12/2019, 8:30:22 PM Zigbee publish to group ‘4’, genOnOff - on - {} - {“manufSpec”:0,“disDefaultRsp”:0} - null
zigbee2mqtt:info 5/12/2019, 8:30:22 PM MQTT publish: topic ‘zigbee2mqtt/lights_kitch_window’, payload ‘{“state”:“ON”,“brightness”:255,“color_temp”:500}’:

But status of the entity “hue_kitch_ssw_1” remains unchanged.

Even if I publish for the individual entity:
zigbee2mqtt/hue_kitch_ssw_1/get

zigbee2mqtt:debug 5/12/2019, 8:32:43 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:debug 5/12/2019, 8:33:24 PM Received MQTT message on ‘zigbee2mqtt/hue_kitch_ssw_1/get’ with data ‘’
zigbee2mqtt:info 5/12/2019, 8:33:24 PM Zigbee publish to device ‘0x0017880104320f23’, genLevelCtrl - read - [{“attrId”:0}] - {“manufSpec”:0,“disDefaultRsp”:0} - null
zigbee2mqtt:debug 5/12/2019, 8:33:24 PM Received zigbee message of type ‘readRsp’ with data ‘{“cid”:“genLevelCtrl”,“data”:{“currentLevel”:254}}’ of device ‘LTW013’ (0x0017880104320f23) of endpoint 11
zigbee2mqtt:info 5/12/2019, 8:33:24 PM MQTT publish: topic ‘zigbee2mqtt/hue_kitch_ssw_1’, payload '{“state”:“OFF”,“linkquality”:28,“brightness”:254,“color_temp”:235,“color_mode”:2,“color”:{“x”:0.37,“y”:0.373}}'

Is there just no way to update the status of each individual entity if the group where this entity is a member gets a state change payload?

Thanks in advance.

Based on what I have read about zigbee2mqtt groups it is understood to be a group exclusively by zigbee2mqtt.

You said that when you publish {"state": "ON"} to zigbee2mqtt/lights_kitch_window/set all the lights defined in the zigbee2mqtt group called ‘lights_kitch_window’ turn on. In addition, zigebee2mqtt publishes a message to zigbee2mqtt/lights_kitch_window.

What I don’t see in your log is zigbee2mqtt reporting the updated status of each individual light within the ‘lights_kitch_window’ group. Therefore Home Assistant receives no information indicating the lights are now on.

@123,

thanks for responding.

you are right that the zigbee2mqtt groups are exclusively groups by zigbee2mqtt. But it must be also kind of part of the zigbee standard in general as each entities stores the information if it is part of the group itself and therefore nows if it needs to be triggered if a command to the group is sent. This way the traffic on the zigbee network can be highly reduced.

As you mentioned HA does not know which entities are members of the group.

But what I do not get is that even if I query an individual entity via zigbee network command:
‘zigbee2mqtt/hue_kitch_ssw_1/get’

I am getting the wrong status of the entity:
‘zigbee2mqtt/hue_kitch_ssw_1’, payload ‘{“state”:“OFF”,“linkquality”:28,“brightness”:254,“color_temp”:235,“color_mode”:2,“color”:{“x”:0.37,“y”:0.373}}’
as this entity is “on”.

Thanks!

The behavior you have described suggests there may be a problem with how the zigbee2mqtt software is handling the group’s state. I believe you should post an issue zigbee2mqtt’s GitHub repository.

There seems to be an update to 1.4 (@koenkk thanks for that).

it comes with a new functionality:
" State changes
When one of the devices in a group changes it’s state, the group state will also update." (but sadly not the other way around)

But even after reflashing the usb hub in hassio it still shows 1.3.1 and the new group state functionality does not seem to work (at least for me).

my config.yaml (part of it):

devices:
‘0x0017880104307857’:
friendly_name: hue_kitch_nnw_7
retain: false
‘0x0017880104307bdf’:
friendly_name: hue_kitch_nnn_6
retain: false
‘0x001788010430852b’:
friendly_name: hue_kitch_eee_4
retain: false
‘0x001788010432078c’:
friendly_name: hue_entr_eat_www_8
retain: false
.
.
.
groups:
‘1’:
devices:
- ‘0x0017880104307857’
- ‘0x0017880104307bdf’
- ‘0x001788010430852b’
- ‘0x001788010432078c’
.
.
.
‘2’:
devices:
- ‘0x0017880104ddd397’
- ‘0x0017880104ddd7ed’
- ‘0x001788010432078c’
- ‘0x0017880104df4506’
- ‘0x0017880104df5774’
friendly_name: lights_eating
.
.
.

Hassio update will be available soon

sounds promising; thanks!!

There is the report functionality, but I haven’t got it working with my hue lights

I am having the same issue.

The only way to get Zigbee2mqtt “stable”, as in turning on several lights (up to eight) on and off reliably through a Shelly Switch (yes, the Shelly Switch is “detached”, so the lights are always powered) was to move from HA-light-groups to “Zigbee2mqtt”-groups.
Now my switches turn on “the group”, compared to previously up to eight individual lights consecutively.
This works perfectly now.
(I had the impression when using “HA-light-groups”, that the Zigbee network was overwhelmed with packages. It never reliably turned on and off all lights, and if it did, it did it in a sequence taking up to 3-4 seconds after another …)

But now, when I am switching the “zigbee2mqtt”-group, the individual “states” of the lights are not changed.

How can I realise that individual change?
Can I somehow change “only the state” of the individual lights which are in the “zigbee2mqtt-group”?

/config/light_groups.yaml:

- platform: mqtt
  name: Buero
  schema: json
  command_topic: "zigbee2mqtt/group_lights_buero/set"
  state_topic: "zigbee2mqtt/group_lights_buero"
  color_temp: true
  brightness: true
  rgb: false

/share/zigbee2mqtt/groups.yaml (Zigbee2mqtt-group):

'1':
  friendly_name: group_lights_buero
  optimistic: true
  retain: false
  transition: 1
  devices:
    - '0x086bd7fffe5a75e4'
    - '0x000d6ffffe5f2dc9'
    - '0x000d6ffffe4d6b22'
    - '0x000d6ffffe4d5f1d'
    - '0x000d6ffffe61624c'
    - '0x000d6ffffe4c9d30'
    - '0x000d6ffffe53441b'
    - '0x000d6ffffe4d639a'

Set report: true

Thank you @francisp!

That was exactly it!
I am not sure why this config was missing from my zigbee2mqtt-config - never understood the “report”-flag, I guess :slight_smile:

It did not help me.
If i turn off a group. i have 1 lamp that does not change status. but it turns off :frowning: