Tuya 4-in-1 custom driver questions


I am using Tuya 4-in-1 driver with TS0601_YXZBRB58_RADAR on C7 hub with latest Platform version. For some reason I cannot save preferences no matter what
I am/was trying. After few minutes all preferences somehow automatically reverted
to all defaults. Is driver re3ading back all configurations from the device itself?
Even "Debug logging' and "Description text logging" are reverted back to "enabled".
These two are definitely driver functions.
My biggest problem with this device is extremely high sensitivity.
The intended use for this sensor is to reliably detect and report Bathroom Occupancy.
Current implementation involves 4 strategically placed Motion Sensor and outlet with
power monitoring for the bidet seat. This works very well but there are too many battery
operated devices. I was hopping mmWave sensor will do better job. But as of now the
sensitivity is extremely high. As a result sensor reported a lot of false activity and
therefore is useless. (BTW, I tried FP2 in the same place but unfortunately it also reports
a lot of false activities.)
What is wrong with my setup and why Preferences settings are not saving?

Hi @vitaliy_kh ,

Please post a screenshot of the Device Details, Data section, Currently, there are two devices produced by different manufacturers that fall into the 'TS0601_YXZBRB58_RADAR' group : _TZE204_sooucan5 and _TZE204_sxm7l9xa.

Also, make sure you are using the latest development branch ver. 1.3.5 ( Time stamp "2023/05/28 10:34 PM")

Yes, it does. It is a bit unusual, but I made the driver this way a long time ago in order to set the correct default values of all the different parameters / preferences.

The actual parameters are reported back from the device to the hub when the device is powered on. Some devices will echo back the changed parameter value when it is changed from the Preferences section.

So if you see your changed preferences reverted back, this means that because of some reason the preferences were not accepted by the device.

I have no explanation for why the Debug Logging and Description Logging options will revert back to their default values. I will need some debug logs to investigate further.

Here it is:

It looks like my toy is "_TZE204_sooucan5".

I downloaded the driver just by searching in HPM but version seems to be correct:


I like this approach because this way you are seeing a real preferences vs what you think
they are. I guess, ALL Drivers should/must use the same approach.
Now I understand why I am not seeing any differences in device behavior.
Preferences simply was not written to the device and the BIG question is: Why?


IN HPM its still 1.6.6

Thank you

Hi Zsolt,

I will not be pushing updates via HPM in the next few weeks, as there are no planned new features to be added, until I am working on the TRVs/thermostats new driver. Once I finish the TRV driver, the 4-in-1 driver will be refactored to use the same libraries as in the rest of my drivers, that will allow me easier support and troubleshooting.

You can still manually update to the latest dev. branch version - from within HE editor locate the driver code and click on the Import button. It is the same driver with the same driver ID, just no automatic updates pushed.

Thanks Krassimir for your hard work. idont know if you are aware of that but other guys JPT i guess are working on a tuya local app, like home assistanse s. As you are great tuya wizz might could help them. Happy Holidays.

I will try to help if I can, although I am not a big fan of any smart devices using WiFi for communication.