zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Certain IKEA bulbs switching on to lowest brightness on toggle

Open JudahBella opened this issue 8 months ago β€’ 95 comments

What happened?

Some of our IKEA bulbs are switching on to the lowest brightness setting when toggled. Across all the UIs (HK, HA, Z2M) the brightness value still shows as the brightness that the bulb is supposed to be at, but the bulb itself will be very dim. This happened suddenly after Z2M autoupdated to 1.33.1, and it has never happened before. No OTA was done on the bulbs either, so there was no other change.

I first encountered this issue with the ICPSHC24-10EU-IL-1 bulb. I found that setting the transition option to a numerical value instead of leaving it blank solves the issue. I have since set transitions for all bulbs to 1.

However, the above solution does not work for bulbs in groups. Certain bulbs in groups still power on to to a very dim setting on toggle. The odd thing is, (EDIT: when transition is set) toggling the bulb directly will bring the bulb back to its intended brightness, but toggling the entire group would cause the certain bulb to power on dimly. Not all bulbs are affected, only some are, and they all happen to be LED1537R6/LED1739R5 bulbs.

What did you expect to happen?

The bulb should turn on to the last brightness setting when toggling from off to on

How to reproduce it (minimal and precise)

  1. Turn the bulb/group on, set the brightness (e.g. 100%)
  2. Toggle the bulb/group off
  3. Toggle the bulb/group back on (and one of the bulbs will be dim, even though the UI says 100%)

Zigbee2MQTT version

1.33.1

Adapter firmware version

20230507

Adapter

tubeszb-cc2652-eth

Debug log

I'm running HAOS and can't SSH into the host so I'm trying my best here to copy and paste from the addon's logs tab.

Setting Common Toilet Lights to 100% causes all bulbs in the group to be at 100%:

Zigbee2MQTT:debug 2023-10-08 18:02:27: Received MQTT message on 'zigbee2mqtt/Common Toilet Lights/set' with data '{"state":"ON","brightness":254}'
Zigbee2MQTT:debug 2023-10-08 18:02:27: Publishing 'set' 'brightness' to 'Common Toilet Lights'
2023-10-08T10:02:27.020Z zigbee-herdsman:controller:group Command 11 genLevelCtrl.moveToLevelWithOnOff({"level":254,"transtime":0})
2023-10-08T10:02:27.022Z zigbee-herdsman:adapter:zStack:znp:SREQ --> AF - dataRequestExt - {"dstaddrmode":1,"dstaddr":"0x000000000000000b","destendpoint":255,"dstpanid":0,"srcendpoint":1,"clusterid":8,"transid":71,"options":0,"radius":30,"len":6,"data":{"type":"Buffer","data":[17,15,4,254,0,0]}}
2023-10-08T10:02:27.023Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,26,36,2,1,11,0,0,0,0,0,0,0,255,0,0,1,8,0,71,0,30,6,0,17,15,4,254,0,0,123]
2023-10-08T10:02:27.051Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,100,2,0,103]
2023-10-08T10:02:27.051Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,100,2,0,103]
2023-10-08T10:02:27.052Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 4 - 2 - [0] - 103
2023-10-08T10:02:27.052Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- AF - dataRequestExt - {"status":0}
2023-10-08T10:02:27.052Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:02:27.054Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,0,1]
2023-10-08T10:02:27.054Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1]
2023-10-08T10:02:27.055Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [71,129]
2023-10-08T10:02:27.056Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1,71,129]
2023-10-08T10:02:27.056Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [0,1,71] - 129
2023-10-08T10:02:27.057Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":71}
2023-10-08T10:02:27.057Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Zigbee2MQTT:info  2023-10-08 18:02:27: MQTT publish: topic 'zigbee2mqtt/Common Toilet Ceiling', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":370,"level_config":{"on_level":"previous"},"linkquality":29,"power_on_behavior":"on","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"available"},"update_available":true}'
Zigbee2MQTT:info  2023-10-08 18:02:27: MQTT publish: topic 'zigbee2mqtt/Common Toilet Lights', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_temp":370,"state":"ON"}'
Zigbee2MQTT:info  2023-10-08 18:02:27: MQTT publish: topic 'zigbee2mqtt/Common Toilet Counter', payload '{"brightness":254,"level_config":{"on_level":"previous"},"linkquality":36,"power_on_behavior":null,"state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":false}'
Zigbee2MQTT:info  2023-10-08 18:02:27: MQTT publish: topic 'zigbee2mqtt/Common Toilet Cove', payload '{"brightness":254,"linkquality":36,"state":"ON"}'
Zigbee2MQTT:info  2023-10-08 18:02:27: MQTT publish: topic 'zigbee2mqtt/Ceiling Lights', payload '{"brightness":254,"color":{"x":0.4607,"y":0.4108},"color_mode":"color_temp","color_temp":371,"state":"ON"}'

Toggling Common Toilet Lights group OFF:

