[RELEASE] Tuya Temperature Humidity Illuminance LCD Display with a Clock (w/ healthStatus)

I have this one:

ID: 2362

Manufacturer: _TZE200_pay2byax

Product Name:

Model Number: TS0601

deviceTypeId: 218

manufacturer : _TZE200_pay2byax

idAsInt : 1

inClusters : 0001,0500,0000

endpointId : 01

profileId : 0104

application : 52

outClusters : 0019,000A

initialized : true

model : TS0601

stage : 4

It isn't work. If i select TS0601, i can see change temperature value between 0 and 0.1 when i use a magnet in this contact device. I can't see any illuminance value. This sensor have a reed and illuminance sensor.

This seems to be a Tuya door/window contact sensor only, I can't find any information that it is capable of reporting illuminance as well... Can you post a link to the site where this device was purchased?
To make it work as a contact sensor only, you can try the inbuilt 'Generic Zigbee Contact Sensor (no temp)' driver. If it does not work, you can try also Tomas1's driver published here : Tuya zigbee contact sensor - #18 by tomas1

I bought it on aliexpress and it is a contact sensor with ilñuminance sensor.


€ 11,60 30%de DESCUENTO | Tuya Zigbee-Sensor de iluminación de ventana y puerta 2 en 1, Detector de brillo, alarmas de seguridad inteligentes abiertas/cerradas para Alexa y Google


As i said, when i put in close state it shows temperature 0.1 and when i put in open state it shows temperature 0. So i can use with this driver but not for the illuminance sensor.

1 Like

I tried with Tomas driver but it isn't works. Next i check for more options and i find your driver.
Now i'm trying to undeerstand how to program software to create i new driver between both but it looks to dificult for me...

Thank you Hector, it is now clear that this device really has an illuminance sensor in addition to the magnetic contact / reed relay sensor, as well as it is clear that at the moment there is no Tuya driver in HE for this device...

At this time I am not sure whether it is a good idea to extend this driver or make a new dedicated one, but lets use this driver for the inital experiments.

Make sure you are using the latest development branch version (the link in the second post), Press the Initialize button, at the same time when the device is active (activate the contact sensor for example).
Make sure the Debug option in the preferences section is switched on.

Then observe the logs when you open/close the contact and when you change the illuminance.
Copy and paste the logs, then first select the multiple log lines and use the 'Hide details' tool in the forum message editor:

Analyzing the logs we will hopefully see what are the messages sent when the illuminance is reported.

1 Like

This is dev:712 info with the driver. I selected
Ts 0601_tuya.

1 Like

@Hector please update the driver to the latest development version 1.0.7 (the link is in the second post) . Then press the Initialize button, the model automatically selected should be 'TS0601_Contact'.
Let me know if it works.

1 Like

Thats great!! It works. I can see illuminance. I can see the state of the reed with the temperature value: 0.1 open 0 close.

You can see the new logs here.

This device open a new world of posibilities for me. Thanks again.

1 Like

Did you press the Initialize button? Then refresh the web page and check whether under the 'State variables' the device is recognized correctly as * modelGroup : TS0601_Contact
If recognized correctly, It should send a 'contact' event with values 'open' or 'close'.

i do what you said but It not send a 'contact' event with values 'open' or 'close'. Only change the temperature between ' and 0.1 as i told.

I repairing the device with same conclusion.

i see too, that the refresh button don´t works with the illuminance. This value only change when i open or close, i don´t know if this could be done.

(closed window shows:)
Current States

  • humidity : 100
  • illuminance : 1
  • temperature : 0

(open window shows:)

Current States

  • humidity : 100
  • illuminance : 1
  • temperature : 0.1

Illuminance not change on this test because i done without light, only a far led in my living room.

I solved it.

I change the code with this

