Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIGBEE tuya light switch (4 buttons) #4597

Closed
dror23 opened this issue Oct 8, 2020 · 30 comments
Closed

ZIGBEE tuya light switch (4 buttons) #4597

dror23 opened this issue Oct 8, 2020 · 30 comments
Labels
problem Something isn't working

Comments

@dror23
Copy link

dror23 commented Oct 8, 2020

What happened

What did you expect to happen

How to reproduce it (minimal and precise)

Debug info

Zigbee2MQTT version:
Adapter hardware: CC2531, CC2530, CC26X2R1, CC1352P-2, Conbee II
Adapter firmware version:

@dror23 dror23 added the problem Something isn't working label Oct 8, 2020
@Koenkk
Copy link
Owner

Koenkk commented Oct 8, 2020

@dror23
Copy link
Author

dror23 commented Oct 8, 2020

Of cours, I've try to reconfigure but I'm not sure how exactly...
Here is the data from the log:

https://paste.ofcode.org/G8X62W5CA5KZiQKePUp9XM

Hope it will help!

@dror23
Copy link
Author

dror23 commented Oct 13, 2020

Hey Koenkk Have you manage to fix it?

@Koenkk
Copy link
Owner

Koenkk commented Oct 13, 2020

  • I don't see a configure being executed in your log
  • Please share the data/database.db entry.

@dror23
Copy link
Author

dror23 commented Oct 14, 2020

database.zip

@Koenkk
Copy link
Owner

Koenkk commented Oct 14, 2020

Is the problem with model TS0601_switch , ieeeAddr: 0xbc33acfffe189ace?

@dror23
Copy link
Author

dror23 commented Oct 14, 2020

Is the problem with model TS0601_switch , ieeeAddr: 0xbc33acfffe189ace?

Yes, that the one.

@Koenkk
Copy link
Owner

Koenkk commented Oct 14, 2020

Can you provide the herdsman debug logging when pressing the 4th button?

To enable herdsman debug logging, see https://www.zigbee2mqtt.io/information/debug.html#zigbee-herdsman-debug-logging

@dror23
Copy link
Author

dror23 commented Oct 14, 2020

Can you provide the herdsman debug logging when pressing the 4th button?

To enable herdsman debug logging, see https://www.zigbee2mqtt.io/information/debug.html#zigbee-herdsman-debug-logging

OK I did it and than restarted the addon and I'm attaching the file after the changes.
ZIGBEE2MQTT.zip

@Koenkk
Copy link
Owner

Koenkk commented Oct 14, 2020

Can you point me to what is exactly generated when you click the 4th button?

@dror23
Copy link
Author

dror23 commented Oct 14, 2020

Can you point me to what is exactly generated when you click the 4th button?

Thats the problem, when I'm pressing on the 4th button (physically) nothing happens on HA, the status stay the same, not llike the other buttons on the same switch...
A friend of my suggested that the problem is Cluster but I have no idea...

@Koenkk
Copy link
Owner

Koenkk commented Oct 15, 2020

Normally a 4 gang Zigbee switch has 4 endpoints, each endpoint represents one gang. To have feedback for all endpoints reporting is setup on each endpoint.

Unfortunately TuYa devices often deviate from this standard. In this case your device only has 1 endpoint (you see "epList":[1] in the database.db entry). Therefore I have no clue about:

  • Why does reporting work for gang 2 and 3, I expect it to only work for gang 1, since only for that reporting is setup.
  • Why does reporting not work for gang 4, it does for 2 and 3 while no reporting is setup for that.

To further investigate, you should check how this works with the original TuYa gateway:

@github-actions
Copy link
Contributor

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

@ARafaelSF
Copy link

  • Does it have the same issue? (reports for gang 1, 2 and 3 but not for 4). If yes, it's an issue in the device not solvable by Zigbee2MQTT

Yes, works ok with tuya hub.

I don't have a debugger, but I already bought it. When it arrives I will do it.

@Koenkk Koenkk reopened this Jan 16, 2021
@Koenkk Koenkk removed the stale Stale issues label Jan 16, 2021
@ARafaelSF
Copy link

@Koenkk

I made a sniff

The sequence is:

1 - Paring
2 - On Gang 1 - Off Gang 1
3 - On Gang 2 - Off Gang 2
4 - On Gang 3 - Off Gang 3
5 - On Gang 4 - Off Gang 4 (this not work in zigbee2mqtt)

https://1drv.ms/u/s!AtfNPxDs_iedo85HPTjfYg79pM3DpQ?e=niGsQw

Please see if it is enough or if I need to do anything else.

Thanks

@Koenkk
Copy link
Owner

Koenkk commented Jan 22, 2021

@ARafaelSF cool that you've managed to sniff. Can you make 2 sniffs (one with TuYa hub and one with Z2M) which contain: pair of the device + wait 20 seconds + click on 3th gang, click on 4th gang.

