Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Device: Zigbee Solar Rain Sensor #23532

Closed
cloudbr34k84 opened this issue Aug 6, 2024 · 39 comments
Closed

New Device: Zigbee Solar Rain Sensor #23532

cloudbr34k84 opened this issue Aug 6, 2024 · 39 comments
Labels
new device support New device support request

Comments

@cloudbr34k84
Copy link

Link

https://www.aliexpress.com/item/1005007269624052.html?spm=a2g0o.order_list.order_list_main.16.49731802i8AvVZ

Database entry

{"id":172,"type":"EndDevice","ieeeAddr":"0xa4c1386b5af8658b","nwkAddr":28526,"manufId":4417,"manufName":"_TZ3210_tgvtvdoc","powerSource":"Battery","modelId":"TS0207","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,4,5,1,1280,61184],"outClusterList":[3,4,6,4096,10,25],"clusters":{"genBasic":{"attributes":{"dateCode":""}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124b002a2ee669","zoneState":1}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":148}}},"binds":[{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b002a2ee669","endpointID":1}],"configuredReportings":[{"cluster":1,"attrId":33,"minRepIntval":3600,"maxRepIntval":65000,"repChange":0,"manufacturerCode":null}],"meta":{}}},"appVersion":67,"stackVersion":1,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":543112114},"lastSeen":1722943531629}

Comments

When i pair the device its been picked up as

  • TS0207
  • _TZ3210_tgvtvdoc
  • Description: Water leak detector

I have tried to construct the converter, but its not sticking and im not sure if its because its already identified.

here is my converter

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;

const rbSrain01 = {
    fingerprint: [{modelID: 'RB-SRAIN01', manufacturerName: '_TZ3210_tgvtvdoc'}],
    model: 'RB-SRAIN01',
    vendor: 'Tuya',
    description: 'Solar Rain Sensor',
    fromZigbee: [fz.tuya_data_point],
    toZigbee: [],
    exposes: [
        e.binary('droplet_detection_state', ea.STATE, 'ON', 'OFF').withDescription('Droplet Detection State'),
        e.numeric('battery', ea.STATE).withUnit('%').withDescription('Battery level'),
        e.numeric('light_intensity', ea.STATE).withUnit('lx').withDescription('Light intensity'),
        e.numeric('average_light_intensity_20mins', ea.STATE).withUnit('lx').withDescription('20 mins average light intensity'),
        e.numeric('todays_max_light_intensity', ea.STATE).withUnit('lx').withDescription("Today's max light intensity"),
        e.binary('cleaning_reminder', ea.STATE, 'ON', 'OFF').withDescription('Cleaning reminder'),
        e.numeric('rain_sensor_voltage', ea.STATE).withUnit('V').withDescription('Rain sensor voltage'),
    ],
    meta: {
        tuyaDatapoints: [
            [1, 'droplet_detection_state', tuya.valueConverter.trueFalse],
            [4, 'battery', tuya.valueConverter.batteryPercentage],
            [101, 'light_intensity', tuya.valueConverter.raw],
            [102, 'average_light_intensity_20mins', tuya.valueConverter.raw],
            [103, 'todays_max_light_intensity', tuya.valueConverter.raw],
            [104, 'cleaning_reminder', tuya.valueConverter.trueFalse],
            [105, 'rain_sensor_voltage', tuya.valueConverter.raw],
        ],
    },
    extend: [],
};

module.exports = rbSrain01;

External definition

const {battery, iasZoneAlarm, commandsOnOff} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['TS0207'],
    model: 'TS0207',
    vendor: '_TZ3210_tgvtvdoc',
    description: 'Automatically generated definition',
    extend: [battery(), iasZoneAlarm({"zoneType":"generic","zoneAttributes":["alarm_1","alarm_2","tamper","battery_low"]}), commandsOnOff()],
    meta: {},
};

module.exports = definition;
@kiselio
Copy link

kiselio commented Aug 9, 2024

Here's a fully working converter for this device, found here:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: [
        {
            modelID: 'TS0207',
            manufacturerName: '_TZ3210_tgvtvdoc',
        },
    ],
    model: 'TS0207_rain_sensor',
    vendor: 'Tuya',
    description: 'Solar Rain Sensor RB-SRAIN01',
    fromZigbee: [tuya.fz.datapoints, fz.battery, fz.ias_water_leak_alarm_1],
    toZigbee: [],
    exposes: [
        e.water_leak('raining').withDescription('Droplet Detection (Raining)'), 
        e.numeric('illuminance', ea.STATE).withUnit('mV').withDescription('Illuminance level'),
        e.numeric('illuminance_average_20min', ea.STATE).withUnit('mV').withDescription('Illuminance average for the last 20 minutes'),
        e.numeric('illuminance_maximum_today', ea.STATE).withUnit('mV').withDescription('Illuminance maximum for the last 24 hours'),
        e.binary('cleaning_reminder', ea.STATE, 'ON', 'OFF').withDescription('Cleaning reminder'),
        e.numeric('rain_intensity', ea.STATE).withUnit('mV').withDescription('Rainfall intensity'),
        e.numeric('battery', ea.STATE).withUnit('%').withDescription('Battery level'),
        e.battery_low(),        
    ],
    meta: {
        tuyaDatapoints: [
            [4, 'battery', tuya.valueConverter.batteryPercentage],
            [101, 'illuminance', tuya.valueConverter.raw],
            [102, 'illuminance_average_20min', tuya.valueConverter.raw],
            [103, 'illuminance_maximum_today', tuya.valueConverter.raw],
            [104, 'cleaning_reminder', tuya.valueConverter.trueFalse],
            [105, 'rain_intensity', tuya.valueConverter.raw],
        ],
    },
    extend: [],
};