if (getModelGroup() == "TS0601_Contact") {
def value = fncmd == 1 ? "closed" : "open"
sendEvent("name": "contact", "value": value)
if (settings?.txtEnable) log.info "${device.displayName} Contact is ${value}" open()

and i finish it with this

void open() {
logInfo("Contact open")

void close() {
logInfo("Contact closed")

Trying to force it to refresh...

1 Like

I am glad you have managed to solve the issue, good work!
In the next official release, I will comment out the "ContactSensor" capability, but leave the resto of the code inside the driver, should anyone else use the same device. I believe you will use your own modified copy of the driver.

About the refresh - I am afraid that this type of 2-in-1 sensors send the illuminance readings only when the contact (or the motion for the 2-in-1 motion sensors) is triggered. This is probably done in order to save battery, the 2-in-1 devices are sleeping all the time except when contact or motion event is detected.

With all Tuya devices that use EF00 cluster, there is no known way to send a command asking for a refresh or reading of any parameter. Tuya EF00 cluster devices (typically use TS0601 as model) do not react on any standard ZHA 1.2 reporting configuration commands as well, they send reports on their own algorithm. But from your logs it seems like the device always sends the illuminance reading first, the contact event seconds. So when your automation is triggered by the contact event, you should have the illuminance value already updated in Hubitat.... You will need to test.

1 Like

The AliExpress link under this clock is for the WiFi version. Better delete it before someone mistakenly buys one. Guilty :yum:

1 Like

This driver has the preferences reset after hub reboot also. I checked your dev branch but I didn't see it mentioned in your changes list.

1 Like

@Inge_Jones version 1.0.7 2022-06-09 fixes the preferences reset bug. It is also available for updates from HPM.

@bbholthome thank you for finding the AliExpress wrong link, I have corrected it now on the first post.

I just received the TS0601 manufacturer: _TZE200_pay2byax. Your driver 1.0.7 2022-06-09 works for me. (Once I realized I had to scroll way past the built in drivers. )

I have found that the illumance is being updated every ten minutes and the values seem somewhat reasonable. That is 1000 under a bright light bulb and between 50 and 90 in a dimmish corner of my desk with no direct light on it.

The humidity is showing 100% whereas another sensor, Sonoff Temperature & Humidity Sensor, displays a more reasonable 55%.

The contact sensor is wonky when I bring the magnet touchnig it and away. It shows closed once I pull the magnet away. Which is why I suspect you've removed that value from the reported values.

I've only had it setup a few hours and haven't yet placed it in direct sunlight because it's cloudy.

1 Like

Thank you for the info, @tony4 . This is a weird device, seems like it is reporting the open/close contact status inverted! I will correct it in the next update.

Also, I suppose that the 100% reading value is the battery status (the device sends it in a command that is used by all other sensors to report the humidity... and this device doesn't have a humidity sensor, indeed.)

By a chance, do you have an older battery that is not 100% full to confirm this hypothesis?

I am somewhat wrong as I didn’t give enough time observing the device. It appears that If the lux value changes then it Updates every 10 minutes. It also appears that the maximum value is 1000. I have had it placed it in my south facing window for the last several hours however it has been a cloudy day. Tomorrow it is supposed to be sunny and 37 C or 98 Fahrenheit. Which is darn warm for Canada but…

I was thinking that the 100 might be the battery. I will post in a week or three if it drops down to 99. Smile. I don’t think I have any batteries that small but I will take a look.

Most of Tuya multi-sensors have illuminance values limited to 1000 lux. One exception is _TZ3000_QAAYSLLP where the illuminance readings can go really high, my device shows over 88,000 lx when exposed to direct sunlight. But these sensors (including the contact+illuminance sensor) are designed for indoor use, so this 1000 lx cap shouldn't be a problem.

I have fixed the inverted open/close status of the sensor in version 1.0.8 and the _TZE200_pay2byax 100% report should now be shown as a battery percentage, not humidity. Please update the driver from the development branch (link in the second post). You will still need to uncomment the capability "ContactSensor" line in the code. Unfortunately, HE does not allow dynamic capabilities configuration in the drivers code. This is s is a bit non-standard combination of contact + illuminance capabilities, probably the best approach would be to make a dedicated driver for this (and similar) device(s) in the future.

I think mine has developed a hardware fault. In the last few days the display has been blanking out and it's stopped sending events. Removing and replacing the batteries gets it going again for a few hours. Tried new batteries too but with the same result. Anyone else having trouble with theirs?

Download the Hubitat app