Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.66k stars 1.64k forks source link

Initial light turn_on ignores transition time, fades on, then immedty turns off #18902

Open Megabytemb opened 11 months ago

Megabytemb commented 11 months ago

What happened?

I have TS0505B Tuya Light.

When i set light.turn_on, it ignores the default set transition time, fades in over 1 second, then immedtly turns off.

If i then issue the exact same light.turn_on command again, it uses the correct transition time, and stays on.

if i do light.turn_on, then light.turn_off, then light.turn_on again, it exhibts the same issue.

What did you expect to happen?

light.turn_on should turn the light on with the transition time set for the light, and stay on.

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.33.0

Adapter firmware version

7.3.1.0 build 0

Adapter

EZSP v12 > Silicon Labs Multiprotocol > QinHeng Electronics SONOFF Zigbee 3.0 USB Dongle Plus V2

Debug log

Initial light turn on, where it fades in over 1 second, instead of 0.1 seconds, then turns off

Zigbee2MQTT:debug 2023-09-08 14:20:56: Received MQTT message on 'zigbee2mqtt/Bathroom Ceiling/set' with data '{"state":"ON"}' Zigbee2MQTT:debug 2023-09-08 14:20:56: Publishing 'set' 'state' to 'Bathroom Ceiling' 2023-09-08T04:20:56.591Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db' 2023-09-08T04:20:56.604Z zigbee-herdsman:controller:endpoint Command 0xa4c138ee650c3f3f/1 genLevelCtrl.moveToLevelWithOnOff({"level":254,"transtime":1}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) 2023-09-08T04:20:56.604Z zigbee-herdsman:adapter:ezsp:debg sendZclFrameToEndpointInternal 0xa4c138ee650c3f3f:37021/1 (0,0,0) 2023-09-08T04:20:56.606Z zigbee-herdsman:adapter:ezsp:ezsp ==> setExtendedTimeout: {"remoteEui64":{"_value":{"type":"Buffer","data":[164,193,56,238,101,12,63,63]}},"extendedTimeout":true} 2023-09-08T04:20:56.606Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"cls":"setExtendedTimeout","id":126,"isRequest":true,"remoteEui64":{"_value":{"type":"Buffer","data":[164,193,56,238,101,12,63,63]}},"extendedTimeout":true} 2023-09-08T04:20:56.606Z zigbee-herdsman:adapter:ezsp:uart --> DATA (7,7,0): 1700017e003f3f0c65ee38c1a401 2023-09-08T04:20:56.606Z zigbee-herdsman:adapter:ezsp:uart --> [775521a92a2a2a8d55f1a41d6bf193c84d7e] 2023-09-08T04:20:56.607Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (0) 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:uart <-- [7055a1a92a2aae237e] 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (7,0,0): 7055a1a92a2aae237e 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:uart --> ACK (0) 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:uart --> [8070787e] 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 1780017e00 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x7e: {"cls":"setExtendedTimeout","id":126,"isRequest":false} 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (0) success 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:ezsp ==> sendUnicast: {"type":0,"indexOrDestination":37021,"apsFrame":{"clusterId":8,"profileId":260,"sequence":158,"sourceEndpoint":1,"destinationEndpoint":1,"groupId":0,"options":256},"messageTag":159,"message":{"type":"Buffer","data":[1,127,4,254,1,0]}} 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"cls":"sendUnicast","id":52,"isRequest":true,"type":0,"indexOrDestination":37021,"apsFrame":{"clusterId":8,"profileId":260,"sequence":158,"sourceEndpoint":1,"destinationEndpoint":1,"groupId":0,"options":256},"messageTag":159,"message":{"type":"Buffer","data":[1,127,4,254,1,0]}} 2023-09-08T04:20:56.608Z zigbee-herdsman:adapter:ezsp:uart --> DATA (0,0,0): 1800013400009d90040108000101000100009e9f06017f04fe0100 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:uart --> [005a21a9602a152fc9904b2daa5493499d4e273572c866f4f9386289233f7e] 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (1) 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:uart <-- [015aa1a9] 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:uart <-- [602a15913e6f7e] 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (0,1,0): 015aa1a9602a15913e6f7e 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:uart --> ACK (1) 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:uart --> [8160597e] 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 18800134000023 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x34: {"cls":"sendUnicast","id":52,"isRequest":false,"status":0,"sequence":35} 2023-09-08T04:20:56.609Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (1) success 2023-09-08T04:20:56.618Z zigbee-herdsman:adapter:ezsp:uart <-- [7d315ab1a96b2a152fc9904b2daa549349] 2023-09-08T04:20:56.618Z zigbee-herdsman:adapter:ezsp:uart <-- [9d4e278872ce675c837e] 2023-09-08T04:20:56.618Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (1,1,0): 115ab1a96b2a152fc9904b2daa5493499d4e278872ce675c837e 2023-09-08T04:20:56.618Z zigbee-herdsman:adapter:ezsp:uart --> ACK (2) 2023-09-08T04:20:56.618Z zigbee-herdsman:adapter:ezsp:uart --> [82503a7e] 2023-09-08T04:20:56.618Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 1890013f00009d9004010800010100010000239f0000 2023-09-08T04:20:56.618Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x3f: {"cls":"messageSentHandler","id":63,"isRequest":false,"type":0,"indexOrDestination":37021,"apsFrame":{"profileId":260,"clusterId":8,"sourceEndpoint":1,"destinationEndpoint":1,"options":256,"groupId":0,"sequence":35},"messageTag":159,"status":0,"message":{"type":"Buffer","data":[]}} 2023-09-08T04:20:56.653Z zigbee-herdsman:adapter:ezsp:uart <-- [215ab1a97d312a15b6589c4a24ab5593499c8dd812705e] 2023-09-08T04:20:56.653Z zigbee-herdsman:adapter:ezsp:uart <-- [9874f8de1c82f87d5e3b16757e] 2023-09-08T04:20:56.653Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (2,1,0): 215ab1a9112a15b6589c4a24ab5593499c8dd812705e9874f8de1c82f87e3b16757e 2023-09-08T04:20:56.653Z zigbee-herdsman:adapter:ezsp:uart --> ACK (3) 2023-09-08T04:20:56.653Z zigbee-herdsman:adapter:ezsp:uart --> [83401b7e] 2023-09-08T04:20:56.653Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 18900145000004010800010100010000c3ffb99d90ffff05187f0b040004 2023-09-08T04:20:56.653Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x45: {"cls":"incomingMessageHandler","id":69,"isRequest":false,"type":0,"apsFrame":{"profileId":260,"clusterId":8,"sourceEndpoint":1,"destinationEndpoint":1,"options":256,"groupId":0,"sequence":195},"lastHopLqi":255,"lastHopRssi":-71,"sender":37021,"bindingIndex":255,"addressIndex":255,"message":{"type":"Buffer","data":[24,127,11,4,0]}} 2023-09-08T04:20:56.653Z zigbee-herdsman:adapter:ezsp:debg processMessage: {"messageType":0,"apsFrame":{"profileId":260,"clusterId":8,"sourceEndpoint":1,"destinationEndpoint":1,"options":256,"groupId":0,"sequence":195},"lqi":255,"rssi":-71,"sender":37021,"bindingIndex":255,"addressIndex":255,"message":{"type":"Buffer","data":[24,127,11,4,0]}} 2023-09-08T04:20:56.654Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":127,"manufacturerCode":null,"commandIdentifier":11},"Payload":{"cmdId":4,"statusCode":0},"Command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}},"address":37021,"endpoint":1,"linkquality":255,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}' Zigbee2MQTT:info 2023-09-08 14:20:56: MQTT publish: topic 'zigbee2mqtt/Bathroom Ceiling', payload '{"brightness":254,"color_mode":"color_temp","color_power_on_behavior":"previous","color_temp":500,"do_not_disturb":null,"last_seen":1694146856654,"linkquality":255,"state":"OFF"}' Zigbee2MQTT:info 2023-09-08 14:20:56: MQTT publish: topic 'zigbee2mqtt/Bathroom Ceiling', payload '{"brightness":254,"color_mode":"color_temp","color_power_on_behavior":"previous","color_temp":500,"do_not_disturb":null,"last_seen":1694146856654,"linkquality":255,"state":"ON"}'

