[RELEASE] Tuya Zigbee Light and Rain sensor

This Zigbee device has been available for sale on AliExpress in the past few months.

It features a light-intensity sensor, and some kind of water detection sensor. The 'rain detection' has both 'raining/not raining' binary switch and an analogue measurement output ( in millivolts!?). The light intensity also measured in mV, most probably this is the solar charger voltage.

image

AliExpress .com (link)
AliExpress .us (link)
... and other sellers.

The recommended installation method is via Hubitat Package Manager (HPM). Search for "Tuya Zigbee Rain Sensor",

The driver for it in Hubitat can be also manually installed from this link.


There is also another Rain Sensor type available on Ali Express :

image
AliExpress: (link)
AliExpress: (link)
... and other resellers.
If anyone got one of these, please share Zigbee model/manufacturer. For now it is unknown whether this model will work the same way as the 'sunwatch flower' one.

4 Likes

I'm interested in testing and helping.
I can buy the sensor. Let me know what could be the next step

1 Like

A related FYI: Ecowitt has a "leaf wetness" sensor which has the same kind of conductor array -- but it provides a percent "wetness" value. However, it runs on 1xAA, not solar. And it needs an Ecowitt gateway, but if you are already in the ecosystem it is worth knowing about.

1 Like

@cedric when you have it paired to HE as a 'Device', send me the Debug logs when the rain sensor is activated.

Ordered it and should receive it within 2 weeks. Will let you know

1 Like

Ok configured it

Here are the current log
[dev:107]fingerprint profileId:"0104", endpointId:"01", inClusters:"0000,0004,0005,0001,0500,EF00", outClusters:"0003,0004,0006,1000,000A,0019", model:"TS0207", manufacturer:"_TZ3210_tgvtvdoc", controllerType: "ZGB"

[dev:107]Zigbee parsed:[raw:catchall: 0104 EF00 01 01 0040 00 4DEB 01 00 0000 06 01 000166020004000006BC, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4DEB, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:06, direction:01, data:[00, 01, 66, 02, 00, 04, 00, 00, 06, BC]]

[dev:107]ZCL version:03

[dev:107]Software Build Id:unknown

[dev:107]Model:TS0207

[dev:107]Manufacturer:_TZ3210_tgvtvdoc

[dev:107](Zigbee parsed:[raw:catchall: 0104 EF00 01 01 0040 00 4DEB 01 00 0000 06 01 0001650200040000112A, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4DEB, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:06, direction:01, data:[00, 01, 65, 02, 00, 04, 00, 00, 11, 2A]]

[dev:107]getting info for unknown Zigbee device...

1 Like

There is also another Rain Sensor type available on Ali Express :

image
AliExpress: (link)
AliExpress: (link)
... and other resellers.
If anyone got one of these, please share Zigbee model/manufacturer. For now it is unknown whether this model will work the same way as the 'sunwatch flower' one.

So I bought the "sunflower" sensor and have installed your 'alpha release' driver.
It works, but for only 24hrs or so, then falls off the mesh. I've tried this both on my C8 and my C7, so I don't think it's the Toya mesh joining problem, any pointers to how I could debug or let you have info? Thanks.

I encountered similar problem. It lost connection couple times when raining, but recovered by itself. Rainy today no data coming from the sensor. The device detail showed healthstatus as online, but it was not. I tried several times to recover but failed. I sent 'initialize' command and got following log:

dev:9342024-09-12 06:26:23.874 PMdebugRain Sensor customInitEvents()

dev:9342024-09-12 06:26:23.872 PMwarnRain Sensor executeCustomHandler: Exception 'org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '' with class 'java.util.ArrayList' to class 'java.util.Map' due to: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: java.util.Map()'caught while processing customInitializeVars(true) (val=null))

dev:9342024-09-12 06:26:23.868 PMdebugRain Sensor resetPreferencesToDefaults: DEVICE=Tuya Zigbee Rain Sensor preferences=

dev:9342024-09-12 06:26:23.867 PMdebugRain Sensor customInitializeVars(true)

dev:9342024-09-12 06:26:23.866 PMdebugRain Sensor initEventsDeviceProfile(true) for deviceProfile=TUYA_RAIN_SENSOR DEVICE?.device?.powerSource=battery ps.isEmpty()=false

dev:9342024-09-12 06:26:23.865 PMdebugRain Sensor deviceProfileInitializeVars(true)

dev:9342024-09-12 06:26:23.859 PMdebugRain Sensor batteryInitializeVars()... fullInit = true

dev:9342024-09-12 06:26:23.820 PMinfoRain Sensor Initialized

dev:9342024-09-12 06:26:23.820 PMinfoRain Sensor DEVICE_TYPE = RainSensor

dev:9342024-09-12 06:26:23.819 PMinfoRain Sensor all states and scheduled jobs cleared!

dev:9342024-09-12 06:26:23.818 PMinfoRain Sensor device model TS0207 manufacturer _TZ3210_tgvtvdoc was set to : deviceProfile=TUYA_RAIN_SENSOR : deviceName=Tuya Zigbee Rain Sensor

dev:9342024-09-12 06:26:23.804 PMdebugRain Sensor found exact match for model TS0207 manufacturer _TZ3210_tgvtvdoc : profileName=TUYA_RAIN_SENSOR deviceName =Tuya Zigbee Rain Sensor

dev:9342024-09-12 06:26:23.793 PMdebugRain Sensor resetStats...

dev:9342024-09-12 06:26:23.787 PMdebugRain Sensor InitializeVars()... fullInit = true