@ARafaelSF
Copy link

ARafaelSF commented Jan 22, 2021

@Koenkk Here it is

Attached are the two files, with cc5231 + Z2M and Tuya. When I did with tuya I turned off the cc2531

Pair of the device + wait 20 seconds + click on 3th gang (on and off), click on 4th gang (on and off)

CC2531+Z2M - https://1drv.ms/u/s!AtfNPxDs_iedo85RY4-IInK5Yq6t_Q?e=7ysfjI
Tuya -https://1drv.ms/u/s!AtfNPxDs_iedo85SwroAwCCFfLFOvg?e=pKTma3

Other information that may interest you.

In Z2M the device looks like ok and I can controll all buttons. But it still doesn't get the status update if I press on the device.

image

@Koenkk
Copy link
Owner

Koenkk commented Jan 23, 2021

Can you update to the latest dev branch, and apply the changes from https://github.com/Koenkk/zigbee-herdsman-converters/pull/2137/files to devices.js

Next pair the device with Z2M and sniff the traffic from it. Also make a sniff when controlling the 4 and 3th gang of this device and provide me the packet send (left column in wireshark "No.")

@ARafaelSF
Copy link

@Koenkk

I did as you asked. Update Z2M edge and change devices.js

Here it sniff: https://1drv.ms/u/s!AtfNPxDs_iedo85sbVjO9AUz4FYBYw?e=Oe5V8w

The sequence is:

Nº 279 - Gang 3 - ON
Nº 334 - Gang 3 - OFF
Nº 348 - Gang 4 - ON
Nº 365 - Gang 4 - OFF

@Koenkk
Copy link
Owner

Koenkk commented Jan 24, 2021

@ARafaelSF can you apply the changes from https://github.com/Koenkk/zigbee-herdsman-converters/pull/2137/files factory reset the device and pair it, do you get updates of the 4th gang now?

See https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html on how to modify devices.js

@ARafaelSF
Copy link

@Koenkk soyry, but I didn't understand how to do this part.

I´m using hass.io. So as I understand it I need to use external_converters.

I put this in yalm file

external_converters:

  • new_device.js

And this file, in share\zigbee2mqtt\new_device.js

https://1drv.ms/u/s!AtfNPxDs_iedo85utcxHK4UQiacmeA?e=tjwh8C

But, my file is wrong, and I can´t fix it.

Sorry for that kind of question, but can you help me?

@Koenkk
Copy link
Owner

Koenkk commented Jan 25, 2021

@ARafaelSF since you have an additional CC2531, probably easier to setup a bare metal environment by following: https://www.zigbee2mqtt.io/getting_started/running_zigbee2mqtt.html (you don't need to sniff anymore, just check if it works)

@ARafaelSF
Copy link

@Koenkk

It works

image

The sequence of 4 buttons, On and Off, reporting do Mqtt.

Thank you very much,

@dror23
Copy link
Author

dror23 commented Jan 25, 2021

@Koenkk Thank you very much vor your assistant!

@dror23
Copy link
Author

dror23 commented Jan 26, 2021

@Koenkk

It works

image

The sequence of 4 buttons, On and Off, reporting do Mqtt.

Thank you very much,

Hey @ARafaelSF how did you manage to fix the problem?
I deleted the addon and reinstalled it and the problem still exist...
In addition Iv'e delete the switch manually but still, doesn't work...

@ARafaelSF
Copy link

@Koenkk
It works
image
The sequence of 4 buttons, On and Off, reporting do Mqtt.
Thank you very much,

Hey @ARafaelSF how did you manage to fix the problem?
I deleted the addon and reinstalled it and the problem still exist...
In addition Iv'e delete the switch manually but still, doesn't work...

My check was outside HA.
The code is not published yet. he should do it as soon as he sees my confirmation that the changes have worked.

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Jan 26, 2021
@Koenkk
Copy link
Owner

Koenkk commented Jan 26, 2021

Merged!

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

@Koenkk Koenkk closed this as completed Jan 26, 2021
@oferwald
Copy link

@Koenkk Thanks, I can confirm that it works for me with the latest-dev branch

@dbroome1978
Copy link

I know this is an old thread, just curious if the fix is still only in the dev branch?

I have the same device (or close to it) but with a different fingerprint _TZE200_1ozguk6x

https://www.moeshouse.com/collections/tuya-zigbee-switch/products/zigbee-wall-touch-smart-light-switch-with-neutral-wire-no-neutral-wire-no-capacitor-needed-smart-life-tuya-2-3-way-muilti-control-association-hub-required-4-gang-white-us

Btw, this was the only zigbee2mqtt was the only gateway to pick up my ZTS-US_3gang (it read it as ZTS-EU_3gang but close enough)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants