zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

[SNZB-02DR2 / SONOFF] ??? external temp and hum lost

Open popowskikrzysztof-eng opened this issue 2 months ago • 14 comments

What happened?

After updating the SNZB-02DR2 sensor, the ability to transmit temperature and humidity data from the external Sonoff sensor was lost. ID firmware: 1.0.5 20260814 Wersja firmware: 4101

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

2.14.1 (unknown)

Adapter firmware version

{"build":0,"ezsp":13,"major":7,"minor":4,"patch":5,"revision":"7.4.5 [GA]","special":0,"type":170}

Adapter

EmberZNet

Setup

os: #1 SMP PREEMPT_DYNAMIC Thu Jul 30 12:31:10 UTC 2026 - 6.18.39-haos - x64 node: v24.18.1 ha: true

Device database.db entry

No response

Debug log

No response

Notes

Device

definition: SNZB-02DR2 - SONOFF (v0.0.0) software_build_id: 1.0.5 date_code: 20260814 endpoints:

{"1":{"bindings":[{"cluster":"genPollCtrl","target":{"endpoint":1,"ieee_address":"0x180df9fffee2bc8c","type":"endpoint"}},{"cluster":"genPowerCfg","target":{"endpoint":1,"ieee_address":"0x180df9fffee2bc8c","type":"endpoint"}},{"cluster":"msTemperatureMeasurement","target":{"endpoint":1,"ieee_address":"0x180df9fffee2bc8c","type":"endpoint"}},{"cluster":"msRelativeHumidity","target":{"endpoint":1,"ieee_address":"0x180df9fffee2bc8c","type":"endpoint"}}],"clusters":{"input":["genBasic","genPowerCfg","genIdentify","msTemperatureMeasurement","msRelativeHumidity","genPollCtrl","manuSpecificAmazonWWAH","customSonoffSnzb02dr2"],"output":["genTime","genOta"]},"configured_reportings":[{"attribute":"batteryPercentageRemaining","cluster":"genPowerCfg","maximum_report_interval":65000,"minimum_report_interval":3600,"reportable_change":10},{"attribute":"batteryVoltage","cluster":"genPowerCfg","maximum_report_interval":65000,"minimum_report_interval":3600,"reportable_change":10},{"attribute":"measuredValue","cluster":"msTemperatureMeasurement","maximum_report_interval":3600,"minimum_report_interval":10,"reportable_change":100},{"attribute":"measuredValue","cluster":"msRelativeHumidity","maximum_report_interval":3600,"minimum_report_interval":10,"reportable_change":100}],"scenes":[]}}
Health

time: Sat Sep 12 2026 23:24:46 GMT+0200 (Central European Summer Time) os.load_average: 0.02, 0.05, 0.01 os.memory_percent: 39.2672 process.memory_percent: 4.3793 process.uptime_sec: 255608

{"leave_count":0,"messages":7583,"messages_per_sec":0.0297,"network_address_changes":0}

popowskikrzysztof-eng avatar Sep 12 '26 21:09 popowskikrzysztof-eng

I can confirm the same issue. I had this working with ZHA on home assistant and now the display areas for the external temperature and humidity are blank. I scanned the device attributes using ZHA toolkit and returned this

zha_toolkit_version: v1.2.2 zigpy_version: 2.2.0 zigpy_rf_version: 1.0.1 ieee_org:

  • 255
  • 255
  • 6
  • 242
  • 19
  • 56
  • 193
  • 164 ieee: xx:... command: scan_device command_data: null start_time: '2026-09-12T23:04:21.965784+00:00' errors: [] params: dir: 0 tries: 100 expect_reply: true args: [] kwargs: {} read_before_write: true read_after_write: true scan: ieee: xx:... nwk: '0x595d' model: SNZB-02DR2 manufacturer: SONOFF manufacturer_id: '0x4742' endpoints:
    • id: 1 device_type: '0x0302' profile: '0x0104' in_clusters: '0x0000': cluster_id: '0x0000' title: Basic name: basic attributes: '0x0000': attribute_id: '0x0000' attribute_name: zcl_version value_type: - '0x20' - uint8_t - Analog access: READ access_acl: 1 manf_id: 4742 '0x0001': attribute_id: '0x0001' attribute_name: app_version value_type: - '0x20' - uint8_t - Analog access: READ access_acl: 1 manf_id: 4742 '0x0002': attribute_id: '0x0002' attribute_name: stack_version value_type: - '0x20' - uint8_t - Analog access: READ access_acl: 1 manf_id: 4742 '0x0003': attribute_id: '0x0003' attribute_name: hw_version value_type: - '0x20' - uint8_t - Analog access: READ access_acl: 1 manf_id: 4742 '0x0004': attribute_id: '0x0004' attribute_name: manufacturer value_type: - '0x42' - CharacterString - Discrete access: READ access_acl: 1 manf_id: 4742 '0x0005': attribute_id: '0x0005' attribute_name: model value_type: - '0x42' - CharacterString - Discrete access: READ access_acl: 1 manf_id: 4742 '0x0006': attribute_id: '0x0006' attribute_name: date_code value_type: - '0x42' - CharacterString - Discrete access: READ access_acl: 1 manf_id: 4742 '0x0007': attribute_id: '0x0007' attribute_name: power_source value_type: - '0x30' - enum8 - Discrete access: READ access_acl: 1 manf_id: 4742 '0x0011': attribute_id: '0x0011' attribute_name: physical_env value_type: - '0x30' - enum8 - Discrete access: READ|WRITE access_acl: 3 manf_id: 4742 '0x0012': attribute_id: '0x0012' attribute_name: device_enabled value_type: - '0x10' - Bool - Discrete access: READ|WRITE access_acl: 3 manf_id: 4742 '0x4000': attribute_id: '0x4000' attribute_name: sw_build_id value_type: - '0x42' - CharacterString - Discrete access: READ access_acl: 1 manf_id: 4742 '0xfffd': attribute_id: '0xfffd' attribute_name: cluster_revision value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 commands_received: {} commands_generated: {} '0x0001': cluster_id: '0x0001' title: Power Configuration name: power attributes: '0x0020': attribute_id: '0x0020' attribute_name: battery_voltage value_type: - '0x20' - uint8_t - Analog access: READ|REPORT access_acl: 5 manf_id: 4742 '0x0021': attribute_id: '0x0021' attribute_name: battery_percentage_remaining value_type: - '0x20' - uint8_t - Analog access: READ|REPORT access_acl: 5 manf_id: 4742 '0xfffd': attribute_id: '0xfffd' attribute_name: cluster_revision value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 commands_received: {} commands_generated: {} '0x0003': cluster_id: '0x0003' title: Identify name: identify attributes: '0x0000': attribute_id: '0x0000' attribute_name: identify_time value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0xfffd': attribute_id: '0xfffd' attribute_name: cluster_revision value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 commands_received: {} commands_generated: {} '0x0020': cluster_id: '0x0020' title: Poll Control name: poll_control attributes: '0x0000': attribute_id: '0x0000' attribute_name: checkin_interval value_type: - '0x23' - uint32_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x0001': attribute_id: '0x0001' attribute_name: long_poll_interval value_type: - '0x23' - uint32_t - Analog access: READ access_acl: 1 manf_id: 4742 '0x0002': attribute_id: '0x0002' attribute_name: short_poll_interval value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 '0x0003': attribute_id: '0x0003' attribute_name: fast_poll_timeout value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0xfffd': attribute_id: '0xfffd' attribute_name: cluster_revision value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 commands_received: {} commands_generated: {} '0x0402': cluster_id: '0x0402' title: Temperature Measurement name: temperature attributes: '0x0000': attribute_id: '0x0000' attribute_name: measured_value value_type: - '0x29' - int16s - Analog access: READ|REPORT access_acl: 5 manf_id: 4742 '0x0001': attribute_id: '0x0001' attribute_name: min_measured_value value_type: - '0x29' - int16s - Analog access: READ access_acl: 1 manf_id: 4742 '0x0002': attribute_id: '0x0002' attribute_name: max_measured_value value_type: - '0x29' - int16s - Analog access: READ access_acl: 1 manf_id: 4742 '0xfffd': attribute_id: '0xfffd' attribute_name: cluster_revision value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 commands_received: {} commands_generated: {} '0x0405': cluster_id: '0x0405' title: Relative Humidity Measurement name: humidity attributes: '0x0000': attribute_id: '0x0000' attribute_name: measured_value value_type: - '0x21' - uint16_t - Analog access: READ|REPORT access_acl: 5 manf_id: 4742 '0x0001': attribute_id: '0x0001' attribute_name: min_measured_value value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 '0x0002': attribute_id: '0x0002' attribute_name: max_measured_value value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 '0xfffd': attribute_id: '0xfffd' attribute_name: cluster_revision value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 commands_received: {} commands_generated: {} '0xfc11': cluster_id: '0xfc11' title: CustomSonoffCluster name: null attributes: '0x0003': attribute_id: '0x0003' attribute_name: comfort_temperature_max value_type: - '0x29' - int16s - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x0004': attribute_id: '0x0004' attribute_name: comfort_temperature_min value_type: - '0x29' - int16s - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x0005': attribute_id: '0x0005' attribute_name: comfort_humidity_min value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x0006': attribute_id: '0x0006' attribute_name: comfort_humidity_max value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x0007': attribute_id: '0x0007' attribute_name: temperature_unit value_type: - '0x21' - uint16_t - Analog access: READ|WRITE|REPORT access_acl: 7 manf_id: 4742 '0x2003': attribute_id: '0x2003' attribute_name: temperature_offset value_type: - '0x29' - int16s - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x2004': attribute_id: '0x2004' attribute_name: humidity_offset value_type: - '0x29' - int16s - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x2005': attribute_id: '0x2005' attribute_name: '8197' value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x2006': attribute_id: '0x2006' attribute_name: '8198' value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x2008': attribute_id: '0x2008' attribute_name: '8200' value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x2009': attribute_id: '0x2009' attribute_name: '8201' value_type: - '0x29' - int16s - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x200a': attribute_id: '0x200a' attribute_name: '8202' value_type: - '0x29' - int16s - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x200b': attribute_id: '0x200b' attribute_name: '8203' value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x200c': attribute_id: '0x200c' attribute_name: '8204' value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x200d': attribute_id: '0x200d' attribute_name: '8205' value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x200e': attribute_id: '0x200e' attribute_name: '8206' value_type: - '0x20' - uint8_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x200f': attribute_id: '0x200f' attribute_name: '8207' value_type: - '0x21' - uint16_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x2011': attribute_id: '0x2011' attribute_name: '8209' value_type: - '0x48' - Array - Discrete access: READ|WRITE access_acl: 3 manf_id: 4742 '0x2012': attribute_id: '0x2012' attribute_name: '8210' value_type: - '0x48' - Array - Discrete access: READ|WRITE access_acl: 3 manf_id: 4742 '0x2013': attribute_id: '0x2013' attribute_name: '8211' value_type: - '0x20' - uint8_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x2014': attribute_id: '0x2014' attribute_name: '8212' value_type: - '0x48' - Array - Discrete access: READ|WRITE access_acl: 3 manf_id: 4742 '0x600e': attribute_id: '0x600e' attribute_name: '24590' value_type: - '0x20' - uint8_t - Analog access: READ|WRITE access_acl: 3 manf_id: 4742 '0x601e': attribute_id: '0x601e' attribute_name: '24606' value_type: - '0x48' - Array - Discrete access: READ|WRITE|REPORT access_acl: 7 manf_id: 4742 '0xfffd': attribute_id: '0xfffd' attribute_name: '65533' value_type: - '0x21' - uint16_t - Analog access: READ access_acl: 1 manf_id: 4742 commands_received: {} commands_generated: {} '0xfc57': cluster_id: '0xfc57' title: WorksWithAllHubs name: works_with_all_hubs attributes: '0x0002': attribute_id: '0x0002' attribute_name: disable_ota_downgrades value_type: - '0x10' - Bool - Discrete access: READ access_acl: 1 manf_id: 4742 '0x0003': attribute_id: '0x0003' attribute_name: mgmt_leave_without_rejoin_enabled value_type: - '0x10' - Bool - Discrete access: READ access_acl: 1 manf_id: 4742 '0x0004': attribute_id: '0x0004' attribute_name: nwk_retry_count value_type: - '0x20' - uint8_t - Analog access: READ access_acl: 1 manf_id: 4742 '0x0005': attribute_id: '0x0005' attribute_name: mac_retry_count value_type: - '0x20' - uint8_t - Analog access: READ access_acl: 1 manf_id: 4742 '0x0006': attribute_id: '0x0006' attribute_name: router_checkin_enabled value_type: - '0x10' - Bool - Discrete access: READ access_acl: 1 manf_id: 4742 '0x0007': attribute_id: '0x0007' attribute_name: touchlink_interpan_enabled value_type: - '0x10' - Bool - Discrete access: READ access_acl: 1 manf_id: 4742 '0x0008': attribute_id: '0x0008' attribute_name: wwah_parent_classification_enabled value_type: - '0x10' - Bool - Discrete access: READ access_acl: 1 manf_i

