zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

TuYa IH-K663 cheating statuses from single to 1_single

Open DivanX10 opened this issue 2 years ago • 32 comments

What happened?

The TuYa IH-K663 button in Zigbee2MQTT version 1.35.2-1 had the statuses single, double

Documentation of the TuYa IH-K663 device in Zigbee2MQTT https://www.zigbee2mqtt.io/devices/IH-K663.html

Action (enum)
Triggered action (e.g. a button click). Value can be found in the published state on the action property. It's not possible to read (/get) or write (/set) this value. The possible values are: single, double

In version Zigbee2MQTT 1.35.2, for some reason, single, double changed to 1_single, 2_double in Action. Is it possible to return it as it was? Why did this button have its statuses renamed to 1_single, 2_double? If not, please correct the description in the documentation, it is misleading about the correct status when clicking

image

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.35.1-1

Adapter firmware version

20230507

Adapter

CC2652P

Setup

Home Assistant Add-on: Zigbee2MQTT x86-64

Debug log

No response

DivanX10 avatar Feb 02 '24 09:02 DivanX10

I have the same issue with TS0041 and MINI-ZSB image image

skrepkaq avatar Feb 02 '24 13:02 skrepkaq

Can confirm that all push triggers for buttons stopped to work. Rolling back to 1.35.1 helped to solve this

zvirja avatar Feb 02 '24 13:02 zvirja

I have the same issue with HG08164.

martinclaus1 avatar Feb 02 '24 14:02 martinclaus1

Could you provide the data/database.db entry of your device?

Koenkk avatar Feb 03 '24 10:02 Koenkk

Folks,

I have the same exact trouble - problem is that when using "Device" as a trigger it no longer discovers "single", "double", etc. events on the list of the triggers... In my case just a battery state or button mode. It was working for some of my buttons for some time after upgrade and gradually all buttons gone! What is f... -> really annoying.

However - working workaround is to use "State" as trigger: image

Try it for yourself - watchout as action entity state names are case sensitive.

ps. I'm using Tuya Zigbee buttons via zigbee2mqtt

mysleinic avatar Feb 03 '24 12:02 mysleinic

Here is TS0041

{"id":4,"type":"EndDevice","ieeeAddr":"0x70ac08fffea1aa89","nwkAddr":5833,"manufId":4098,"manufName":"_TZ3000_axpdxqgu","powerSource":"Battery","modelId":"TS0041","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":0,"inClusterList":[0,1,6],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"\u0000\u0000\u0000\u0000\u0005\u0000\u0000\u0000\u0000\u0005\u0000\u0000\u0000\u0000\u0012","65506":31,"65508":1,"65534":0,"modelId":"TS0041","manufacturerName":"_TZ3000_axpdxqgu","powerSource":3,"zclVersion":3,"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":""}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":192,"batteryVoltage":29}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-708457359},"lastSeen":1706959504243,"defaultSendRequestWhen":"immediate"}

skrepkaq avatar Feb 03 '24 12:02 skrepkaq

Could you provide the data/database.db entry of your device?

Funny enough i could not help you with that right now, my database backup seems truncated at id 47 :/

Chartreusito avatar Feb 03 '24 12:02 Chartreusito

Снимок экрана (367) database.db.zip

iqubik avatar Feb 03 '24 13:02 iqubik

Fixed!

Changes will be available in the dev branch in a few hours from now.

Koenkk avatar Feb 03 '24 13:02 Koenkk

1.35.3 thats not fixed Снимок экрана (382)

iqubik avatar Feb 06 '24 22:02 iqubik

@Koenkk Can confirm that its still NOT fixed for MINI-ZSB

zvirja avatar Feb 06 '24 23:02 zvirja

Still not fixed for MINI-ZSB Zigbee-Modell TS0041 Zigbee-Hersteller _TZ3000_qgwcxxws

Nisbo avatar Feb 07 '24 06:02 Nisbo

I don’t understand, will it now be 1_single instead of single or has it not been fixed again? It should be single, not 1_single.

