[Z2M] Adding features for TUYA RB-SRAIN01

Hello,
I’ve just acquired this charming flower and unfortunately a few features are missing.
Here are the details:


{
  "battery": 49,
  "cleaning_reminder": true,
  "illuminance": 12,
  "illuminance_average_20min": 262,
  "illuminance_maximum_today": 336,
  "last_seen": "2025-02-18T20:15:26+00:00",
  "linkquality": 220,
  "rain": false,
  "rain_intensity": 3
}

Thank you in advance :slight_smile:

Hello,

Gladys doesn’t integrate all features of every device (especially the more exotic ones). Moreover, some concepts don’t exist at all (like the presence of rain).

Which features do you really need in Gladys? Rain and Rain Intensity?

Hi @cicoub13
illuminance_average_20min and illuminance_maximum_today could be interesting for stats if you can integrate them easily but it’s not my priority (e.g., I don’t have solar panels to do analyses between illuminace_max and production_max).
rain and rain_intensity would be the two to have absolutely in addition to the illuminance we already have.
cleaning_reminder doesn’t seem

1 Like

Hi @cicoub13,

Thanks for the PR! :slight_smile:

Since you’ve added a new feature, did you test this feature in the interface (with the MQTT integration)?

@mutmut If we provide you with a Docker image, do you think you could test it on your side with Zigbee2mqtt? Thanks! :pray:

Yes, now I know how to do it thanks to you :wink:
And right now the weather is awful in Alsace so I should be getting feedback quickly.

Excellent, @cicoub13 if you can provide us with a Docker build :slight_smile:

Not tested with an MQTT device :neutral_face: (indeed, it’s a new feature and I didn’t think of it)
A Docker image with the tag tuya-rain is being built (available in 1 hour).

So, even without testing, I think the icon is missing — even the translation, no? I think a quick local test is worth doing before even doing a Docker build :smiley:

Absolutely. I’ll get back to it when I have a little time.

Test Docker container launched with cicoub13/gladys:tuya-rain, and here are the results.
It seems the French translation of Rain intensity is missing:


For Rain intensity, the unit should be mV:

For Illuminance, we can have Lux by default instead of the -----:

And icons are indeed missing as @pierre-gilles indicated:

For now I’m waiting for feedback but I wonder if it’s not too far off …

1 Like

It was indeed a bit too far, here with some values:

I just recreated an image with the translations and icons.
You need to docker pull cicoub13/gladys:tuya-rain and recreate the container (docker stop and docker rm the old one).

Thanks @cicoub13 !

I just replaced the old one with your new one, but I’m keeping the same Gladys data (same test folder without deleting).
I think I’m missing something because I don’t see any difference.
I tested by deleting the device from my saved z2m devices then « recreated » it (discovered to devices) but it doesn’t change anything.

Will the new z2m data automatically integrate/replace into my new test Docker container?
Or do I have to wipe everything and start over?

I’ll take a look before bothering you any further.

So I found why it wasn’t changing.
In fact, even after deleting the image, when I ran docker-compose it would bring back the old image…
I had to pull the new image first and then run docker-compose.
And everything is fine, thanks @cicoub13 :


If I dared, I’d ask you to have the units in lux by default for brightness :slight_smile:

1 Like

Hi @cicoub13, just a quick follow-up on this PR, I don’t know if you had a chance to take a look? :slight_smile:

Looks good to me, I added the default lux for illuminance and the PR is ready

2 Likes

Thanks @cicoub13 for the PR, and thanks @mutmut for the tests :slight_smile:

It’s merged and will be included in the next Gladys release!

2 Likes

It’s live in Gladys Assistant 4.56:

1 Like