dev:9342024-09-12 06:26:23.786 PMinfoRain Sensor initializing device powerSource 'unknown'

dev:9342024-09-12 06:26:23.785 PMinfoRain Sensor initialize()... initCtr=1

dev:9342024-09-12 06:26:23.784 PMinfoRain Sensor executed initialize()

This log may help you to debug.

Hi Rhee,

Thank you for the debug logs. I now see where the exception is raised and will fix it in the next update, but this is not related to the problem that you have - the device losing the Zigbee connection...

What is the distance between the rain sensor and the nearby mains-powered Zigbee device? Can you temporarily move the sensor closer to your Zigbee devices in the house? I expect the connection to be re-established again, if not - pair it again to the hub (without deleting it!).

With the default settings, the health status changes from online to offline rather slowly—after a 12-hour period without receiving anything from the device. This can be speeded up, but I will need to know the device's behavior—does it periodically send check-in messages or not?

When you re-connect the device to the Zigbee network, please click on the 'Ping' button (the commands on the top of the device web page) - will the rain sensor respond to the Ping command (you should see an RTT attribute change), or it will timeout?

You can also leave the Debug logging turned on for at least 4 hours, and then you can send me the Debug logs in a DM for analysis.

Hi kkossev,

Thanks for your reply.
The distance is about 3m from C-8 pro. I will try to re-pair.
It periodically sent check-in messages when working normally.
I will try what you suggested and get back to you after getting logs.

1 Like

Hi Kossev,

After re-pairing everything working fine.

1 Like

Hi Kossev,
After a day since re-paired, the rain sensor stopped sending data. The device status shows as online.
I think this problem is similar to what @youra is experiencing.

Current States

  • Status : clear
  • averageLightIntensity20mins :5.383
  • battery : 100
  • cleaningReminder : off
  • dropletDetectionState : off
  • healthStatus : online
  • illuminanceVoltage : 5.339
  • lastBattery : Sat Sep 14 17:00:37 KST 2024
  • powerSource : battery
  • rainSensorVoltage : 0.01
  • todaysMaxLightIntensity :5.858
  • water : dry

The logs were turned off so I just turned on.

dev:9342024-09-14 06:49:27.230 PMinfoRain Sensor updated

dev:9342024-09-14 06:49:27.230 PMdebugRain Sensor sendZigbeeCommands: sent cmd=[null]

dev:9342024-09-14 06:49:27.228 PMwarnRain Sensor sendZigbeeCommands it: no commands to send! it=null (cmd=[null])

dev:9342024-09-14 06:49:27.225 PMdebugRain Sensor updateAllPreferences: preferences=

dev:9342024-09-14 06:49:27.224 PMdebugRain Sensor current state.deviceProfile=TUYA_RAIN_SENSOR, settings.forcedProfile=Tuya Zigbee Rain Sensor, getProfileKey()=TUYA_RAIN_SENSOR

dev:9342024-09-14 06:49:27.222 PMdebugRain Sensor customUpdated()

dev:9342024-09-14 06:49:27.221 PMdebugRain Sensor deviceHealthCheck is scheduled every 240 minutes

dev:9342024-09-14 06:49:27.193 PMinfoscheduling health check every 240 minutes by Activity check method

dev:9342024-09-14 06:49:27.168 PMinfoRain Sensor driver version 3.0.1 2024/08/09 12:36 PM (TS0207 _TZ3210_tgvtvdoc) (C-8 Pro 2.3.9.180)

dev:9342024-09-14 06:49:27.167 PMinfoRain Sensor updated()...

dev:9342024-09-14 06:42:59.291 PMinfoRain Sensor debug logging disabled...

I clicked 'Refresh' button and got nothing.
Following is the logs about refresh:

dev:9342024-09-14 06:52:10.401 PMdebugRain Sensor no refresh() commands defined for device type RainSensor

dev:9342024-09-14 06:52:10.401 PMdebugRain Sensor no customRefresh method defined

dev:9342024-09-14 06:52:10.400 PMdebugRain Sensor refreshFromDeviceProfileList()

dev:9342024-09-14 06:52:10.400 PMdebugRain Sensor customRefresh()

dev:9342024-09-14 06:52:10.398 PMdebugRain Sensor refresh()... DEVICE_TYPE is RainSensor model=TS0207 manufacturer=_TZ3210_tgvtvdoc

dev:9342024-09-14 06:50:27.242 PMdebugRain Sensor clearing the Status event

One more thing...
I have kept monitoring data from the sensor and found that the value of attributes 'dropletDetectionState' and 'cleaningReminder' never changed. They are alway 'off'.

1 Like

When you re-pair the device and it starts sending messages again, please test whether the ‘ping() button updates the RTT numeric value or not.

If the device is not sleepy and responds to pings, maybe a periodic ping will keep it connected?

I just click 'ping' and got following:

dev:9342024-09-14 07:06:09.365 PMinfoRain Sensor Round-trip time : timeout

dev:9342024-09-14 07:06:09.364 PMwarnRain Sensor no response received (sleepy device or offline?)

dev:9342024-09-14 07:05:59.375 PMdebugRain Sensor ping...

I will re-pair and will try ping.

Your device has dropped off the Zigbee network… You need to pair it again and maybe even use the Double Luck voodoo, if on C-8 …

OK, I will try double luck voodoo and get back to you.

I see a similar problem reported with Zigbee2MQTT .. :frowning:

Gosh, we are not alone. :astonished:
I will re-pair and keep watch on.
Thanks!

1 Like