module.exports = definition;

@cloudbr34k84
Copy link
Author

Yeah I saw this yesterday as well

@Koenkk
Copy link
Owner

Koenkk commented Aug 12, 2024

Added!

Could you also submit a picture for the docs? This can be done by:

  1. Create a fork by clicking here
  2. Go to the public/images/devices directory, Add file -> Upload files
  3. Upload the files and press Commit changes
  4. Press Contribute -> Open pull request -> update title/description -> Create pull request

Make sure that:

  • The filename is RB-SRAIN01.png
  • The size is 512x512
  • The background is transparent (use e.g. Adobe remove background)

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Aug 12, 2024
@kiselio
Copy link

kiselio commented Aug 12, 2024

Added the image @Koenkk

https://github.com/Koenkk/zigbee2mqtt.io/compare/master...kiselio:zigbee2mqtt.io:master?expand=1

@BogdanNikolas
Copy link

Please, help me change the picture on this device in Z2M. I can't find clear instructions.

@budcalloway
Copy link

Hi !
In my case, I do not have any illuminance reported. Still at 0 mV under sunlight. Anyone having this problem too ?

{ "battery": 73, "battery_low": false, "illuminance": 0, "illuminance_average_20min": 0, "illuminance_maximum_today": 11, "linkquality": 149, "rain_intensity": 4, "tamper": false, "water_leak": false }

@rdorys
Copy link

rdorys commented Sep 2, 2024

It seems that water leak is missing since the last release,
#23678 (comment)

I created a PR to put in back in the converter.
Koenkk/zigbee-herdsman-converters#7931

@RubenKelevra
Copy link
Contributor

Please, help me change the picture on this device in Z2M. I can't find clear instructions.

Instructions are above your comment:

#23532 (comment)

@rdorys
Copy link

rdorys commented Sep 13, 2024

Is this device stable on your network? Mine seems to stop sending data for several hours at a time until I move it significantly closer to a router. What’s odd is that I don’t have to re-pair it. Once I bring it near the router (within just a few centimeters), the sensor starts working normally again, sending data every minute as expected. After that, I can put it back in its original position, and it continues to function properly for a while, but then the issue comes back.

Edit: It seems that it needs to reach directly the coordinator to be back again on the network (bringing it close to a router seemed to be close enought to send the info to the coordinator).

@RubenKelevra
Copy link
Contributor

Can you try covering the solar panel if that happens, before you move it, so we can rule out a low power situation?

@rdorys
Copy link

rdorys commented Sep 13, 2024

Ok I will try it next time, but it really happens randomly. Note that my battery is still 97%, so I don't know if the device will trigger any low power behaviour.

@RubenKelevra
Copy link
Contributor

Ok I will try it next time, but it really happens randomly. Note that my battery is still 97%, so I don't know if the device will trigger any low power behaviour.

Battery percentage reporting is non-optimal currently in Z2M, as most devices don't like usually considered pretty high voltage levels.

As this one got a rechargeable battery the conversion from voltage to percent might actually be completely wrong.

Would you mind graphing the battery voltage as well in HA to see if the battery just drops to a certain voltage when the device disappears?

Thanks!

@rdorys
Copy link

rdorys commented Sep 13, 2024

In fact the device is under heavy sunlight and never has been under 95% for days (was at 80% at unboxing).

@RubenKelevra
Copy link
Contributor

Ah okay. Doesn't sound like a power issue in that case. 🤔

Have you confirmed that the signal strength is fine? Maybe it just falls off the network because it gets wet and thus the signal strength drops?

Btw: Does the device report a battery voltage?

@rdorys
Copy link

rdorys commented Sep 13, 2024

Thx for your time. The battery is reported but I needed to manually set the reporting in the dedicated tab.
image

@c4m0-lab
Copy link

Hi :)

I also get no battery informations

Monosnap Zigbee2MQTT – Home Assistant – Mozilla Fi

is there any solution?

If I try to add it like that i get an error:
Monosnap Zigbee2MQTT – Home Assistant – Mozilla Fi2

@rdorys
Copy link

rdorys commented Sep 23, 2024

@c4m0-lab did you try to wake the sensor (clicking shortly the pairing button) just before sending the configuration?

@c4m0-lab
Copy link

no but I will do it now :)

it worked - YEAH THANKS!!!

@knuti1960
Copy link

