Switch TS0041 by _TZ3000_adndolvx not working

Hello community,

I got these switches: Tuya Wireless Scene Switch (TS0041) Zigbee compatibility
They are found by the ZHA integration, but they don’t seem to work.

All I see are 4 Switches but they don’t correspond to any presses on the physical switch.
123

After googling I testet this blueprint: ZHA - Tuya 2-button Scene Switch (TS0041)
But when trying to use the blueprint, I can’t select the swiches in the device list.
I noticed that the manufacturer in the blueprint is “_TZ3000_4upl1fcj” while my switch has “_TZ3000_adndolvx”. I tried to change the string in the blueprint but this doesn’t seem to work.

I tried the same with the TS0043 (3 Button version).

Since they are listed on zigbee.blakadder.com as supported I think maybe Im doing some small stupid mistake?
Do I even need the blueprint?

Any help is welcome :slight_smile:

1 Like

Hi,

i had exactly the same issue.
This one is perfect if you follow this step by step it works 100%. The chinese gave us a firmware with a 4 Buttonswitch…

he also offers the blueprint. I spent more time with google than with config… (also u need to replace the TS0041 in the Quirks python file). Just follow step by step.

PS: you will not see a Button after connecting to Zigbee, but it works with the blueprint.
If you push your switch, you will see it in the log of your device

Greetings.

1 Like

Hi,

thank you, Molker. I’m too busy right now but I’ll try this when I get the time. The article sounds very promising. I’ll post updates if I get it to work.

Cheers.

Hi,

thank you Molker86. Your solution works perfectly.

To summarize; there are 4 button layouts:
TS0044 = 4 buttons
TS0043 = 3 buttons
TS0042 = 2 buttons
TS0041 = 1 button.
I used the tutorial linked by Molker (see above). As described there, I uploaded the quirks from GitHub - zigpy/zha-device-handlers: ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices. in HA. I used the TS0044 quirk for all button layouts. This is because all of them use the TS0044 firmware, regardless of the actual button layout.
In order to get HA to use the ‘wrong’ quirks, I renamed the MODEL to the coherent names, as described in the tutorial mentioned by Molker: Chinese TS0041 1-bang zigbee scene switch on ZHA. Troubleshooting. | by Eduard Dubilyer | Medium

After that I am now able to see the button presses in the event log and therefore I’m now able to automate.

Thanks again for your help, Molker.

Edit: Here is a similar solution that worked for others Switch TS0041 by _TZ3000_adndolvx not working - #10 by AndySymons

Hi,

I have a problem. I followed the instructions. I tried with both TS0041 and TS0044 file (changing MODEL to TS0041).
After adding the switch to HA in 2MQTT, the switch adds itself , but it has the status “out of network”.
I don’t know what is wrong.

Just for anyone else coming across this topic;

I recently received these switches, and at first, had the same issue. After reading through I checked and see that:

#1 the quirk is now already in ZHA per default.
#2 ZHA does no longer present the switches/buttons
#3 it does log to the ZHA log per default
#4 you no longer need the blueprint!

If you add an automation from the device page, you are already presented with the options as short, double and long press for all available buttons. Hope this helps some of you in the future!

Edit: just for the records: I am using HA 2023.1

2 Likes

Hi, thank you for the update. Great to hear that its now a lot simpler. I marked your answer as the new solution. :slight_smile:

@Jorikay I am running Home Assistant 2023.1.7 but was unable to reproduce your result. For me the device TS0041 by _TZ3000_itb0omhv shows up as four switches, as for @flappflapp none of which respond to the physical switch.

If I add an automation then the options for the device are switch 1 on, switch 1 off, switch 1 on or off etc. to switch 4 (though I only have one). They can be added but (unsurprisingly) the automation does not work.

I also tried the blueprint from esjani (ZHA - Tuya 2-button Scene Switch (TS0041)) with the manufacturer modified (otherwise the device is not found) but that is never triggered either.

Did I miss something?

Did you do any custom quirks for ZHA? I did not.

What I noticed y’day, when I add a switch it didn’t work, as initial the vendor was “unk”. I removed and repaired in better range of my zigbee network, and worked just fine.

The log, under the device, should also work. So it should show your button presses. If it won’t. We might have a big in ZHA to report.

After reading more forums I found a workaround, which I implemented as a custom quirk. It would be a good feature request to make this part of the standard package.

The problem is that some manufacturers of 1- 2- or 3-gang switches load them with the 4-gang firmware. In this case TS0041 (1-gang), TS0042 (2-gang), and TS0043 (3-gang) switches will fail with the standard quirks due to a mismatch of the number of endpoints. We therefore require a version of the qıirk for TS0041, TS0042, and TS0043 that has four endpoints (the same as TS0044).

The workaround is to copy the quirk for TS0044 into a custom quirk ts0041.py, and in this file change all four instances of “MODEL: TS0044” to “MODEL: TS0041”. I also recommend changing the names of the classes (I inserted my initials) so that you can see in the HA device information for sure that your custom quirk has been invoked. Don’t forget to enable custom quirks in configuration.yaml if you did not have any before. Restart HA, delete the device and add it back in.

You do NOT need a blueprint.

If it works, you will see your quirk mentioned in the device information and there will be no switch entities, but if you select the device as a trigger for an automation you see a list of options like “First button pressed”, “First button double press”, “First button long press”, “Second button press”… etc. to “Fourth button long press”. An official quirk should ideally get rid of of the unused buttons but I just ignore them.

2 Likes

I have TS0042, and the events are working. Also with the automation it is possible to select button.
But I would like the buttons to be available in node red. Now I only have the battery status available

Is there a way to get the button available in node red ?

1 Like

Hi everybody,

I just want to share my experience wtih the buttons TS0041 and TS0042.
To toggle the switch I was using the switch.toggle service in my automation :

    button_one_short_press:
      - service: switch.toggle
        data: {}
        target:
          entity_id: switch.stairs_0_light_switch

This was working with some delays.
I changed the automation to the following code:

    button_one_short_press:
      - type: toggle
        device_id: e93b84319f5061510540d6d537edda45
        entity_id: dfa4f06584539913f270362b387e3e9b
        domain: switch

It now works without delay and at the first touch!
It seems that calling a service is not without delay and malfunction.

1 Like

Thank you. I followed your instructions. It works so well.

I have this device but I’m unable to use it. Can you please share the quirk that you are using?

1 Like

Solved - spent three hours following Molker86 - which worked and was very happy. And helped me understand the basics. Then saw Jorikay solution, removed all that I had done and a minute later all was working!!! Thanks to all for time and effort - I was confused by the fact I had no switch button - only the battery & RSSI/LQI (hidden), I even tried using and learning Zigbee2MQTT (with little short term success on this device). Thanks all for efforts.