Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: group support #764

Closed
1 task
Koenkk opened this issue Dec 27, 2018 · 277 comments
Closed
1 task

Testing: group support #764

Koenkk opened this issue Dec 27, 2018 · 277 comments
Labels
stale Stale issues

Comments

@Koenkk
Copy link
Owner

Koenkk commented Dec 27, 2018

This issue is used to gather feedback on the group support feature (#15).

Todo:

  • Refresh state of bulbs when changed via group.

Notes:

@Koenkk Koenkk mentioned this issue Dec 27, 2018
@Koenkk Koenkk changed the title Testing: groups support Testing: group support Dec 27, 2018
@dcshoes23
Copy link
Contributor

Thanks for this! I'm having one issue, when I call zigbee2mqtt/bedroom_lights/set, I get the following error:

Failed to find device with ieeAddr: 'bedroom_lights'

@dcshoes23
Copy link
Contributor

I used zigbee2mqtt/group/bedroom_lights/set instead and it works! Awesome job!

@Koenkk
Copy link
Owner Author

Koenkk commented Dec 27, 2018

@dcshoes23 please update to the latest dev branch, zigbee2mqtt/group/bedroom_lights/set is the "old" api (I've changed it a few hours ago).

@dcshoes23
Copy link
Contributor

@Koenkk Just pulled the latest-dev now and it works with zigbee2mqtt/bedroom_lights/set, thanks!

@subzero79
Copy link

This new fw, does it reduce the number of devices the coordinator can hold ?

@Koenkk
Copy link
Owner Author

Koenkk commented Dec 27, 2018

@subzero79 the CC2531 firmware released together with zigbee2mqtt 1.0.0 had a limit of 20, the new firmware has a limit of 15 (because the stack has to be increased for stability reasons).

In case you only have battery powered devices (aka don't have any routers) you can use the max devices firmware which has a limit of 44 devices.

@dcshoes23
Copy link
Contributor

@Koenkk zigbee2mqtt/bridge/groups/[GROUP_FRIENDLY_NAME]/add worked with the old version and now it doesn't do anything. There is nothing shown in the logs

@Koenkk
Copy link
Owner Author

Koenkk commented Dec 27, 2018

@dcshoes23 it's zigbee2mqtt/bridge/group/[GROUP_FRIENDLY_NAME]/add (group without s) now.

EDIT: fixed the docs.

Koenkk added a commit that referenced this issue Dec 27, 2018
@dcshoes23
Copy link
Contributor

@Koenkk that worked, thanks!

@trekker25
Copy link

looks awesome! setting about 15 GU10 spots so groups are welcome!

@subzero79
Copy link

How likely is the fw to be changed again in the future?
For example to be able to poll an attribute from a device on demand (like xiaomi plugs power, waiting for that feature) when is implemented do you think it will need fw rebuild?
Having to repair all devices is not something I look forward to.

@trekker25
Copy link

How likely is the fw to be changed again in the future?
For example to be able to poll an attribute from a device on demand (like xiaomi plugs power, waiting for that feature) when is implemented do you think it will need fw rebuild?
Having to repair all devices is not something I look forward to.

agree on that. currently only have 4 devices, but think on upgrading soon, but upgrading the firmware without some kind of export / import seems unworkable with 30+ device.s

@Koenkk
Copy link
Owner Author

Koenkk commented Dec 30, 2018

@subzero79 polling attributes doesn't require a firmware update.

@trekker25
Copy link

How does this integrate in best way with Hass?

@Koenkk
Copy link
Owner Author

Koenkk commented Jan 1, 2019

@trekker25 the OP contains a link on how to do this

@trekker25
Copy link

Sorry how could I miss that. In 6 weeks my new kitchen is ready and then can work with it.
Group of 4, another group of 4 and a group of 9 gu10 spots. Curious how this will work out as I only work with wireless switches and sensors and not adding physical switches.

@EquinoxTheGryph
Copy link

Hello,
Can i flash the .hex file (extracted from the zip in https://github.com/Koenkk/Z-Stack-firmware/tree/dev/coordinator/CC2531/bin/) with the alternative flashing method? (Via Arduino, described here: https://koenkk.github.io/zigbee2mqtt/information/alternative_flashing_methods.html)
Thanks in advance!

@Koenkk
Copy link
Owner Author

Koenkk commented Jan 1, 2019

@stcraft If I remember correctly, no

@EquinoxTheGryph
Copy link

EquinoxTheGryph commented Jan 4, 2019

@Koenkk
I've done a bit of research and testing.
It seems removing this line near the bottom of the .hex file:
:0400000500002DD0FA
will do the trick to get the file to flash. (otherwise, the script will spit an error out mentioning something about 05)

I found this out after diff-ing the two hex files (one modded and the other not, Located here: https://github.com/kirovilya/files)
This was the only change being made.

@subzero79
Copy link

I still haven't flashed the group fw, i have 4 plugs in the attic, overall 24 devices. How does the group works if you want to change brightness or color temp? or it can just control on/off?

Also is it possible to add a group to another group? or can one device be in more than one group?

@Koenkk
Copy link
Owner Author

Koenkk commented Jan 7, 2019

@subzero79 its the same as controlling a single device, meaning that color and color temperature can also be changed via a group.

A device can be in multiple groups.

@dreimer1986
Copy link

Is it just me or does switching on/off a group not refresh the status of the light bulbs in Home Assistant? If I switch on group "Living Room" the four lights "Living1" - "Living4" still say that they are switched off. When I try to use the switch in Home Assistant on a light in the group then I get these lines from time to time:

2019-1-9 01:12:55 - info: Zigbee publish to device '0x7cb03eaa00a1184a', genOnOff - on - {} - {"manufSpec":0,"disDefaultRsp":0} - null
2019-1-9 01:12:58 - error: Zigbee publish to device '0x7cb03eaa00a1184a', genOnOff - on - {} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: request timeout

In the other cases it just changes the switch to the now correct setting (ON) and I can switch the light off after the extra step.

@Koenkk
Copy link
Owner Author

Koenkk commented Jan 9, 2019

@dreimer1986 this is indeed not updated, added this as a todo to the OP.

@dreimer1986
Copy link

Thx for fixing it in advance ^^Did not test if color values etc are synced, but I guess not.

@timota
Copy link

timota commented Jan 16, 2019

unfortunately it wont work for me. After stopping zigbee2mqtt need to unplug CC2531 and press reset button to start it again. even with that it can start only with clear config without devices.
With clean config (without devices) i managed to add 3 xiaomi enddevices. but after restart wont start again.

log below

zigbee2mqtt@1.0.1 start /opt/zigbee2mqtt-dev
node index.js

zigbee2mqtt:info 2019-1-16 20:19:52 Logging to directory: 'data/log/2019-01-16.20-19-52'
zigbee2mqtt:debug 2019-1-16 20:19:52 Removing old log directory 'data/log/2019-01-16.20-08-26'
zigbee2mqtt:debug 2019-1-16 20:19:53 Using zigbee-shepherd with settings: '{"net":{"panId":6754,"channelList":[11],"precfgkey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13]},"dbPath":"/opt/zigbee2mqtt-dev/data/database.db","sp":{"baudRate":115200,"rtscts":true}}'
zigbee2mqtt:debug 2019-1-16 20:19:53 Loaded state from file /opt/zigbee2mqtt-dev/data/state.json
zigbee2mqtt:info 2019-1-16 20:19:53 Starting zigbee2mqtt version 1.0.1 (commit #28e3288)
zigbee2mqtt:info 2019-1-16 20:19:53 Starting zigbee-shepherd
zigbee2mqtt:info 2019-1-16 20:19:54 zigbee-shepherd started
zigbee2mqtt:info 2019-1-16 20:19:54 Coordinator firmware version: '20181224'
zigbee2mqtt:debug 2019-1-16 20:19:54 zigbee-shepherd info: {"enabled":true,"net":{"state":"Coordinator","channel":11,"panId":"0x1a62","extPanId":"0xdddddddddddddddd","ieeeAddr":"0x00124b0018ecde53","nwkAddr":0},"firmware":{"transportrev":2,"product":0,"version":"2.6.3","revision":20181224},"startTime":1547669994,"joinTimeLeft":0}
zigbee2mqtt:info 2019-1-16 20:19:54 Currently 3 devices are joined:
zigbee2mqtt:info 2019-1-16 20:19:54 0x00158d000274fe84 (0x00158d000274fe84): MCCGQ11LM - Xiaomi Aqara door & window contact sensor (EndDevice)
/opt/zigbee2mqtt-dev/node_modules/q/q.js:155
throw e;
^

TypeError: Cannot read property 'replace' of undefined
at Object.findByZigbeeModel (/opt/zigbee2mqtt-dev/node_modules/zigbee-shepherd-converters/index.js:20:46)
at Controller.getDeviceStartupLogMessage (/opt/zigbee2mqtt-dev/lib/controller.js:193:54)
at devices.forEach (/opt/zigbee2mqtt-dev/lib/controller.js:82:30)
at Array.forEach ()
at Controller.onZigbeeStarted (/opt/zigbee2mqtt-dev/lib/controller.js:81:17)
at zigbee.start (/opt/zigbee2mqtt-dev/lib/controller.js:149:26)
at shepherd.start (/opt/zigbee2mqtt-dev/lib/zigbee.js:64:17)
at /opt/zigbee2mqtt-dev/node_modules/q/q.js:2055:17
at runSingle (/opt/zigbee2mqtt-dev/node_modules/q/q.js:137:13)
at flush (/opt/zigbee2mqtt-dev/node_modules/q/q.js:125:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.0.1 start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-01-16T20_19_54_639Z-debug.log

is it something with dongle ? or with fw or edge version ?

Thanks

@Koenkk
Copy link
Owner Author

Koenkk commented Jan 17, 2019

After updating to the dev branch, did you do a rm -rf node_modules && npm install?

@timota
Copy link

timota commented Jan 17, 2019

what i did:

  • completely remove zigbee2mqtt directory (prod and dev)
  • git clone DEV
  • npm install & and all necessary steps described on the wiki
  • reflash CC2531
  • reboot NUC

and after all these steps it starts working again.
i see 2 issues:
linux kernel somehow stuck with module, didnt check if it was loaded before reboot.
incorrectly and fully switch dev and prod for zigbee2mqtt

@ChBetz
Copy link

ChBetz commented Jul 28, 2020

@Koenkk HERE is the Log for this command.

I don’t have the device „Dim only” in the network for several months. But it is still known by the broker. Could this perhaps cause the problem?
Should I try to delete it from the broker and try it again?

@Koenkk
Copy link
Owner Author

Koenkk commented Jul 28, 2020

@ChBetz can you execute that command for a device which is NOT in the group but responds to commands?

@ChBetz
Copy link

ChBetz commented Jul 29, 2020

You can find the log HERE.
Seems like the device it is still in two other groups ...

I created a new group now with id=5 and added items to it. There it worked fine and only the items in the group reacted. But after I deleted the group using the mqtt command for it, and asking the device again for its group memberships the group 5 was still there. It seems like the zigbee2mqtt/bridge/config/remove_group command does not unsubscribe the items correctly from the group.

@Koenkk
Copy link
Owner Author

Koenkk commented Jul 29, 2020

@ChBetz that issue has been fixed in zigbee2mqtt 1.14.2

@ChBetz
Copy link

ChBetz commented Aug 2, 2020

@Koenkk many thanks for your help 👍

@embak
Copy link
Contributor

embak commented Aug 30, 2020

Hi Koenkk,

Thank you for this great project.

I'm integrating in HA a baseboard heating system based on Sinope thermostats. The individual zigbee2mqtt commands and readings are working great. Now, I want to set some parameters in "group", like outdoor temp and time.

When I use set parameters on a group, I get the error "No converter available for..."
I reproduced this error with a group containing a single device. Everything I see in groups.yaml, devices.yaml and in database.db seems ok for me. I would appreciate if you can help me.

I'm using Zigbee2mqtt Hass.io Add-on version 1.14.3 on a Raspberry Pi.

==== From the logs =====
Zigbee2MQTT:debug 2020-08-29 21:37:17: Received MQTT message on 'zigbee2mqtt/all_sinope_thermostats/set/thermostat_outdoor_temperature' with data '6'
Zigbee2MQTT:error 2020-08-29 21:37:17: No converter available for 'thermostat_outdoor_temperature' (6)

Zigbee2MQTT:debug 2020-08-29 21:39:01: Received MQTT message on 'zigbee2mqtt/thermostat1/set/thermostat_outdoor_temperature' with data '6'
Zigbee2MQTT:debug 2020-08-29 21:39:01: Publishing 'set' 'thermostat_outdoor_temperature' to 'thermostat1'

===== groups.yaml =====
'1':
friendly_name: all_sinope_thermostats
devices:
- 0x500b914000016201/1

===== devices.yaml =====
'0x500b914000016201':
friendly_name: 'thermostat1'
'0x500b914000011111':
friendly_name: 'thermostat2'

===== database.db (partial) ======
{"id":4,"type":"Group","groupID":1,"members":[{"deviceIeeeAddr":"0x500b914000016201","endpointID":1}],"meta":{}}

@Koenkk
Copy link
Owner Author

Koenkk commented Aug 30, 2020

@embak should be fixed now.

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

@embak
Copy link
Contributor

embak commented Aug 30, 2020

@Koenkk
I switched to zigbee2mqtt_edge one hour ago. Now I get " TypeError: entity.write is not a function " when publishing to the thermostat_group. Works fine when publishing directly to the thermostat in this group.

======= Logs ========
Zigbee2MQTT:debug 2020-08-30 09:26:59: Received MQTT message on 'zigbee2mqtt/th1/set/thermostat_outdoor_temperature' with data '5'
Zigbee2MQTT:debug 2020-08-30 09:26:59: Publishing 'set' 'thermostat_outdoor_temperature' to 'th1'

Zigbee2MQTT:debug 2020-08-30 09:27:43: Received MQTT message on 'zigbee2mqtt/thermostat_group/set/thermostat_outdoor_temperature' with data '6'
Zigbee2MQTT:debug 2020-08-30 09:27:43: Publishing 'set' 'thermostat_outdoor_temperature' to 'thermostat_group'
Zigbee2MQTT:error 2020-08-30 09:27:43: Publish 'set' 'thermostat_outdoor_temperature' to 'thermostat_group' failed: 'TypeError: entity.write is not a function'
Zigbee2MQTT:debug 2020-08-30 09:27:43: TypeError: entity.write is not a function
at Object.convertSet (/app/node_modules/zigbee-herdsman-converters/converters/toZigbee.js:1884:30)
at EntityPublish.onMQTTMessage (/app/lib/extension/publish.js:214:52)
at Controller.callExtensionMethod (/app/lib/controller.js:365:44)
at Controller.onMQTTMessage (/app/lib/controller.js:262:14)
at MQTT.emit (events.js:315:20)
at MQTT.onMessage (/app/lib/mqtt.js:95:14)
at MqttClient.emit (events.js:315:20)
at MqttClient._handlePublish (/app/node_modules/mqtt/lib/client.js:1271:12)
at MqttClient._handlePacket (/app/node_modules/mqtt/lib/client.js:410:12)
at work (/app/node_modules/mqtt/lib/client.js:321:12)

====== goups.yaml ========
'1':
friendly_name: thermostat_group
devices:
- 0x500b914000016201/1

====== devices.yaml =======
'0x500b914000011111':
friendly_name: 'th2'
'0x500b914000016201':
friendly_name: 'th1'

Koenkk added a commit to Koenkk/zigbee-herdsman that referenced this issue Aug 30, 2020
@Koenkk
Copy link
Owner Author

Koenkk commented Aug 30, 2020

@embak write commands for group were not supported yet, fixed this now.

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

@embak
Copy link
Contributor

embak commented Aug 31, 2020

@Koenkk
Tested mqtt publish messages with a group of 1 and 2 thermostats and it is working... Great !
Thanks for your help

@dreimer1986
Copy link

dreimer1986 commented Sep 1, 2020

As this closed report still is used for some general problems regarding groups, too... I have a question regarding this home assistant integration:

light:
  - platform: mqtt
    schema: json
    name: Schränke
    unique_id: schranke
    command_topic: zigbee2mqtt/group_4/set
    state_topic: zigbee2mqtt/group_4
    color_temp: true
    brightness: true
    xy: true
    brightness_scale: 254

It's mainly being talked about color_temp, brightness and rgb as settings to set according to your devices in the group.
So are these xy and brightness_scale taken from the lamp MQTT manual integration (OSRAM Flex RGBW indoor) on zigbee2mqtt.io needed or better, do they work at all?

@cndian
Copy link

cndian commented Sep 22, 2020

I have created a group by the tab Zigbee2mqtt in Domoticz. I use 3 RGBWW spots from Gledopto but I can only turn the group on/off. No dimming or color change function.

How is that possible?

@m0wlheld
Copy link

Would it be feasible to make z2m groups discoverably by Home Assistant? They could be exposed as a single entity using HA's MQTT discovery feature.

@kevincaradant
Copy link

Same feature asked if possible :)

@Murada99
Copy link

Same feature, please, groups don't work for TRV's (Current version: 1.17.0.1)
I created the device, the group but the mqtt publish does not work.
It works with a single TRV but not with the group.

***** device.yaml ********
'0x5c0272fffec267cc':
friendly_name: '0x5c0272fffec267cc'

***** groups.yaml **********
'1':
friendly_name: all-bedroom-trv
devices:
- 0x5c0272fffec267cc/1
- 0x500b9140000165/1

***** automation ******

  • service: mqtt.publish
    data:
    topic: zigbee2mqtt/all-bedroom-trv/set
    payload: '{"current_heating_setpoint":21}'

***** log *******
Zigbee2MQTT:debug 2021-01-25 17:40:32: Received MQTT message on 'zigbee2mqtt/all-bedroom-trv/set' with data '{"current_heating_setpoint":21}'
Zigbee2MQTT:debug 2021-01-25 17:40:32: Publishing 'set' 'current_heating_setpoint' to 'all-bedroom-trv'

@Gibbz
Copy link

Gibbz commented Jan 29, 2021

do groups work on the ZZH! usb device?
Ive setup a group, and sent the mqtt command, but its not working for me...

groups:
  '1':
    friendly_name: chimes
    devices:
      - 0x5c0272fffecea1b0/1
zigbee2mqtt/chimes/set
{"alarm":true}

@heggink
Copy link

heggink commented Jan 29, 2021 via email

@Gibbz
Copy link

Gibbz commented Jan 30, 2021

Using a zzh i assume?
Does the device need to support groups? or is that a part of the zigbee standard?

@embak
Copy link
Contributor

embak commented Jan 30, 2021

Works for me to with zzh (CC26X2R1_20200805) to control a group of Sinope thermostats devices.

@Murada99
Copy link

Murada99 commented Feb 3, 2021

Currently I’m using the CC2531 USB sniffer in combination with zigbee2mtqq hooked to Home Assistant.
I defined the group within zibbee2mqqt but the groups are not working with my TS0601 type thermostats.

@iturtikov
Copy link

Hello. If I send the message to zigbee2mqtt/MY_GROUP/set to change the group state or change the group's state from any wireless switch device then I receive new state in zigbee2mqtt/MY_GROUP and zigbee2mqtt/MY_DEVICE_GROUP_. If i send {"state": "" } to zigbee2mqtt/MY_GROUP/get then I don't receive new state of the group, only for all device in zigbee2mqtt/MY_DEVICE_IN_GROUP_ separately. As result, after restart of the homeassistant or the zigbee2mqtt it might be received non valid state of group until anybody touch group anyware.

@jd1900
Copy link
Contributor

jd1900 commented Mar 15, 2021

I've tried to change just the color_temp of a lights' group. However, all of the other ligths became "ON" on the eyes of Z2M and HA, but that switch on is not real. So they appear to be "ON" while being "OFF".
It is fine to reamain "OFF", as I didn't change the "ON/OFF" status, but the state should remains as it was. I only want to change it colorTemp to be ready for the time I turn it ON.
It happen as well with "optimistic" equalt to false. But I think it sould never happen regardless of the optimistic value.

It doesn't happen when done individually device by device (right behaviour, in my opinion, which lets you to change the temperature to be already changed).

@eugeneniemand
Copy link

Hi I have a few groups all configured exactly the same (with Optimistic = true and Retain = True), on two groups at night I turn on 1 of 4 lights in the group and it works great, however on two other groups when I turn on one light the whole group turns on and I dont mean the state of the group I mean every lightbulb turns on. It is as if publishing the state of the group then causes all the other lights to react. Also this is intermittent, once in a few executions only the one will turn on as expected. Any ideas would be welcomed. I'm using HA and Yaml MQTT Entities

@Geoff571
Copy link

Geoff571 commented May 16, 2021

I've discovered what I think is an issue with transition: for groups of lights.

I have a cluster or 8 GU10 lights, that work absolutely fine when sent { "state": "ON" }, however if I send { "state": "ON", "transition": 0 } or anything where transition time >0 they mostly don't work or if they do it's very hit and miss.

I've not had a chance to turn up debugging to see if there are errors, but thought I'd give you a heads-up.

EDIT: Raising a separate issue as this one is closed.

@jwoodard80
Copy link

jwoodard80 commented Jul 14, 2021

Would it be possible to add attribute definitions to a group?

max_mireds from bulbs in a group is not exposed to HA during auto discovery.
#8032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues
Projects
None yet
Development

No branches or pull requests