Zigbee2MQTT:debug 2023-10-08 18:03:19: Received MQTT message on 'zigbee2mqtt/Common Toilet Lights/set' with data '{"state":"OFF"}'
Zigbee2MQTT:debug 2023-10-08 18:03:19: Publishing 'set' 'state' to 'Common Toilet Lights'
2023-10-08T10:03:19.480Z zigbee-herdsman:controller:group Command 11 genOnOff.off({})
2023-10-08T10:03:19.481Z zigbee-herdsman:adapter:zStack:znp:SREQ --> AF - dataRequestExt - {"dstaddrmode":1,"dstaddr":"0x000000000000000b","destendpoint":255,"dstpanid":0,"srcendpoint":1,"clusterid":6,"transid":79,"options":0,"radius":30,"len":3,"data":{"type":"Buffer","data":[17,17,0]}}
2023-10-08T10:03:19.482Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,23,36,2,1,11,0,0,0,0,0,0,0,255,0,0,1,6,0,79,0,30,3,0,17,17,0,145]
2023-10-08T10:03:19.510Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,100,2,0,103]
2023-10-08T10:03:19.510Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,100,2,0,103]
2023-10-08T10:03:19.510Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 4 - 2 - [0] - 103
2023-10-08T10:03:19.511Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- AF - dataRequestExt - {"status":0}
2023-10-08T10:03:19.511Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:03:19.528Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,0,1,79,137]
2023-10-08T10:03:19.528Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1,79,137]
2023-10-08T10:03:19.529Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [0,1,79] - 137
2023-10-08T10:03:19.529Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":79}
2023-10-08T10:03:19.530Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Zigbee2MQTT:info  2023-10-08 18:03:19: MQTT publish: topic 'zigbee2mqtt/Common Toilet Ceiling', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":370,"level_config":{"on_level":"previous"},"linkquality":29,"power_on_behavior":"on","state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":"available"},"update_available":true}'
Zigbee2MQTT:info  2023-10-08 18:03:19: MQTT publish: topic 'zigbee2mqtt/Common Toilet Lights', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_temp":370,"state":"OFF"}'
Zigbee2MQTT:info  2023-10-08 18:03:19: MQTT publish: topic 'zigbee2mqtt/Common Toilet Counter', payload '{"brightness":254,"level_config":{"on_level":"previous"},"linkquality":36,"power_on_behavior":null,"state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":false}'
Zigbee2MQTT:info  2023-10-08 18:03:19: MQTT publish: topic 'zigbee2mqtt/Common Toilet Cove', payload '{"brightness":254,"linkquality":36,"state":"OFF"}'

Toggling Common Toilet Lights group ON causes Common Toilet Ceiling to be dim:

Zigbee2MQTT:debug 2023-10-08 18:04:39: Received MQTT message on 'zigbee2mqtt/Common Toilet Lights/set' with data '{"state":"ON"}'
Zigbee2MQTT:debug 2023-10-08 18:04:39: Publishing 'set' 'state' to 'Common Toilet Lights'
2023-10-08T10:04:39.376Z zigbee-herdsman:controller:group Command 11 genOnOff.on({})
2023-10-08T10:04:39.377Z zigbee-herdsman:adapter:zStack:znp:SREQ --> AF - dataRequestExt - {"dstaddrmode":1,"dstaddr":"0x000000000000000b","destendpoint":255,"dstpanid":0,"srcendpoint":1,"clusterid":6,"transid":94,"options":0,"radius":30,"len":3,"data":{"type":"Buffer","data":[17,19,1]}}
2023-10-08T10:04:39.378Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,23,36,2,1,11,0,0,0,0,0,0,0,255,0,0,1,6,0,94,0,30,3,0,17,19,1,131]
2023-10-08T10:04:39.408Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,100,2,0,103]
2023-10-08T10:04:39.408Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,100,2,0,103]
2023-10-08T10:04:39.409Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 4 - 2 - [0] - 103
2023-10-08T10:04:39.409Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- AF - dataRequestExt - {"status":0}
2023-10-08T10:04:39.409Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:04:39.729Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,0,1,94,152]
2023-10-08T10:04:39.730Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1,94,152]
2023-10-08T10:04:39.730Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [0,1,94] - 152
2023-10-08T10:04:39.730Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":94}
2023-10-08T10:04:39.730Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Zigbee2MQTT:info  2023-10-08 18:04:39: MQTT publish: topic 'zigbee2mqtt/Common Toilet Ceiling', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":370,"level_config":{"on_level":"previous"},"linkquality":29,"power_on_behavior":"on","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"available"},"update_available":true}'
Zigbee2MQTT:info  2023-10-08 18:04:39: MQTT publish: topic 'zigbee2mqtt/Common Toilet Lights', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_temp":370,"state":"ON"}'
Zigbee2MQTT:info  2023-10-08 18:04:39: MQTT publish: topic 'zigbee2mqtt/Common Toilet Counter', payload '{"brightness":254,"level_config":{"on_level":"previous"},"linkquality":36,"power_on_behavior":null,"state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":false}'
Zigbee2MQTT:info  2023-10-08 18:04:39: MQTT publish: topic 'zigbee2mqtt/Common Toilet Cove', payload '{"brightness":254,"linkquality":36,"state":"ON"}'
Zigbee2MQTT:info  2023-10-08 18:04:39: MQTT publish: topic 'zigbee2mqtt/Ceiling Lights', payload '{"brightness":254,"color":{"x":0.4607,"y":0.4108},"color_mode":"color_temp","color_temp":371,"state":"ON"}'

Toggling Common Toilet Ceiling OFF directly:

