Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge πŸŒ‰, get rid of your proprietary Zigbee bridges πŸ”¨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.75k stars 1.64k forks source link

Issue with changing Operation Mode on Aqara switches #19960

Closed ant0nkr closed 9 months ago

ant0nkr commented 9 months ago

What happened?

After updating zigbee2mqtt 1.34.0 all aqara switches started to return an error: Publish 'set' 'operation_mode' to 'switch.gym' failed: 'Error: undefined is not a object, got string ("decoupled")' Same information appears in Log: Error 2023-12-01 16:05:30Publish 'set' 'operation_mode' to 'switch.gym' failed: 'Error: undefined is not a object, got string ("decoupled")'

What did you expect to happen?

It supposed to change Switch mode to Decopled or Control Relay, depends on selected value.

How to reproduce it (minimal and precise)

Go to Zigbee2MQTT UI, choose any Aqara switch change Opeation Mode to Decoupled or Control Relay. See the error.

Zigbee2MQTT version

1.34.0

Adapter firmware version

20230507

Adapter

CC2652R

Debug log

log.txt

helderfmf commented 9 months ago

I got exactly the same environment and error.

ant0nkr commented 9 months ago

FYI: Reverted back to 1.33.2 and all is working good.

helderfmf commented 9 months ago

FYI: Reverted back to 1.33.2 and all is working good.

Any way to revert without backup? Forgot to backup previous version.

Rumlik commented 9 months ago

Same here. But adapter EZSP v8

pdefoy commented 9 months ago

@ant0nkr How did you revert back to 1.33.2?

ant0nkr commented 9 months ago

@ant0nkr How did you revert back to 1.33.2?

The only way to revert back is to restore from a backup, afaik

TB-SE commented 9 months ago

Same here. Happened to notice it during a clean move to a new coordinator (worked in version 1.33.2).

neekul commented 9 months ago

Same. Hope this can be fixed in a new release. I use the operation mode select in a number of automations 😞

Koenkk commented 9 months ago

Fixed!

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

ikruglikov commented 9 months ago

Fixed!

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

I apologize for my question, I'm new to home assistant. I can’t find the file (src/converters/toZigbee.ts) in my home assistant, which is installed on Raspberry Pi.

neekul commented 9 months ago

Fixed!

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Thank you!!! Out of curiosity, whats the usual timeline from Dev to Main?

nickbock commented 9 months ago

Hey,

I just switched to latest-dev docker image and the error stays the same.

Publish 'set' 'operation_mode' to 'Switch XXXX' failed: 'Error: undefined is not a object, got string ("decoupled")'

Zigbee2MQTT version 1.34.0-dev commit: f11eb24 Coordinator type zStack3x0 Coordinator revision 20230507 Frontend version 0.6.148 Zigbee-herdsman-converters version 16.1.0 Zigbee-herdsman version 0.25.3

itrankolov commented 9 months ago

I can also confirm that it is not working with WS-EUK01. Still gives the same error: Publish 'set' 'operation_mode' to 'Corridor Bedrooms' failed: 'Error: undefined is not a object, got string ("decoupled")'

Koenkk commented 9 months ago

I forgot to integrate the changes, please try again with the latest dev branch in 2 hours from now.

itrankolov commented 9 months ago

It works now. Thanks!

Gaara81 commented 9 months ago

When this fix will be added to stable branch? idk how to use the dev branch. Noobs like me need help :)

Koenkk commented 9 months ago

Next release = 1 January

Gaara81 commented 9 months ago

Next release = 1 January

So we have to wait 20 days without our "smart" home not working at all? There is a way to fix it meanwhile?

jerrm commented 9 months ago

How are you running z2m?

itrankolov commented 9 months ago

Next release = 1 January

So we have to wait 20 days without our "smart" home not working at all? There is a way to fix it meanwhile?

Install the development release, change the mode and switch to regular branch.

Gaara81 commented 9 months ago

Next release = 1 January

So we have to wait 20 days without our "smart" home not working at all? There is a way to fix it meanwhile?

Install the development release, change the mode and switch to regular branch.

Thanks for the answer. Could you guide me how to do that? Or any reliable place that explains it? I'm worried to lose my current configs.

Thanks again

Gaara81 commented 9 months ago

I figured out myself. It's pretty easy... Thanks my aqara h1 works again.

KMTsvetanov commented 9 months ago

For anyone that is still not working I needed to update my firmware.

I use Zigbee 3.0 USB Dongle Plus.

Follow for more and a video on how to do it. This worked out for me. You you have to disassemble your Dongle. (Make changes only when you are sure that it's the same from the inside as well)

https://github.com/Koenkk/zigbee2mqtt/discussions/16573#discussioncomment-7807494

jsalvino1223 commented 9 months ago

It changed it to decoupled, but can't change anything now on the Aqara Switch.

2023-12-12 00:50:17Publish 'get' 'operation_mode' to '2F Master Bedroom Aqara Main Switch' failed: 'Error: Read 0x54ef4410008bceaf/1 aqaraOpple([512], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 4062 - 1 - 11 - 64704 - 1 after 10000ms)' 2023-12-12 00:50:40Publish 'get' 'operation_mode' to '2F Master Bedroom Aqara Main Switch' failed: 'Error: Read 0x54ef4410008bceaf/1 aqaraOpple([512], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 4062 - 1 - 12 - 64704 - 1 after 10000ms)' 2023-12-12 00:51:03Publish 'get' 'operation_mode' to '2F Master Bedroom Aqara Main Switch' failed: 'Error: Read 0x54ef4410008bceaf/1 aqaraOpple([512], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 4062 - 1 - 13 - 64704 - 1 after 10000ms)' 2023-12-12 00:51:26Publish 'get' 'operation_mode' to '2F Master Bedroom Aqara Main Switch' failed: 'Error: Read 0x54ef4410008bceaf/1 aqaraOpple([512], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 4062 - 1 - 14 - 64704 - 1 after 10000ms)' 2023-12-12 00:51:49Publish 'get' 'operation_mode' to '2F Master Bedroom Aqara Main Switch' failed: 'Error: Read 0x54ef4410008bceaf/1 aqaraOpple([512], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 4062 - 1 - 15 - 64704 - 1 after 10000ms)'

aaalex474 commented 9 months ago

Could we just send particular payload in dev console to change the operation mode? Mode change isn't day to day operation. Once configured it rests. It would be simpler than to use the dev branch. Could someone figure out the right payload?

sous-park commented 5 months ago

If you switch the Fast mode to multi or reverse in zigbee2mqtt and immediately press any switch key 5 times, the mode will change and there will be no error.