zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Issue with changing Operation Mode on Aqara switches

Open ant0nkr opened this issue 3 years ago β€’ 27 comments

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

ant0nkr avatar Dec 01 '23 14:12 ant0nkr

I got exactly the same environment and error.

helderfmf avatar Dec 01 '23 14:12 helderfmf

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

ant0nkr avatar Dec 01 '23 14:12 ant0nkr

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

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

helderfmf avatar Dec 01 '23 15:12 helderfmf

Same here. But adapter EZSP v8

Rumlik avatar Dec 01 '23 17:12 Rumlik

@ant0nkr How did you revert back to 1.33.2?

pdefoy avatar Dec 01 '23 20:12 pdefoy

@ant0nkr How did you revert back to 1.33.2?

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

ant0nkr avatar Dec 01 '23 20:12 ant0nkr

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

TB-SE avatar Dec 02 '23 03:12 TB-SE

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

NeckleSingh avatar Dec 02 '23 10:12 NeckleSingh

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)

Koenkk avatar Dec 02 '23 19:12 Koenkk

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.

ikruglikov avatar Dec 07 '23 04:12 ikruglikov

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?

NeckleSingh avatar Dec 07 '23 07:12 NeckleSingh

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

nickbock avatar Dec 07 '23 09:12 nickbock

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")'

itrankolov avatar Dec 07 '23 16:12 itrankolov

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

Koenkk avatar Dec 07 '23 19:12 Koenkk

It works now. Thanks!

itrankolov avatar Dec 07 '23 21:12 itrankolov

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

Gaara81 avatar Dec 08 '23 14:12 Gaara81

Next release = 1 January

Koenkk avatar Dec 08 '23 18:12 Koenkk

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?

Gaara81 avatar Dec 08 '23 19:12 Gaara81

How are you running z2m?

jerrm avatar Dec 08 '23 19:12 jerrm

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.

itrankolov avatar Dec 09 '23 10:12 itrankolov