Zigbee2MQTT:debug 2023-10-08 18:12:23: Received MQTT message on 'zigbee2mqtt/Common Toilet Ceiling/set' with data '{"state":"OFF"}'
Zigbee2MQTT:debug 2023-10-08 18:12:23: Publishing 'set' 'state' to 'Common Toilet Ceiling'
2023-10-08T10:12:23.816Z zigbee-herdsman:controller:endpoint Command 0x804b50fffef64b6d/1 genLevelCtrl.moveToLevelWithOnOff({"level":0,"transtime":10}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false})
2023-10-08T10:12:23.818Z zigbee-herdsman:adapter:zStack:adapter sendZclFrameToEndpointInternal 0x804b50fffef64b6d:29140/1 (0,0,1)
2023-10-08T10:12:23.819Z zigbee-herdsman:adapter:zStack:znp:SREQ --> AF - dataRequest - {"dstaddr":29140,"destendpoint":1,"srcendpoint":1,"clusterid":8,"transid":152,"options":0,"radius":30,"len":6,"data":{"type":"Buffer","data":[1,27,4,0,10,0]}}
2023-10-08T10:12:23.820Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,16,36,1,212,113,1,1,8,0,152,0,30,6,1,27,4,0,10,0,12]
2023-10-08T10:12:23.844Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,100,1,0,100]
2023-10-08T10:12:23.846Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,100,1,0,100]
2023-10-08T10:12:23.846Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 4 - 1 - [0] - 100
2023-10-08T10:12:23.847Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- AF - dataRequest - {"status":0}
2023-10-08T10:12:23.847Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:12:23.849Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,0,1,152,94]
2023-10-08T10:12:23.850Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1,152,94]
2023-10-08T10:12:23.850Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [0,1,152] - 94
2023-10-08T10:12:23.851Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":152}
2023-10-08T10:12:23.851Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:12:23.883Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,5,69,196,212,113,1,89,47,86]
2023-10-08T10:12:23.883Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,5,69,196,212,113,1,89,47,86]
2023-10-08T10:12:23.884Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 5 - 2 - 5 - 196 - [212,113,1,89,47] - 86
2023-10-08T10:12:23.885Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- ZDO - srcRtgInd - {"dstaddr":29140,"relaycount":1,"relaylist":[12121]}
2023-10-08T10:12:23.885Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:12:23.942Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,25,68,129,0,0,8,0,212,113,1,1,0,18,0,213,60,164,0,0,5,8,27,11,4,0,89,47,28,93]
2023-10-08T10:12:23.942Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,25,68,129,0,0,8,0,212,113,1,1,0,18,0,213,60,164,0,0,5,8,27,11,4,0,89,47,28,93]
2023-10-08T10:12:23.943Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 25 - 2 - 4 - 129 - [0,0,8,0,212,113,1,1,0,18,0,213,60,164,0,0,5,8,27,11,4,0,89,47,28] - 93
2023-10-08T10:12:23.943Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":8,"srcaddr":29140,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":18,"securityuse":0,"timestamp":10763477,"transseqnumber":0,"len":5,"data":{"type":"Buffer","data":[8,27,11,4,0]}}
2023-10-08T10:12:23.945Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":27,"manufacturerCode":null,"commandIdentifier":11},"Payload":{"cmdId":4,"statusCode":0},"Command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}},"address":29140,"endpoint":1,"linkquality":18,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}'
2023-10-08T10:12:23.946Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Zigbee2MQTT:info  2023-10-08 18:12:23: MQTT publish: topic 'zigbee2mqtt/Common Toilet Ceiling', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":370,"level_config":{"on_level":"previous"},"linkquality":18,"power_on_behavior":"on","state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":"available"},"update_available":true}'

Toggling Common Toilet Ceiling ON directly with transition value in devices.yaml deleted, bulb turns on but is dim:

Zigbee2MQTT:debug 2023-10-08 18:09:11: Received MQTT message on 'zigbee2mqtt/Common Toilet Ceiling/set' with data '{"state":"ON"}'
Zigbee2MQTT:debug 2023-10-08 18:09:11: Publishing 'set' 'state' to 'Common Toilet Ceiling'
2023-10-08T10:09:11.102Z zigbee-herdsman:controller:endpoint Command 0x804b50fffef64b6d/1 genOnOff.on({}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false})
2023-10-08T10:09:11.104Z zigbee-herdsman:adapter:zStack:adapter sendZclFrameToEndpointInternal 0x804b50fffef64b6d:29140/1 (0,0,1)
2023-10-08T10:09:11.105Z zigbee-herdsman:adapter:zStack:znp:SREQ --> AF - dataRequest - {"dstaddr":29140,"destendpoint":1,"srcendpoint":1,"clusterid":6,"transid":128,"options":0,"radius":30,"len":3,"data":{"type":"Buffer","data":[1,24,1]}}
2023-10-08T10:09:11.107Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,13,36,1,212,113,1,1,6,0,128,0,30,3,1,24,1,14]
2023-10-08T10:09:11.134Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,100,1,0,100]
2023-10-08T10:09:11.135Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,100,1,0,100]
2023-10-08T10:09:11.135Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 4 - 1 - [0] - 100
2023-10-08T10:09:11.135Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- AF - dataRequest - {"status":0}
2023-10-08T10:09:11.136Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:09:11.141Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,0,1,128,70]
2023-10-08T10:09:11.142Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1,128,70]
2023-10-08T10:09:11.142Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [0,1,128] - 70
2023-10-08T10:09:11.143Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":128}
2023-10-08T10:09:11.143Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:09:11.174Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,5,69,196,212,113,1,89,47,86]
2023-10-08T10:09:11.175Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,5,69,196,212,113,1,89,47,86]
2023-10-08T10:09:11.175Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 5 - 2 - 5 - 196 - [212,113,1,89,47] - 86
2023-10-08T10:09:11.176Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- ZDO - srcRtgInd - {"dstaddr":29140,"relaycount":1,"relaylist":[12121]}
2023-10-08T10:09:11.177Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:09:11.231Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,25,68,129,0,0,6,0,212,113,1,1,0,21,0,33,114,220,0,0,5,8,24,11,1,0,89,47,28,144]
2023-10-08T10:09:11.232Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,25,68,129,0,0,6,0,212,113,1,1,0,21,0,33,114,220,0,0,5,8,24,11,1,0,89,47,28,144]
2023-10-08T10:09:11.233Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 25 - 2 - 4 - 129 - [0,0,6,0,212,113,1,1,0,21,0,33,114,220,0,0,5,8,24,11,1,0,89,47,28] - 144
2023-10-08T10:09:11.235Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":29140,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":21,"securityuse":0,"timestamp":14447137,"transseqnumber":0,"len":5,"data":{"type":"Buffer","data":[8,24,11,1,0]}}
2023-10-08T10:09:11.238Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":24,"manufacturerCode":null,"commandIdentifier":11},"Payload":{"cmdId":1,"statusCode":0},"Command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}},"address":29140,"endpoint":1,"linkquality":21,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}'
2023-10-08T10:09:11.239Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Zigbee2MQTT:info  2023-10-08 18:09:11: MQTT publish: topic 'zigbee2mqtt/Common Toilet Lights', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_temp":370,"state":"ON"}'
Zigbee2MQTT:info  2023-10-08 18:09:11: MQTT publish: topic 'zigbee2mqtt/Common Toilet Ceiling', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":370,"level_config":{"on_level":"previous"},"linkquality":21,"power_on_behavior":"on","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"available"},"update_available":true}'
Zigbee2MQTT:info  2023-10-08 18:09:11: MQTT publish: topic 'zigbee2mqtt/Ceiling Lights', payload '{"brightness":254,"color":{"x":0.4607,"y":0.4108},"color_mode":"color_temp","color_temp":371,"state":"ON"}'

