[RELEASE] Tuya Scene Switch TS004F driver (w/ healthStatus)

Well .. Not really .. I went back to the "stock" driver. on all my 4-button remotes.
I have 5 of these ..

image

this button controller seems to want to work with the stock driver.

  • endpointId: 01
  • application: 0120FFE41F20FFE242
  • manufacturer: _TZ3000_wkai4ga5
  • model: TS0044

The other button controllers all have a application ID of 42

  • endpointId: 01
  • application: 42
  • manufacturer: _TZ3000_wkai4ga5
  • model: TS0044

Whats weird is the only controller that shows battery is the one that has a app id of : 0120FFE41F20FFE242

Update Mr. kkossev ..

I have switched ALL ( 5 ) of these stupid TZ3000_wkai4ga5 - model: TS0044
To our driver now and finally they all seem to work ok and they seem to stay online ..
Well show / list Online .. well sofar anyway LOL

I was still getting some weird behavior from 1-2 of them when you single click button ..
it would turn on then off right away .. or if the light was on and you clicked off .. it would turn on again.
I think you said to me some where about debouncing .. so I went in to your driver.
and changed debouncing to 2000 and this seems to have fix it.
Hopefully I did this correct .. only spot i could find were it listed a time for debouncing.
And it did seem to help :slight_smile:

@Field static final Integer DEBOUNCE_TIME = 2000

I wonder if you added it to the options page of the driver for people like me that need it ?

Also wondering Why Only ( 2 ) of the ( 5 ) these stupid switches show battery %

Anyway thanks for your help the other day :slight_smile:

image
image

image

1 Like

