Add Zigbee Smart button to Zigbee2MQTT

I got a Zigbee button from AliExpress where it’s advertised for working with Zigbee2MTQQ. Adding the button was no problem. When I go to the entities if the added button it doesn’t want to change the operating mode.
In ‘Zigbee2MQTT Exposes’ I see as operation mode to select Command or Event, but clicking one of these doesn’t lock in the choice
In Devices I see configuration pull down with the same options, but choosing on also doesn’t lock in this choice.

I want to use this button that a push triggers a automation. But the device/entity is not found as a possible trigger. How do I add this zigbee button as a push button?

Please share the device manufacturer/model.

Try pressing the button immediately before sending the command to change operation mode. Most battery devices go to sleep to conserve battery & do not respond to outside commands when they do.

1 Like

Thanks for the suggestion!
When I do this and try to change the mode in Zigbee2MQTT I get the following red popup error:

z2m: Publish 'set' 'operation_mode' to 'Push Button Single' failed: 'Error: ZCL command 0xa4c138aa9e5055b7/1 genOnOff.write({"tuyaOperationMode":1}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE')'

When I try to change it in Devices → MQQT → Device, nothing has changed either when I go back and forth.

It’s recognized as model: Smart button (ZG-101ZL) by Loginovo

Operation mode

You can switch between the “command” and “event” operation mode with a triple click

Command mode enables on/off mode : single click : on double click : off long press (>5s) and release : brightness_move_to_level

You can then use OnOff and LevelCtrl binding in this mode

Event mode enables click : single/double/hold

I was already aware it is supported and read this page before posting here. There is nothing in that manual device information that covers my problem.

I was pointing out this You can switch between the “command” and “event” operation mode with a triple click

I didn’t know if you attempted to change the device mode manually on the device vs the Zigbee2MTQQ interface

I can not change the operation mode. that’s the problem. I can triple click on the device, in the device settings or in the exposes. It doesn’t change the operation mode. This stays unselected. and gives me the error (multiple times since i clicked 3 times)

I understood your issue. It just wasn’t clear from your OP what steps you had already taken to try to resolve the issue.

Definitely issues with the device

I also tried to remove and add it again: this again gives the error:

z2m: Failed to configure '0xa4c138aa9e5055b7', attempt 2 (Error: ZCL command 0xa4c138aa9e5055b7/1 genOnOff.write({"tuyaOperationMode":1}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE') at Endpoint.checkStatus (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:358:28) at Endpoint.zclCommand (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:966:26) at Endpoint.write (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:401:9) at Object.configure (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman-converters/src/devices/moes.ts:539:13) at Configure.configure (/app/lib/extension/configure.ts:124:13) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:204:17))
type or paste code here

Hi, I had the same problem. Apparently there are 2 different problems

To use the actions of the button you have to activate an option in the Z2M add-on, as it’s not activated by default. You can find more information in this post

The operating mode is a problem not solved yet and it’s comming from the integration in Z2MQTT. You can find different issues opened in Github to be followed but not solution yet.

The only solution is change the configuration from the button itself with a triple push.