pyrced avatar Sep 13 '26 10:09 pyrced

The scan itself turned up something bigger than a renamed attribute, though. Looking at cluster 0xfc11: 24590 (mode select) — still there, unchanged. Matches why writes kept succeeding. 24589 (old external temperature) and 24600 (old external humidity) — both gone, not in the list at all. A brand new attribute, 24606 (0x601e) — type "Array," and it's the only one in the whole cluster with read + write + report access.

I've been trying to get this working again but haven't figured it out yet.

pyrced avatar Sep 13 '26 10:09 pyrced

See https://github.com/Koenkk/zigbee-OTA/pull/1297

Image

Not had a chance to get things fully working but the above should point in the right direction at least.

Great-Chart avatar Sep 13 '26 21:09 Great-Chart

I more specific scan of attribute 24606 (0x601e)

zha_toolkit_version: v1.2.2 zigpy_version: 2.2.0 zigpy_rf_version: 1.0.1 ieee_org:

  • 255
  • 255
  • 6
  • 242
  • 19
  • 56
  • 193
  • 164 ieee: xx:... command: attr_read command_data: null start_time: '2026-09-14T01:50:13.305704+00:00' errors: [] params: cluster_id: 64529 attr_id: 24606 dir: 0 manf: 4742 tries: 1 expect_reply: true args: [] kwargs: {} read_before_write: true read_after_write: true write_is_equal: false result_read:
  • '24606':
    • 1
    • 1
    • 0
    • 3
    • 1
    • 0
  • [] success: true