I have to find enough time to test a Debounce configuration option carefully... I tried once and it broke the backward compatibility with the previous driver versions, so I had to urgently roll back the changes .. : (

There is an 'Advanced Option' that you can experiment with :

By default, this driver does not configure explicitly the battery reporting time, because some weird devices don't like it and will deplete the battery in no time.. I don't know how your device will react, it may be a good idea to try with one of the scene switches only.

You must change the reporting period to one of the options different than 'Default' and Save the preferences. Nothing will happen at this time - you must pair the scene switch again to the hub (without deleting it). During the pairing process, the battery reporting configuration will be sent to the device. This is the only time when it accepts the configuration changes.

1 Like

Thought I would update you on my 4-button remote saga .. Shakes Head ..

So as we talked about the Debounce thing .. I did change that setting in the driver. to 2000.
And it seems to helped/work very well. have not had one on/off event since I did that.

Now for the bad part ,, I had 3 of the 5 not reporting power settings,
Since I got your driver working well on all 5 devices .. I thought I would press my luck
I and changed all ( 5 ) of them to 24hrs. :frowning:
They all report battery now .. but every 15-17 minutes ! LOL ( Not Good )

Weirder, they now "flash all lights" when it sends the battery info ! ( that's very bad )
killed about 10% - 20% battery in just a few hours .. Anyway ..

I tried to set them back to default in the driver ..
But the logs always said : battery reporting interval not changed.
I tried a bunch of times different ways / things .. always got the same thing.

Even tried 4-8 - 12 hours to see what happened .. same thing :frowning:

I then tried to do a reset on the 4 button controllers .. tried holding upper left / bottom left.
Upper right / Bottom right nothing worked .. still reporting 15-17 minutes.

Anyway .,. I finally took out the battery's for 20 -30 secs pushed a few buttons to kill power.
And replaced and tried one at a time the same buttons. 1-2-3 < did not work.
Then I tried ( 4 ) bottom right. < It finally worked ! ( I always thought 1 or 2 was the reset! )

Anyway Fixed for now .. I hope ..
Thought I would put this out.. incase someone else does something stupid like what I did !

Your devices are exactly the problematic type where that doesn't like battery configuration. The known negative effect is exactly as you describe it - "flash all lights" and killing battery.

The lights are flashing, because the device is restarting and leaving the Zigbee network, then joining again. This kills the batteries.

Keep the 'Default' battery reporting configuration for TZ3000_wkai4ga5. Before re-pairing to the HE hub, perform the same 'reset to factory defaults' procedure - remove the battery for 20-30 seconds, press buttons to drain any remaining voltage/energy in the controller, put the battery back and pair it again.

Observe the 'rejoinCtr' in the state variables : if the number increases, this means a problem - the device is rejoining the HE network and the batteries will deplete in no time..
image

Hi @kkossev

Can you please add these fingerprints into your driver -

TS004F // _TZ3000_b3mgfu0d - Candeo Modmote
TS004F // _TZ3000_czuyt8lz - Candeo Modmote

These devices work successfully with your driver, with the exception that the devices do NOT report battery levels. If possible, it would make sense to remove battery reporting for these devices.

Thank you

1 Like

I bought and isntalled the moes TS004
1000084630

I'm trying to make in work with Motion and Mode Lightning app but i can't get it to work.

I have an automation that when entering the room, the lights turn on and when no motion is detected, the turn off.
I want have the option of enabling and disabling the automation, but i cant get it to work.
At the moment only the disable button work and i also tried switching the 1 and 2 numbers.

And ideas?

Hi @davehendo25 ,

Are your devices these : ( Amazon .co .uk)

image

@yanivsh23 please wait for a new version - I think that your device generates double events and this may be the reason that your Room Lighting rule does not work.

@yanivsh23 please update to dev. branch version 2.7.1.

Before testing the automation again, check the live logs and make sure that pressing any of the buttons produces only one ''button pressed' event.

1 Like

I tried installing the new version but it's still showing the previous one.

FYI, I also encounter the same problem with sonoff button - only one command works, so maybe the problem isn't the driver.
I will a few more teat tomorrow and let you know.

Thanks,

1 Like

You need to update the driver manually, it is not in HPM yet, as not proven to solve the problem.
Do you know how to update a custom driver manually?

Drivers code and then import.
After that, manually change the driver in the device settings.
I can see in the driver that it is the new versions.


Some Tuya devices require that you have the correct driver installed in advance, before pairing the device.

Its better to start fresh - delete the device and then pair it again to your HE hub. Will be the Tuya TS004F driver selected automatically?

After repairing the device it works great now.
Thanks!

1 Like

Thank you for the feedback! Version 2.7.1. is pushed for updates via HPM.

@kkossev,
I noticed recently that all my button controllers need to be pushed twice to active a button function (mainly the Tuya Scene/Dimmer Switch TS004F)?
Not sure why, any ideas?

2 Likes

Are you using your button controllers with the TS004F driver, or with the Zigbee Button Dimmer driver?
For the latest, I should probably create a new thread to avoid mixing the comments on the two different drivers.

Controllers with the issue are using the "Tuya Scene Switch TS004F" driver.

I checked two of my TS004F buttons and they are working fine...
Please let me know what is the manufacturer ID of your button(s) and copy/paste some debug logs when you click on a button. Do you see new messages in the live logs on any click?

Did the problem start after the latest driver update to version 2.7.1. ?

Seems to be a "debouncing" issue.

Logs

dev:7462024-05-06 09:46:27.390 AMdebugLiving Room (main) :1234: debouncing timer for button 1 expired.

dev:7462024-05-06 09:46:26.391 AMdebugLiving Room (main) :1234: restarted debouncing timer 1000ms for button 1 (lastButtonNumber=1)

dev:7462024-05-06 09:46:26.380 AMwarnLiving Room (main) :1234: ignored event for button 1 - still in the debouncing time period!

dev:7462024-05-06 09:46:26.378 AMdebugLiving Room (main) :1234: catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 24CD 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:24CD, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]

dev:7462024-05-06 09:46:26.375 AMdebugLiving Room (main) :1234: description is catchall: 0104 0006 01 01 0040 00 24CD 01 00 0000 FD 00 00

dev:7462024-05-06 09:45:58.323 AMinfoLiving Room (main) :1234: button 1 was pushed

dev:7462024-05-06 09:45:58.321 AMdebugLiving Room (main) :1234: catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 24CD 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:24CD, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]

dev:7462024-05-06 09:45:58.318 AMdebugLiving Room (main) :1234: description is catchall: 0104 0006 01 01 0040 00 24CD 01 00 0000 FD 00 00

  • endpointId: 01
  • application: 42
  • manufacturer: _TZ3000_wkai4ga5
  • model: TS0044
1 Like