{"id":54,"type":"EndDevice","ieeeAddr":"0xa4c1389e7b8f60b5","nwkAddr":2351,"manufId":4417,"manufName":"_TZ3000_fa9mlvja","powerSource":"Battery","modelId":"TS0041","epList":[1,2,3,4],"endpoints":{"1":{"profId":260,"epId":1,"devId":0,"inClusterList":[1,6,57344,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"9\u0000\u0000\u0000\u0012","65506":49,"65508":1,"65534":0,"modelId":"TS0041","manufacturerName":"_TZ3000_fa9mlvja","powerSource":3,"zclVersion":3,"appVersion":67,"stackVersion":0,"hwVersion":1,"dateCode":""}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":188,"batteryVoltage":29}}},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":0,"inClusterList":[6,1,6],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":0,"inClusterList":[6,1,6],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"4":{"profId":260,"epId":4,"devId":0,"inClusterList":[6,1,6],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":67,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-708457359},"lastSeen":1707297683710}

DivanX10 avatar Feb 07 '24 09:02 DivanX10

"modelId":"TS0041","epList":[1,2,3,4], this is interesting, what I did was to not prefix the endpoint when it has 1 endpoint, somehow this device has 4. Pushed a fix.

Changes will be available in the dev branch in a few hours from now.

Koenkk avatar Feb 07 '24 19:02 Koenkk

I've got a TS0044, a four button Tuya remote. Single press of button number one sends 1_single, double press of button 1 sends 1_double. Pressing button number 2 one time sends 2_single etc.

Haven't tried the dev branch yet.

Automations in HA do not work anymore.

/edit: HA shows 'Unknown trigger' in existing automations. But when trying to edit them, the list of available triggers for the device only shows battery value changed and LQI changed.

database.db entry:

{"id":5,"type":"EndDevice","ieeeAddr":"0xa4c13859afd758d2","nwkAddr":60668,"manufId":4417,"manufName":"_TZ3000_ee8nrt2l","powerSource":"Battery","modelId":"TS0044","epList":[1,2,3,4],"endpoints":{"1":{"profId":260,"epId":1,"devId":0,"inClusterList":[6,1,6,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65534":0,"stackVersion":0,"dateCode":"","manufacturerName":"_TZ3000_ee8nrt2l","zclVersion":3,"appVersion":65,"modelId":"TS0044","powerSource":3}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":142,"batteryVoltage":28}}},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":0,"inClusterList":[1,6,57344],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":0,"inClusterList":[1,6,57344],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"4":{"profId":260,"epId":4,"devId":0,"inClusterList":[1,6,57344],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":65,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-708457359},"lastSeen":1707374051958}

Calimerorulez avatar Feb 08 '24 08:02 Calimerorulez

I've got a TS0044, a four button Tuya remote. Single press of button number one sends 1_single, double press of button 1 sends 1_double. Pressing button number 2 one time sends 2_single etc.

That's the expected behaviour, right?

Koenkk avatar Feb 08 '24 19:02 Koenkk

Well, then I'm literally in the dark, because after upgrading to the most recent version of Z2M, Home Assistant does not see the actions of these remotes anymore in my existing automations ("Unknown trigger").

I can't choose the button actions anymore in HA, even if I have pressed the buttons on the remote to make them try to show up in HA.

I though it was related with this issue, because it only involves my two Tuya remotes.

Calimerorulez avatar Feb 08 '24 21:02 Calimerorulez

@Calimerorulez what actions did it send before?

Koenkk avatar Feb 10 '24 15:02 Koenkk

For TS0044 I do experience also weird behaviour since the update to version 1.35.3-1 as @Calimerorulez also describes. Behaviour of the button sometimes works, sometimes the action event is not recognized.

Edit: Tried it with a restore to 1.35.2-1 when it still worked. Unfortunately it does not work anymore with that version. Although button is still recognized, removal and adding the TS0044 also did not solve the hampering

If it is recognized it sends:

z2m log: info 2024-02-13 10:24:49MQTT publish: topic 'zigbee2mqtt/0x3425b4fffef4dfae', payload '{"action":"3_single","battery":100,"linkquality":191,"voltage":3000}' info 2024-02-13 10:24:49MQTT publish: topic 'zigbee2mqtt/0x3425b4fffef4dfae', payload '{"action":"","battery":100,"linkquality":191,"voltage":3000}' info 2024-02-13 10:24:49MQTT publish: topic 'zigbee2mqtt/0x3425b4fffef4dfae/action', payload '3_single'

Automation trace: platform: device domain: mqtt device_id: xxxxxxx type: action subtype: 3_single discovery_id: 0x3425b4fffef4dfae action_3_single

Records also show the same log from button 1, however the automation does not get triggered anymore. No automation trace is available after the click.

z2m log info 2024-02-13 10:26:29MQTT publish: topic 'zigbee2mqtt/0x3425b4fffef4dfae', payload '{"action":"1_single","battery":100,"linkquality":167,"voltage":3000}' info 2024-02-13 10:26:29MQTT publish: topic 'zigbee2mqtt/0x3425b4fffef4dfae', payload '{"action":"","battery":100,"linkquality":167,"voltage":3000}' info 2024-02-13 10:26:29MQTT publish: topic 'zigbee2mqtt/0x3425b4fffef4dfae/action', payload '1_single'

APMXGH avatar Feb 13 '24 09:02 APMXGH

@Calimerorulez what actions did it send before?

@Koenkk It did send "single" and "double", at least for _TZ3000_mrpevh8p SH-SC07

Chartreusito avatar Feb 16 '24 17:02 Chartreusito