pyrced avatar Sep 14 '26 01:09 pyrced

Hi, thanks for reporting this.

In the new firmware, the remote temperature and humidity settings have been changed. The previous remote temperature/humidity settings are no longer used.

Instead, please use the new Remote source status and Source 1/2 temperature / humidity settings:

Set Remote source status to using. Configure the corresponding Source 1 or Source 2 temperature / humidity values.

After this, the remote temperature and humidity functionality should work normally.

Sorry for the confusion caused by the changes in the new firmware.

Image

CubeZ2mDeveloper avatar Sep 14 '26 02:09 CubeZ2mDeveloper

Hi, thanks for reporting this.

In the new firmware, the remote temperature and humidity settings have been changed. The previous remote temperature/humidity settings are no longer used.

Instead, please use the new Remote source status and Source 1/2 temperature / humidity settings:

Set Remote source status to using. Configure the corresponding Source 1 or Source 2 temperature / humidity values.

Thanks, this is helpful. However, I'm on ZHA rather than Zigbee2MQTT, working directly with the manufacturer cluster (0xFC11) via zha_toolkit. Could you share the raw attribute ID(s) and value encoding behind remote_source_status and source_1/2_temperature/humidity? I've found attribute 24606 (0x601E, array type) but writes to it, including echoing back the current value unchanged, get rejected with INVALID_VALUE (status 135), both as uint8 and enum8 elements.

pyrced avatar Sep 14 '26 03:09 pyrced

Hi, thanks for reporting this. In the new firmware, the remote temperature and humidity settings have been changed. The previous remote temperature/humidity settings are no longer used. Instead, please use the new Remote source status and Source 1/2 temperature / humidity settings: Set Remote source status to using. Configure the corresponding Source 1 or Source 2 temperature / humidity values.

Thanks, this is helpful. However, I'm on ZHA rather than Zigbee2MQTT, working directly with the manufacturer cluster (0xFC11) via zha_toolkit. Could you share the raw attribute ID(s) and value encoding behind remote_source_status and source_1/2_temperature/humidity? I've found attribute 24606 (0x601E, array type) but writes to it, including echoing back the current value unchanged, get rejected with INVALID_VALUE (status 135), both as uint8 and enum8 elements.

Thanks for the additional information.

We maintain the Zigbee2MQTT integration, and the relevant implementation can be found in the Zigbee2MQTT converters. However, we cannot provide or document the underlying manufacturer-specific protocol details directly.

For the raw attribute IDs, value encoding, and usage of the 0xFC11 manufacturer-specific cluster with ZHA, we recommend contacting SONOFF support at [email protected], as they can provide the appropriate protocol information and guidance.

Thanks for your understanding.