Setting transition to 1 and toggling Common Toilet Ceiling ON directly causes bulb to turn on to the correct previous brightness:

Zigbee2MQTT:debug 2023-10-08 18:12:55: Received MQTT message on 'zigbee2mqtt/Common Toilet Ceiling/set' with data '{"state":"ON"}'
Zigbee2MQTT:debug 2023-10-08 18:12:55: Publishing 'set' 'state' to 'Common Toilet Ceiling'
2023-10-08T10:12:55.117Z zigbee-herdsman:controller:endpoint Command 0x804b50fffef64b6d/1 genLevelCtrl.moveToLevelWithOnOff({"level":254,"transtime":10}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false})
2023-10-08T10:12:55.117Z zigbee-herdsman:adapter:zStack:adapter sendZclFrameToEndpointInternal 0x804b50fffef64b6d:29140/1 (0,0,1)
2023-10-08T10:12:55.118Z zigbee-herdsman:adapter:zStack:znp:SREQ --> AF - dataRequest - {"dstaddr":29140,"destendpoint":1,"srcendpoint":1,"clusterid":8,"transid":160,"options":0,"radius":30,"len":6,"data":{"type":"Buffer","data":[1,29,4,254,10,0]}}
2023-10-08T10:12:55.118Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,16,36,1,212,113,1,1,8,0,160,0,30,6,1,29,4,254,10,0,204]
2023-10-08T10:12:55.138Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,100,1,0,100]
2023-10-08T10:12:55.139Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,100,1,0,100]
2023-10-08T10:12:55.139Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 4 - 1 - [0] - 100
2023-10-08T10:12:55.139Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- AF - dataRequest - {"status":0}
2023-10-08T10:12:55.139Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:12:55.155Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,0,1,160,102]
2023-10-08T10:12:55.156Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1,160,102]
2023-10-08T10:12:55.157Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [0,1,160] - 102
2023-10-08T10:12:55.157Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":160}
2023-10-08T10:12:55.157Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:12:55.189Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,5,69,196,212,113,1,89,47,86]
2023-10-08T10:12:55.189Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,5,69,196,212,113,1,89,47,86]
2023-10-08T10:12:55.189Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 5 - 2 - 5 - 196 - [212,113,1,89,47] - 86
2023-10-08T10:12:55.189Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- ZDO - srcRtgInd - {"dstaddr":29140,"relaycount":1,"relaylist":[12121]}
2023-10-08T10:12:55.189Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:12:55.254Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,25,68,129,0,0,8,0,212,113,1,1,0,25,0,142,22,194,0,0,5,8,29,11,4,0,89,47,28,71]
2023-10-08T10:12:55.254Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,25,68,129,0,0,8,0,212,113,1,1,0,25,0,142,22,194,0,0,5,8,29,11,4,0,89,47,28,71]
2023-10-08T10:12:55.254Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 25 - 2 - 4 - 129 - [0,0,8,0,212,113,1,1,0,25,0,142,22,194,0,0,5,8,29,11,4,0,89,47,28] - 71
2023-10-08T10:12:55.254Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":8,"srcaddr":29140,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":25,"securityuse":0,"timestamp":12719758,"transseqnumber":0,"len":5,"data":{"type":"Buffer","data":[8,29,11,4,0]}}
2023-10-08T10:12:55.255Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":29,"manufacturerCode":null,"commandIdentifier":11},"Payload":{"cmdId":4,"statusCode":0},"Command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}},"address":29140,"endpoint":1,"linkquality":25,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}'
2023-10-08T10:12:55.256Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Zigbee2MQTT:info  2023-10-08 18:12:55: MQTT publish: topic 'zigbee2mqtt/Common Toilet Lights', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_temp":370,"state":"ON"}'
Zigbee2MQTT:info  2023-10-08 18:12:55: MQTT publish: topic 'zigbee2mqtt/Common Toilet Ceiling', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":370,"level_config":{"on_level":"previous"},"linkquality":25,"power_on_behavior":"on","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"available"},"update_available":true}'
Zigbee2MQTT:info  2023-10-08 18:12:55: MQTT publish: topic 'zigbee2mqtt/Ceiling Lights', payload '{"brightness":254,"color":{"x":0.4607,"y":0.4108},"color_mode":"color_temp","color_temp":371,"state":"ON"}'