did you try to wake the sensor (clicking shortly the pairing button) just before sending the configuration?

That helped me too, thank you so much!

@aston668334
Copy link

Is this device stable on your network? Mine seems to stop sending data for several hours at a time until I move it significantly closer to a router. What’s odd is that I don’t have to re-pair it. Once I bring it near the router (within just a few centimeters), the sensor starts working normally again, sending data every minute as expected. After that, I can put it back in its original position, and it continues to function properly for a while, but then the issue comes back.

Edit: It seems that it needs to reach directly the coordinator to be back again on the network (bringing it close to a router seemed to be close enought to send the info to the coordinator).

Same issue, is there any solution to fix it, thk.

@rdorys
Copy link

rdorys commented Sep 25, 2024

@aston668334, I positioned a router close to a window. When the window is opened, sometime it starts to send data for a while again, but when the windows is closed, eventually it stops sending data. I didn’t have the time to sniff the network and I didn’t received a new antenna for my coordinator.

@knuti1960
Copy link

In my case, it automatically connected to the nearest router (https://www.zigbee2mqtt.io/devices/TS011F_plug_1.html#tuya-ts011f_plug_1), about 2.5 metres away, with a house wall in between. The connection is consistently good and stable. So far, I have only been using the device since yesterday.

@aston668334
Copy link

@aston668334, I positioned a router close to a window. When the window is opened, sometime it starts to send data for a while again, but when the windows is closed, eventually it stops sending data. I didn’t have the time to sniff the network and I didn’t received a new antenna for my coordinator.

Thk, I will try.

@RubenKelevra
Copy link
Contributor

@aston668334, I positioned a router close to a window. When the window is opened, sometime it starts to send data for a while again, but when the windows is closed, eventually it stops sending data. I didn’t have the time to sniff the network and I didn’t received a new antenna for my coordinator.

Do you got fairly new windows?

Because some of the higher tier ones get a metal coating for better insulation, but this blocks radio frequencies from passing through, easily.

@rdorys
Copy link

rdorys commented Sep 26, 2024

Yes I have, but I’m not going to change them for this device 😅😅

@RubenKelevra
Copy link
Contributor

RubenKelevra commented Sep 26, 2024

@rdorys ha you don't have to. You just need to put a non-battery-powered zigbee device outside. For example a zigbee module for switching lights, which can be placed inside a power outlet outside.

Another option are USB powered zigbee sticks or plugs, which are often called "Zigbee repeaters".

Ikea got one for example.

Most non battery powered devices act as routers inside the zigbee network. You just need to have a router outside so the lamp can connect to it.

The router outside will then transmit either through the wall or a window the signal to the next router.

Routers are less focused on conserving power and thus can establish more reliable links.

Hope this helps :)

@aston668334
Copy link

Thx for your time. The battery is reported but I needed to manually set the reporting in the dedicated tab. image

After setting this up and moving my Zigbee coordinator near the window, the sensor has become more stable.

@c4m0-lab
Copy link

I can confirm it. The main problem with stability for me was the distance from the nearest device (socket). I brought that one meter closer and it has stabilized, the breaks are no longer there.

@RubenKelevra
Copy link
Contributor

So I guess we should add some info about this on the wiki page, right @Koenkk? 🤔

@rdorys
Copy link

rdorys commented Sep 27, 2024

And how to deal with the need of manually configuring the battery reporting for some users ?
Can we do it right into the converter ?

@lluisd
Copy link

lluisd commented Sep 27, 2024

I have the same problem. I have it outside and it stops working after a while. If I move inside it stars working again. I have other zigbee aqara devices near that outside and they work perfectly.

@RubenKelevra
Copy link
Contributor

@lluisd is your Aqara device a router? 🤔

@RubenKelevra
Copy link
Contributor

And how to deal with the need of manually configuring the battery reporting for some users ? Can we do it right into the converter ?

I think it makes sense to create a new bug for this, to explain the issue dedicated from this one, as the issue seems well defined

@lluisd
Copy link

lluisd commented Sep 28, 2024

@lluisd is your Aqara device a router? 🤔

no, but I will try to move a little bit to check if it has signal. The only difference between these 2 devices is that the aqara sensor it´s not behind the balcony wall where I placed the rain-solar sensor

image

@marine1988
Copy link

Does this sensor works well for rain or does gale detection with morning humidity?

@rdorys
Copy link

rdorys commented Jan 20, 2025

@marine1988 you are right it can be triggered by morning humidity.

@marine1988
Copy link

Yes I tought that I never find a working sensor for rain that works

@rdorys
Copy link

rdorys commented Jan 21, 2025

There is one https://shop.ecowitt.com/en-fr/products/wittboy that works in home assistant, but not for 15$ 😀

@RubenKelevra
Copy link
Contributor

Yes I tought that I never find a working sensor for rain that works

I was kinda pragmatic 4 years ago and just put a leak detection sensor in the rain gutter. If there's more than just a few drops of rain it will trigger very reliably. :)

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device support New device support request
Projects
None yet
Development

No branches or pull requests