2nd light turn on, where it correctly fades in over 0.1 seconds, and stays on

Zigbee2MQTT:debug 2023-09-08 14:21:04: Received MQTT message on 'zigbee2mqtt/Bathroom Ceiling/set' with data '{"state":"ON"}' Zigbee2MQTT:debug 2023-09-08 14:21:04: Publishing 'set' 'state' to 'Bathroom Ceiling' 2023-09-08T04:21:04.450Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db' 2023-09-08T04:21:04.458Z zigbee-herdsman:controller:endpoint Command 0xa4c138ee650c3f3f/1 genLevelCtrl.moveToLevelWithOnOff({"level":254,"transtime":1}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) 2023-09-08T04:21:04.459Z zigbee-herdsman:adapter:ezsp:debg sendZclFrameToEndpointInternal 0xa4c138ee650c3f3f:37021/1 (0,0,0) 2023-09-08T04:21:04.460Z zigbee-herdsman:adapter:ezsp:ezsp ==> setExtendedTimeout: {"remoteEui64":{"_value":{"type":"Buffer","data":[164,193,56,238,101,12,63,63]}},"extendedTimeout":true} 2023-09-08T04:21:04.460Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"cls":"setExtendedTimeout","id":126,"isRequest":true,"remoteEui64":{"_value":{"type":"Buffer","data":[164,193,56,238,101,12,63,63]}},"extendedTimeout":true} 2023-09-08T04:21:04.460Z zigbee-herdsman:adapter:ezsp:uart --> DATA (2,4,0): 1a00017e003f3f0c65ee38c1a401 2023-09-08T04:21:04.460Z zigbee-herdsman:adapter:ezsp:uart --> [245821a92a2a2a8d55f1a41d6bf19322447e] 2023-09-08T04:21:04.461Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (3) 2023-09-08T04:21:04.462Z zigbee-herdsman:adapter:ezsp:uart <-- [4358a1a92a2a6e357e] 2023-09-08T04:21:04.462Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (4,3,0): 4358a1a92a2a6e357e 2023-09-08T04:21:04.462Z zigbee-herdsman:adapter:ezsp:uart --> ACK (5) 2023-09-08T04:21:04.462Z zigbee-herdsman:adapter:ezsp:uart --> [8520dd7e] 2023-09-08T04:21:04.463Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 1a80017e00 2023-09-08T04:21:04.463Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x7e: {"cls":"setExtendedTimeout","id":126,"isRequest":false} 2023-09-08T04:21:04.463Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (3) success 2023-09-08T04:21:04.463Z zigbee-herdsman:adapter:ezsp:ezsp ==> sendUnicast: {"type":0,"indexOrDestination":37021,"apsFrame":{"clusterId":8,"profileId":260,"sequence":159,"sourceEndpoint":1,"destinationEndpoint":1,"groupId":0,"options":256},"messageTag":160,"message":{"type":"Buffer","data":[1,128,4,254,1,0]}} 2023-09-08T04:21:04.463Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"cls":"sendUnicast","id":52,"isRequest":true,"type":0,"indexOrDestination":37021,"apsFrame":{"clusterId":8,"profileId":260,"sequence":159,"sourceEndpoint":1,"destinationEndpoint":1,"groupId":0,"options":256},"messageTag":160,"message":{"type":"Buffer","data":[1,128,4,254,1,0]}} 2023-09-08T04:21:04.464Z zigbee-herdsman:adapter:ezsp:uart --> DATA (3,5,0): 1b00013400009d90040108000101000100009fa006018004fe0100 2023-09-08T04:21:04.464Z zigbee-herdsman:adapter:ezsp:uart --> [355921a9602a152fc9904b2daa5493499d4e27344dc8660bf93862893fc57e] 2023-09-08T04:21:04.464Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (4) 2023-09-08T04:21:04.465Z zigbee-herdsman:adapter:ezsp:uart <-- [5459a1a9] 2023-09-08T04:21:04.465Z zigbee-herdsman:adapter:ezsp:uart <-- [602a159615d07e] 2023-09-08T04:21:04.465Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (5,4,0): 5459a1a9602a159615d07e 2023-09-08T04:21:04.465Z zigbee-herdsman:adapter:ezsp:uart --> ACK (6) 2023-09-08T04:21:04.465Z zigbee-herdsman:adapter:ezsp:uart --> [8610be7e] 2023-09-08T04:21:04.466Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 1b800134000024 2023-09-08T04:21:04.466Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x34: {"cls":"sendUnicast","id":52,"isRequest":false,"status":0,"sequence":36} 2023-09-08T04:21:04.466Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (4) success 2023-09-08T04:21:04.474Z zigbee-herdsman:adapter:ezsp:uart <-- [6459b1a96b2a] 2023-09-08T04:21:04.474Z zigbee-herdsman:adapter:ezsp:uart <-- [152fc9904b2daa5493499d4e278f4dce6722167e] 2023-09-08T04:21:04.474Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (6,4,0): 6459b1a96b2a152fc9904b2daa5493499d4e278f4dce6722167e 2023-09-08T04:21:04.474Z zigbee-herdsman:adapter:ezsp:uart --> ACK (7) 2023-09-08T04:21:04.474Z zigbee-herdsman:adapter:ezsp:uart --> [87009f7e] 2023-09-08T04:21:04.474Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 1b90013f00009d900401080001010001000024a00000 2023-09-08T04:21:04.474Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x3f: {"cls":"messageSentHandler","id":63,"isRequest":false,"type":0,"indexOrDestination":37021,"apsFrame":{"profileId":260,"clusterId":8,"sourceEndpoint":1,"destinationEndpoint":1,"options":256,"groupId":0,"sequence":36},"messageTag":160,"status":0,"message":{"type":"Buffer","data":[]}} 2023-09-08T04:21:04.509Z zigbee-herdsman:adapter:ezsp:uart <-- [7459b1a97d312a15b6589c4a24ab5593499c] 2023-09-08T04:21:04.509Z zigbee-herdsman:adapter:ezsp:uart <-- [8ad812705e9874f8dee382f87d5e3b4ceb7e] 2023-09-08T04:21:04.509Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (7,4,0): 7459b1a9112a15b6589c4a24ab5593499c8ad812705e9874f8dee382f87e3b4ceb7e 2023-09-08T04:21:04.509Z zigbee-herdsman:adapter:ezsp:uart --> ACK (0) 2023-09-08T04:21:04.509Z zigbee-herdsman:adapter:ezsp:uart --> [8070787e] 2023-09-08T04:21:04.510Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 1b900145000004010800010100010000c4ffb99d90ffff0518800b040004 2023-09-08T04:21:04.510Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x45: {"cls":"incomingMessageHandler","id":69,"isRequest":false,"type":0,"apsFrame":{"profileId":260,"clusterId":8,"sourceEndpoint":1,"destinationEndpoint":1,"options":256,"groupId":0,"sequence":196},"lastHopLqi":255,"lastHopRssi":-71,"sender":37021,"bindingIndex":255,"addressIndex":255,"message":{"type":"Buffer","data":[24,128,11,4,0]}} 2023-09-08T04:21:04.510Z zigbee-herdsman:adapter:ezsp:debg processMessage: {"messageType":0,"apsFrame":{"profileId":260,"clusterId":8,"sourceEndpoint":1,"destinationEndpoint":1,"options":256,"groupId":0,"sequence":196},"lqi":255,"rssi":-71,"sender":37021,"bindingIndex":255,"addressIndex":255,"message":{"type":"Buffer","data":[24,128,11,4,0]}} 2023-09-08T04:21:04.510Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":128,"manufacturerCode":null,"commandIdentifier":11},"Payload":{"cmdId":4,"statusCode":0},"Command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}},"address":37021,"endpoint":1,"linkquality":255,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}' Zigbee2MQTT:info 2023-09-08 14:21:04: MQTT publish: topic 'zigbee2mqtt/Bathroom Ceiling', payload '{"brightness":254,"color_mode":"color_temp","color_power_on_behavior":"previous","color_temp":500,"do_not_disturb":null,"last_seen":1694146864510,"linkquality":255,"state":"ON"}' Zigbee2MQTT:info 2023-09-08 14:21:04: MQTT publish: topic 'zigbee2mqtt/Bathroom Ceiling', payload '{"brightness":254,"color_mode":"color_temp","color_power_on_behavior":"previous","color_temp":500,"do_not_disturb":null,"last_seen":1694146864510,"linkquality":255,"state":"ON"}'

kingii98 commented 11 months ago

I have same issue with same stick/version.

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

Megabytemb commented 10 months ago

I'm still experinging this issue.

Does anyone have any ideas?

Megabytemb commented 9 months ago

Hey, any thoughts on this? I'm still having this issue and its quite annoying......

whc2001 commented 5 months ago

Just realized this is the same problem (actually mine is worse, it would keep turning off multiple times until I adjust the brightness) I have experienced in #21625. From what I have tested, you can't even touch the transition setting otherwise this problem will appear. After that you need to pair it with HomeAssistant ZHA to temporarily bring it back.