It seems that when the transition option is set, toggling Common Toilet Ceiling ON directly will cause genLevelCtrl.moveToLevelWithOnOff({"level":254,"transtime":10} to be sent and Common Toilet Ceiling will turn on to the correct previous value. With the transition option cleared, genOnOff.on is sent instead, causing Common Toilet Ceiling to be dim.

Regardless, toggling the group ON always always causes genOnOff.on to be sent, causing Common Toilet Ceiling to be dim. Only if I turn on the group by swiping to the brightness in the UI will genLevelCtrl.moveToLevelWithOnOff({"level":254,"transtime":0}) be sent.

JudahBella avatar Oct 08 '23 08:10 JudahBella

Referencing https://github.com/Koenkk/zigbee2mqtt/issues/3333, I decided to try adding transition: 1 to groups.yaml. Strangely enough, genLevelCtrl.moveToLevelWithOnOff({"level":254,"transtime":10}) is sent and all bulbs in the group turn on to the correct previous brightness:

Zigbee2MQTT:debug 2023-10-08 18:40:59: Received MQTT message on 'zigbee2mqtt/Common Toilet Lights/set' with data '{"state":"ON"}'
Zigbee2MQTT:debug 2023-10-08 18:40:59: Publishing 'set' 'state' to 'Common Toilet Lights'
2023-10-08T10:40:59.670Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
2023-10-08T10:40:59.698Z zigbee-herdsman:controller:group Command 11 genLevelCtrl.moveToLevelWithOnOff({"level":254,"transtime":10})
2023-10-08T10:40:59.700Z zigbee-herdsman:adapter:zStack:znp:SREQ --> AF - dataRequestExt - {"dstaddrmode":1,"dstaddr":"0x000000000000000b","destendpoint":255,"dstpanid":0,"srcendpoint":1,"clusterid":8,"transid":29,"options":0,"radius":30,"len":6,"data":{"type":"Buffer","data":[17,10,4,254,10,0]}}
2023-10-08T10:40:59.702Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,26,36,2,1,11,0,0,0,0,0,0,0,255,0,0,1,8,0,29,0,30,6,0,17,10,4,254,10,0,46]
2023-10-08T10:40:59.736Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,100,2,0,103]
2023-10-08T10:40:59.736Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,100,2,0,103]
2023-10-08T10:40:59.736Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 4 - 2 - [0] - 103
2023-10-08T10:40:59.737Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- AF - dataRequestExt - {"status":0}
2023-10-08T10:40:59.737Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-10-08T10:40:59.752Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,0,1,29,219]
2023-10-08T10:40:59.753Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1,29,219]
2023-10-08T10:40:59.753Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [0,1,29] - 219
2023-10-08T10:40:59.753Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":29}
2023-10-08T10:40:59.754Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Zigbee2MQTT:info  2023-10-08 18:40:59: MQTT publish: topic 'zigbee2mqtt/Common Toilet Ceiling', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":370,"level_config":{"on_level":0},"linkquality":25,"power_on_behavior":"on","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"available"},"update_available":true}'
Zigbee2MQTT:info  2023-10-08 18:40:59: MQTT publish: topic 'zigbee2mqtt/Common Toilet Lights', payload '{"brightness":254,"color":{"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_temp":370,"state":"ON"}'
Zigbee2MQTT:info  2023-10-08 18:40:59: MQTT publish: topic 'zigbee2mqtt/Common Toilet Counter', payload '{"brightness":254,"level_config":{"on_level":"previous"},"linkquality":25,"power_on_behavior":null,"state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":false}'
Zigbee2MQTT:info  2023-10-08 18:40:59: MQTT publish: topic 'zigbee2mqtt/Common Toilet Cove', payload '{"brightness":254,"linkquality":98,"state":"ON"}'
Zigbee2MQTT:info  2023-10-08 18:40:59: MQTT publish: topic 'zigbee2mqtt/Ceiling Lights', payload '{"brightness":254,"color":{"x":0.4607,"y":0.4108},"color_mode":"color_temp","color_temp":371,"state":"ON"}'

@Koenkk please advise if this is a bug or expected behaviour, and should I be adding transition to all my groups now? The transition variable is not available to be set in the UI for groups at this point.

JudahBella avatar Oct 08 '23 10:10 JudahBella

Im experiencing the same issue for a couple of days on one group probably since the update to 1.33.1. Switching the group/lights on, through a bound remote or directly, turns them on at 1%. Adding transition: 1 to that group seems to fix it for now...

cwildfoerster avatar Oct 14 '23 20:10 cwildfoerster

This looks similar to https://github.com/Koenkk/zigbee2mqtt/issues/16388#issuecomment-1749489713 and at first glance looks to be a bug of the bulb (off -> on should give the same state back).

  • I find it interesting that this happens only with z2m 1.33.1, what was the last known working z2m version?
  • Does transition: 0 also work?

Koenkk avatar Oct 15 '23 06:10 Koenkk

  • Does transition: 0 also work?

I can confirm that the bug is also present for a group of LED2005R5 (IKEA Tradfri GU10) and that adding transition: 0 or transition: 1 to the group configuration leads to a correct brightness value after powering on. If only the transition time is added to the lightbulb configuration, the standalone switching is correct, but the group switching behavior is still wrong.

Before the zigbee2mqtt update, the lightbulbs (either standalone or as a group) behaved completely normal for several months. Hence, the bug may be introduced with some of the last zigbee2mqtt updates. Unfortunately, I cannot name the last working version from my side.

JoernBrauns avatar Oct 15 '23 11:10 JoernBrauns

This looks similar to #16388 (comment) and at first glance looks to be a bug of the bulb (off -> on should give the same state back).

  • I find it interesting that this happens only with z2m 1.33.1, what was the last known working z2m version?
  • Does transition: 0 also work?

