zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Tuya RB-SRAIN01 reports lux, should be mW

Open JarnoBoks opened this issue 1 year ago • 9 comments

What happened?

The Tuya RB-SRAIN01 reports illuminance in lx on three channels (illuminance/illuminance avg 20 / illuminance max), but to my knowledge this should be mV instead of lx.

What did you expect to happen?

I would expect a conversion or the unit mV so I can do my conversion.

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.42.0

Adapter firmware version

20220219

Adapter

CC2531

Setup

Plain on x86064 debian

Debug log

None

JarnoBoks avatar Jan 08 '25 07:01 JarnoBoks

ehm, no...

https://en.m.wikipedia.org/wiki/Lux

lux73 avatar Jan 08 '25 16:01 lux73

ehm, I don't understand your answer.

The unit reports ~5300lx while my calibrated light meter reports 680lx. And in this review the values are shown as mV too. https://smarthomescene.com/reviews/tuya-zigbee-solar-rain-sensor-rb-srain01-review/

JarnoBoks avatar Jan 08 '25 16:01 JarnoBoks

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Mar 10 '25 00:03 github-actions[bot]

Could this issue please reviewed?

Regarding to the manual the unit of light intensity is mV. https://www.the-colliers.net/docs/public/guides%20&%20manuals/Zigbee%20Solar%20Rain%20Sensor%20User%20Manual.pdf

w00dst0ck avatar May 27 '25 08:05 w00dst0ck

I have re raised this issue as per the manual it is measuring mV not lux

dgibbs64 avatar Nov 30 '25 13:11 dgibbs64

How can illuminance be messured in "mV"? - this is bs even If the "manual" says something else. So it was expected that z2mqtt throws an error now...

Logger: homeassistant.components.mqtt.entity Quelle: components/mqtt/entity.py:159 Integration: MQTT (Dokumentation, Probleme) Erstmals aufgetreten: 00:23:16 (1 Vorkommnis) Zuletzt protokolliert: 00:23:16

Error 'The unit of measurement mVis not valid together with device classilluminance' when processing MQTT discovery message topic: 'homeassistant/sensor/0xa4c1380a3c17d253/illuminance/config', message: '{'availability': [{'topic': 'zigbee2mqtt0/bridge/state', 'value_template': '{{ value_json.state }}'}, {'topic': 'zigbee2mqtt0/Regensensor/availability', 'value_template': '{{ value_json.state }}'}], 'availability_mode': 'all', 'default_entity_id': 'sensor.regensensor_illuminance', 'device': {'hw_version': 1, 'identifiers': ['zigbee2mqtt_0xa4c1380a3c17d253'], 'manufacturer': 'Tuya', 'model': 'Solar rain sensor', 'model_id': 'RB-SRAIN01', 'via_device': 'zigbee2mqtt_bridge_0x84b4dbfffebc5ee1', 'name': 'Regensensor'}, 'device_class': 'illuminance', 'enabled_by_default': True, 'object_id': 'regensensor_illuminance', 'origin': {'support_url': 'https://www.zigbee2mqtt.io', 'sw_version': '2.7.1', 'name': 'Zigbee2MQTT'}, 'state_class': 'measurement', 'state_topic': 'zigbee2mqtt0/Regensensor', 'unique_id': '0xa4c1380a3c17d253_illuminance_zigbee2mqtt0', 'unit_of_measurement': 'mV', 'value_template': '{{ value_json.illuminance }}'}'

Pls revert changes. Or change device class or whatever.

hipp0o avatar Dec 07 '25 09:12 hipp0o

I have the same error in HA now. Actually Z2M reports all 3 channels (illuminance/illuminance avg 20 / illuminance max) in mV, while HA report Illuminance as unavailable

Mark-64 avatar Dec 07 '25 13:12 Mark-64

I have the same issue. Maybe those values are not referred to the illuminance (measured in lux) but to the voltage provided by the solar panel.

JackTalisker avatar Dec 12 '25 17:12 JackTalisker

Im having this too Error 'The unit of measurement mVis not valid together with device classilluminance' when processing MQTT discovery message topic: 'homeassistant/sensor/0xa4c138d345215214/illuminance/config', message: '{'availability': [{'topic': 'zigbee2mqtt/bridge/state', 'value_template': '{{ value_json.state }}'}], 'default_entity_id': 'sensor.outside_rain_and_light_sensor_illuminance', 'device': {'hw_version': 1, 'identifiers': ['zigbee2mqtt_0xa4c138d345215214'], 'manufacturer': 'Tuya', 'model': 'Solar rain sensor', 'model_id': 'RB-SRAIN01', 'via_device': 'zigbee2mqtt_bridge_0x9035eafffeaf10c5', 'name': 'Outside Rain and Light Sensor'}, 'device_class': 'illuminance', 'enabled_by_default': True, 'object_id': 'outside_rain_and_light_sensor_illuminance', 'origin': {'sw_version': '2.7.1', 'support_url': 'https://www.zigbee2mqtt.io', 'name': 'Zigbee2MQTT'}, 'state_class': 'measurement', 'state_topic': 'zigbee2mqtt/Outside Rain and Light Sensor', 'unique_id': '0xa4c138d345215214_illuminance_zigbee2mqtt', 'unit_of_measurement': 'mV', 'value_template': '{{ value_json.illuminance }}'}' Error 'The unit of measurement mVis not valid together with device classilluminance' when processing MQTT discovery message topic: 'homeassistant/sensor/0xa4c138d345215214/illuminance/config', message: '{'availability': [{'topic': 'zigbee2mqtt/bridge/state', 'value_template': '{{ value_json.state }}'}], 'default_entity_id': 'sensor.outside_rain_and_light_sensor1_illuminance', 'device': {'hw_version': 1, 'identifiers': ['zigbee2mqtt_0xa4c138d345215214'], 'manufacturer': 'Tuya', 'model': 'Solar rain sensor', 'model_id': 'RB-SRAIN01', 'via_device': 'zigbee2mqtt_bridge_0x9035eafffeaf10c5', 'name': 'Outside Rain and Light Sensor1'}, 'device_class': 'illuminance', 'enabled_by_default': True, 'object_id': 'outside_rain_and_light_sensor1_illuminance', 'origin': {'sw_version': '2.7.1', 'support_url': 'https://www.zigbee2mqtt.io', 'name': 'Zigbee2MQTT'}, 'state_class': 'measurement', 'state_topic': 'zigbee2mqtt/Outside Rain and Light Sensor1', 'unique_id': '0xa4c138d345215214_illuminance_zigbee2mqtt', 'unit_of_measurement': 'mV', 'value_template': '{{ value_json.illuminance }}'}'

My sensor has stopped reporting correctly. Illuminance showing state unavailable/unknown, maximum day average and average 20min seem to still function.

Either remove the invalid illuminance field or convert the raw mv value to a more helpful lux value.

JoeyGE0 avatar Dec 16 '25 10:12 JoeyGE0