CubeZ2mDeveloper avatar Sep 14 '26 06:09 CubeZ2mDeveloper

@CubeZ2mDeveloper Like many (I suspect) I had previously followed the Example Automation detailed within Z2M section for this device. https://www.zigbee2mqtt.io/devices/SNZB-02DR2.html

I can see that if I edit the "external_temperature" portion to read "source_1_temperature" then the previously used external temperature values will be displayed. However, the same doesn't seem to apply if I edit "external_humidity" to read "source_1_humidity" - as in this value does not get published.

Your earlier statement Image

Could you elaborate on this statement; in context to the changes required to (say) this Example Automation - I still have the topic line set as previously plus the payload set as:- payload: |- { "temperature_sensor_select": "external",``

Image

For example I'm not sure if there are other edits needed to such an automation or if the new configuration method is intended to be via other means entirely; that I'm not recognising here (through lack of familiarity with templates).

It currently appears that the first value in the automation listing gets published (ie I can move source_1 to the top or source_2 and it'll publish that one) but the remainder get ignored indicating perhaps that other changes to the automation need to be applied here also.

Thus, any suggested changes to the example template that would be applicable for firmware 1.0.5 onwards would be helpful for those, such as myself, less familiar with templates.

Great-Chart avatar Sep 14 '26 06:09 Great-Chart

@Great-Chart i have the same issue but it will work if you publish the values in two different payloads:

alias: Bad Raumthermostat Externe Sensor Werte
description: ''
triggers:
  - trigger: state
    entity_id:
      - sensor.luftfeuchtigkeit_aussen
      - sensor.temperatur_aussen
conditions:
  - condition: template
    value_template: >-
      {{ states('sensor.temperatur_aussen') not in ['unknown', 'unavailable',
      'none']
         and states('sensor.luftfeuchtigkeit_aussen') not in ['unknown', 'unavailable', 'none'] }}
actions:
  - action: mqtt.publish
    data:
      topic: zigbee2mqtt/Bad Raumthermostat/set
      payload: |-
        {
          "source_1_temperature": {{ states('sensor.temperatur_aussen') | float | round(1) }}
        }
  - action: mqtt.publish
    data:
      topic: zigbee2mqtt/Bad Raumthermostat/set
      payload: |-
        {
          "source_1_humidity": {{ states('sensor.luftfeuchtigkeit_aussen') | float | round(0) }}
        }
mode: single

Mar1usW3 avatar Sep 14 '26 07:09 Mar1usW3

@Mar1usW3
Thanks - I can confirm that this approach will work for temperature and humidity for both of the external sensors if required; albeit requiring repetitive actions and additional network traffic (rather than combining multiple payloads).

Uncertain if this is the intended approach or there is a more elegant solution. But for anyone trying to revert to comparable functionality pre the OTA this is likely adequate.

Great-Chart avatar Sep 14 '26 09:09 Great-Chart

Hi @Great-Chart , @Mar1usW3 ,

Sorry for the confusion.

With firmware 1.0.5 and later, the remote temperature and humidity configuration has changed, so the previous Home Assistant automation example in the Zigbee2MQTT documentation is no longer fully applicable.

Please follow the official SONOFF guide and import the provided Home Assistant blueprint for the new configuration:

https://help.sonoff.tech/docs/SNZB02DR2#Home_Assistant

We will also update the Zigbee2MQTT documentation and the example automation for firmware 1.0.5 and later as soon as possible.

Thank you for pointing this out and for providing the detailed example.

CubeZ2mDeveloper avatar Sep 14 '26 09:09 CubeZ2mDeveloper

Please follow the official SONOFF guide and import the provided Home Assistant blueprint for the new configuration:

https://help.sonoff.tech/docs/SNZB02DR2#Home_Assistant

Wow awesome. This is exactly what I was looking for to get this working with ZHA. I guess I don't need to migrate to z2m just yet. Can confirm with the custom quirks and blueprint, I have this working with ZHA.

pyrced avatar Sep 14 '26 11:09 pyrced

Solved it for me as well, thanks! I linked two issues that mention similar problems.

It may be worth noting that you lose the min/max feature for temp and hum on the sensor's display if you enable this "external sensor" feature. At least I did. Also, the reportable_change should be decreased from the default 100 (centidegrees) to 10 or you still won't get updates as temperature changes below 1 full degree.

tbart avatar Sep 14 '26 17:09 tbart

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 Nov 17 '26 00:11 github-actions[bot]