Last known working is 1.33.0. I haven’t tried transition: 0 yet but I think https://github.com/Koenkk/zigbee2mqtt/issues/19211#issuecomment-1763364246 response should be sufficient!

Since posting the issue I have added transition: 1 to all IKEA bulbs and groups with IKEA bulbs in them. All bulbs toggle to the correct brightness.

I have some bulbs that are 1% brightness when β€œoff” and 100% when β€œon”, after sunset. A neat side effect of setting transition: 1 for everything is that they now fade nicely from 1% to 100% and back. These are standalone bulbs, and they used to snap between the brightness levels instead of fading. However, bulbs in groups have always faded, and I’ve always accepted this discrepancy in behaviour. I have never set the transition variable anywhere before this.

Also, setting the transition variable now causes standalone IKEA bulbs to fade more smoothly than previously. Previously, without the variable set, it seemed like the brightness levels were stepped through instead of a smooth fade.

Seems like it might be related to https://github.com/Koenkk/zigbee2mqtt/issues/3333#issuecomment-641767991?

JudahBella avatar Oct 15 '23 14:10 JudahBella

I'm wondering what caused this issue, @JudahBella how are you running z2m? Then I can provide some instructions to downgrade zigbee-herdsman-converters (which is responsible for the device control)

Koenkk avatar Oct 15 '23 17:10 Koenkk

I'm wondering what caused this issue, @JudahBella how are you running z2m? Then I can provide some instructions to downgrade zigbee-herdsman-converters (which is responsible for the device control)

I'm running z2m as a HA addon. I'm not in a hurry to fix this, as setting transition makes it work normally again.

JudahBella avatar Oct 16 '23 02:10 JudahBella

@JudahBella can you ssh into your system and execute:

# Enter z2m container
docker exec -it $(docker ps | grep zigbee2mqtt | cut -d" " -f 1) /bin/bash
cd app
# Install zigbee-herdsman-converters version that with z2m 1.33.0
npm install [email protected]
exit
# Restart z2m container
docker restart $(docker ps | grep zigbee2mqtt | cut -d" " -f 1)

check if it works now

Koenkk avatar Oct 16 '23 18:10 Koenkk

@JudahBella can you ssh into your system and execute:

# Enter z2m container
docker exec -it $(docker ps | grep zigbee2mqtt | cut -d" " -f 1) /bin/bash
cd app
# Install zigbee-herdsman-converters version that with z2m 1.33.0
npm install [email protected]
exit
# Restart z2m container
docker restart $(docker ps | grep zigbee2mqtt | cut -d" " -f 1)

check if it works now

I'm running HAOS on a VM and don't have any way to SSH into the OS layer at the moment, but let me see what I can do..

I've got a console, bashed in but no app directory: image

pwd tells me I'm already in /app so I'm gonna skip that line and try the rest image

Nope, stuck image

JudahBella avatar Oct 17 '23 07:10 JudahBella

Don't mind me poking around, but it seems like between 1.33.0 and 1.33.1, ikea.js was refactored to ikea.ts. Could the refactor have caused anything?

I notice that in ikea.js, bulbOnEvent tested for undefined quite aggressively:

        if (state !== undefined && state.color_options !== undefined && state.color_options.execute_if_off === true) {
            device.endpoints[0].write('lightingColorCtrl', {'options': 1});
        }
        if (state !== undefined && state.level_config !== undefined && state.level_config.execute_if_off === true) {
            device.endpoints[0].write('genLevelCtrl', {'options': 1});
        }
        if (state !== undefined && state.level_config !== undefined && state.level_config.on_level !== undefined) {
            let onLevel = state.level_config.on_level;
            if (typeof onLevel === 'string' && onLevel.toLowerCase() == 'previous') {
                onLevel = 255;
            } else {
                onLevel = Number(onLevel);
            }
            if (onLevel > 255) onLevel = 254;
            if (onLevel < 1) onLevel = 1;

            device.endpoints[0].write('genLevelCtrl', {onLevel});
        }

whereas in ikea.ts it seems to have all but disappeared:

        const colorOptions = state.color_options as KeyValue;
        if (colorOptions?.execute_if_off === true) {
            device.endpoints[0].write('lightingColorCtrl', {'options': 1});
        }
        const levelConfig = state.level_config as KeyValue;
        if (levelConfig?.execute_if_off === true) {
            device.endpoints[0].write('genLevelCtrl', {'options': 1});
        }
        if (levelConfig?.on_level !== undefined) {
            const onLevelRaw = levelConfig.on_level;
            let onLevel: number;
            if (typeof onLevelRaw === 'string' && onLevelRaw.toLowerCase() == 'previous') {
                onLevel = 255;
            } else {
                onLevel = Number(onLevelRaw);
            }
            if (onLevel > 255) onLevel = 254;
            if (onLevel < 1) onLevel = 1;

            device.endpoints[0].write('genLevelCtrl', {onLevel: onLevelRaw});
        }

I do notice that now in the UI, if the transition variable is blank and I click on it but not enter any value and click away, it saves: Screenshot 2023-10-17 at 4 18 49 PM

but when I try to turn it on or off afterwards, the following error occurs: Screenshot 2023-10-17 at 4 17 51 PM

I will then have to enter a number into transition before the bulb will work again. It likely has nothing to do with this issue but just thought to let you know.

Also, from my very limited understanding, bulbs seem like they should be turned on with the genLevelCtrl command via bulbOnEvent, yet without transition set, the logs stated that genOnOff was being sent instead. I'm trying to hunt down where and how a bulb would be sent genOnOff but I can't find it.

JudahBella avatar Oct 17 '23 08:10 JudahBella

  • Can you do a apk add nodejs before executing the npm command?
  • Could it be that you had a transition: '' with z2m 1.33.0?

Koenkk avatar Oct 17 '23 18:10 Koenkk

Just to chime in, i had all my groups configured without transition at all. setting transition: 1 actually didn't help with it.

docker compose exec zigbee2mqtt sh

apk add nodejs npm
npm install [email protected]
exit

docker compose restart zigbee2mqtt
groups:
...
  '2':
    friendly_name: Deckenleuchte Wohnzimmer
    devices:
      - 0xd0cf5efffeec790b/1
      - 0xbc33acfffe16bc4c/1
      - 0xd0cf5efffef15440/1

Had no effect. Still turning on with 0% brightness.

cwildfoerster avatar Oct 17 '23 18:10 cwildfoerster

  • Can you do a apk add nodejs before executing the npm command?

Ok will try again when I have time

  • Could it be that you had a transition: '' with z2m 1.33.0?

Not sure for devices.yaml (likely not) but definitely not for groups.yaml

JudahBella avatar Oct 19 '23 12:10 JudahBella

I am having the same issue with my IKEA ICPSHC24-30EU-IL-1. After turning on the brightness is on 1. HASS still has 255 as value.

I use Docker with 1.33.1 running.

xeonixo avatar Oct 20 '23 18:10 xeonixo

strangely, it only affects one group, other groups behave correctly.

cwildfoerster avatar Oct 21 '23 10:10 cwildfoerster

tried a bit with different versions of z2m. defenitly not a version issue. when turning on, it still gets brightness 1. but if i turn it on with an brightness value, the value is correct.

maybe use the known value as attribute while turning on?

xeonixo avatar Oct 21 '23 18:10 xeonixo

Over the past few weeks more and more IKEA devices started acting up. Starting at the lowest brightness when turning on. Also Zigbee2MQTT was complaining about not having a valid transition property:

Error 2023-11-06 11:52:57 Publish 'set' 'state' to 'Closet Bulb 2' failed: 'Error: 'transition' is not a number, got string ()'

Which I didn't even touch. I have set the transition property on all my devices to 0 now. I hope this keeps working 😐.

But what I also noticed is that this behavior only happens when toggling a light from a Zigbee group. Whenever I toggle the light independently, it just works 🀷. I also tried downgrading from 1.33.1 to 1.33.0 but to no avail.

So for now I just created the same groups within Home Assistant. Which is AFAIK not ideal for my Zigbee network. But as a workaround would be sufficient for now, I guess.

alex3305 avatar Nov 06 '23 10:11 alex3305

Hello I just seen I have the Same issue. I have same 5 Ikea LED1837R5 and issue happen on 2 of them. It happens when switching them on individually if transition value is blank. If transition is set to 0 then it works.

Looks like it have start happening after I upgrade from 1.33.0 to 1.33.2

helljol avatar Nov 09 '23 07:11 helljol

A few weeks ago this problem started for 1 of 3 lamps (IKEA T2037 v1.0.006) in a group. Fast forward, 2/3 lamps have this problem, then all of them. I usually use a Ubisys S2 bound to toggle the group with the lamps (using zigbee; they stay powered on). On each transition from OFF to ON the brightness is reset to 1. I set up reporting for "brightness" so that's easy to verify. This happens all the time when using the switch. Keep in mind that the switch only sends toggle to the OnOff cluster.

It also happens when I toggle the group using MQTT directly (simulating the switch) unless I specify "transition: 0".

{"state": "ON", "brightness":200} // Reset
{"state": "OFF"}
{"state": "ON"} // Brightness = 1

{"state": "ON", "brightness":200} // Reset
{"state": "OFF"}
{"state": "ON", "transition":0} // Brightness = 200

The switch triggers this behavior even when z2m is stopped (so it can't possibly inject a message). I actually suspect a volatile bug in the firmware because I was able to temporarily fix the issue by powering down the devices (for a good while!). But the behavior quickly reappears unfortunately.

My (very weak) guess is that some recent change to z2m triggers this bug in the firmware that breaks until powered down.

Looking at the ZCL it states under "3.10.2.1.1 Effect of On/Off Commands on the CurrentLevel Attribute":

For ON:

Temporarily store CurrentLevel. Set CurrentLevel to the minimum level allowed for the device. Move CurrentLevel to OnLevel, or to the stored level if OnLevel is not defined, over the time period OnOffTransitionTime.

So it appears as if the last step simply fails. The big question is: why now? And how could z2m trigger this bug.

Jabe avatar Nov 24 '23 22:11 Jabe

@Jabe I've compared to toZigbee code in 1.33.0 vs 1.33.2, but there are not differences regarding this. Do you know from which version this bug starts occurring?

Koenkk avatar Dec 06 '23 09:12 Koenkk

I'm afraid I also cannot offer more insight except that for me the problem occurred the upgrade to koenkk/zigbee2mqtt:1.33.2, whereas downgrading to koenkk/zigbee2mqtt:1.33.1 seems to have fixed the problem. Symptoms that occurred are the lowest brightness issue here in the thread, as well as repeated connectivity issues (6000ms or 10000ms timeouts, sadly don't remember exactly) after 24-48h.

After the downgrade, all problems vanished "magically" without any change in config etc.

KizzyCode avatar Dec 06 '23 15:12 KizzyCode

I am also having this issue since a few versions now. If I can help with debugging let me know, I have a bunch of IKEA light bulbs and they are all having the brightness problem.

For me if I kill the power to the lights while they are turned off from HA, then when I turn the power on again the brightness is set to a minimum even though if I check HA the brightness is reported as maximum.

ovidiubute avatar Dec 06 '23 16:12 ovidiubute

Having the same issue suddenly since a few days, sadly downgrading to 1.33.1 didn't solve it for me, neither did all the transition stuff. In my case the lights turn on at brightness 1 no matter what method I use, be it from HA, my STYRBAR remote or the Z2M frontend. Both bulbs are in a group, but turning them on separately has the same behaviour.

Numpienick avatar Dec 06 '23 21:12 Numpienick

I'm also suffering with this issue. I have just recently started with Home Assistant so I have no prior version history with Z2M and started on 1.34.0. I have LED1949C5 and LED2003G10 bulbs. If the transition value is blank in the Z2M setup GUI then the bulbs will turn on at 1 brightness, and report 255 brightness to HA, despite the previous state. Setting a transition of 0 or 1 resolves the issue. However, I still have this problem with groups of lights. From what I can tell there is no way to set the transition of groups through the GUI but when I set the transition in the configuration.yaml that doesn't seem to work.

villyvitz avatar Dec 08 '23 07:12 villyvitz

@Koenkk it's been too long to say when it started, probably with 1.33.0 or even earlier. I usually don't need these lights until the days get shorter, so I might not have noticed until around October. Also, since it only affected 1/3 of the lights in the group I kinda dismissed it in the beginning.

I still don't think the issue can be fully explained by z2m alone and it's very odd. I can't come up with a reason why this happens except though a firmware bug.

Jabe avatar Dec 08 '23 08:12 Jabe

@Jabe could you provide the herdsman debug log of doing the sequence which triggers the bug?

Koenkk avatar Dec 08 '23 19:12 Koenkk

@Koenkk okay I've captured three scenarios. There is some noise in the data from other devices which I've XXX'ed out. Please see the the list of relevant device addresses at the end too. Here is my setup:

  • The offending lamps are called "Diele Deckenlampe 1" though 3.
  • They are in a group called "Diele Deckenlampen". I usually use the group only.
  • They are also in a group called "Tag Nacht Wechsel EG" (= day/night switching ground floor) which has 2 scenes but that's not relevant I think; just for clarity.
  • There is also the physical toggle switch called "Diele/Flur Wandschalter" which is bound to group "Diele Deckenlampen".

There is a 1 sec delay between each call. Each call was made using mosquitto_pub.

Test 1 was made with this:

{"state": "ON", "brightness":200} // Reset
{"state": "OFF"}
{"state": "ON"} // Brightness = 1

test1.log

Test 2:

{"state": "ON", "brightness":200} // Reset
{"state": "OFF"}
{"state": "ON", "transition":0} // Brightness = 200

test2.log

Test 3 I made with the physical toggle switch. I started with the lights ON at brightness=203 and toggled OFF then ON using the switch. The lights were at brightness=1 after that as expected. (I'm not sure I captured everything here.) test3.log

Addresses:
Diele Deckenlampe 1 - 0x70ac08fffef6f69f (IKEA STOFTMOLN ceiling/wall lamp WW37)
Diele Deckenlampe 2 - 0xf4b3b1fffe250f1f (ditto)
Diele Deckenlampe 3 - 0x70ac08fffef6e86a (ditto)
Diele/Flur Wandschalter - 0x001fee000000642d (Ubisys S2)

Jabe avatar Dec 10 '23 12:12 Jabe

What value is returned when reading the onLevel?

Screenshot 2023-12-10 at 21 29 08

Koenkk avatar Dec 10 '23 20:12 Koenkk

Read result of 'genLevelCtrl': {"onLevel":0} Oh!

I've restored full functionality by setting it to 0xff (previous), including my scene switching when OFF. πŸ˜ƒ Somehow the attrib must have slipped in over time.

Jabe avatar Dec 11 '23 06:12 Jabe

@villyvitz

I'm also suffering with this issue. I have just recently started with Home Assistant so I have no prior version history with Z2M and started on 1.34.0. I have LED1949C5 and LED2003G10 bulbs. If the transition value is blank in the Z2M setup GUI then the bulbs will turn on at 1 brightness, and report 255 brightness to HA, despite the previous state. Setting a transition of 0 or 1 resolves the issue. However, I still have this problem with groups of lights. From what I can tell there is no way to set the transition of groups through the GUI but when I set the transition in the configuration.yaml that doesn't seem to work.

You'll have to add transition: 1 to groups.yaml for each group of lights you want to manually override transition, i.e.:

'1':
  friendly_name: Dry Kitchen Pendants
  transition: 1
  devices:
    - 0x804b50fffefb392a/1
    - 0x84fd27fffe258a5a/1
    - 0x84fd27fffe03dab1/1

@Koenkk I'm so sorry but I haven't gotten to downgrading herdsman and providing logs, we've had a newborn since July and I really haven't had the time to work on this, as we kinda need the house to just work during this season. Hope the logs from the rest of the community have been sufficient for you. I'll try to circle back again when I have some downtime.

Good news is that the transition workaround has been working solidly, even with Z2M now at 1.34.0-1 (I leave auto update turned on). Just that it is rather taxing on the network when many lights need to be turned on or off at the same time (like with a scene), it takes awhile for all lights to reach the intended state, but that's mostly with the scenes we use when leaving or arriving home anyway so it's ok. Our curtain motors generate a lot more traffic than the lights (it updates the position of the curtain continuously until it reaches the destination) so I have adjusted some of our major scenes to not adjust certain curtains to ease the traffic a little, like when we arrive home, so that we can still toggle the lights when the curtains are still being opened. Previously when 9 curtains are being opened simultaneously, I couldn't toggle any lights at all until all the curtains were done opening. I've cut down to 5 and it's a lot better now.

JudahBella avatar Dec 11 '23 07:12 JudahBella