zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Sonoff Hydro Duo SWV-ZF2: cannot change values

Open silfax opened this issue 4 months ago β€’ 13 comments

What happened?

Device paired successfully. None of the 'editable' values in manual default settings can be changed. I mean you can move sliders and input values, but when sending them to the device Z2M frontend and logs show this error:

[8/4/2026, 8:48:17 AM] z2m: Publish 'get' 'manual_default_settings' to 'Electrovalva irigatii' failed: 'RangeError [ERR_OUT_OF_RANGE]: ZCL command 0xa4c138bbf3bf745d/1 customClusterEwelink.read(["manualDefaultSettings"], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (The value of "offset" is out of range. It must be >= 0 and <= 21. Received 22)'

Using MQTT explorer with zigbee2mqtt/FRIENDLY_NAME/get with payload {"manual_default_settings": ""} returns no result.

If it is of any help, zigbee2mqtt/FRIENDLY_NAME/get with payload {"battery": ""} seems to return the full status of the device:

{ "180_days_records": null, "24_hours_records": null, "30_days_records": null, "battery": 100, "child_lock": "LOCK", "hour_irrigation_duration_1": 0, "hour_irrigation_duration_2": 0, "hour_irrigation_volume": 0, "irrigation_plan_removed_report_1": null, "irrigation_plan_removed_report_2": null, "irrigation_plan_report_1": null, "irrigation_plan_report_2": null, "irrigation_plan_settings_1": null, "irrigation_plan_settings_2": null, "irrigation_schedule_status_1": { "actual_end_time": "2026-08-03T21:04:28+03:00", "actual_irrigation_amount": 63, "expected_end_time": "2026-08-03T21:04:27+03:00", "expected_irrigation_amount": 0, "irrigation_amount_unit": "liter", "irrigation_mode": "duration", "schedule_index": 0, "schedule_status": "end", "schedule_type": "manual", "start_time": "2026-08-03T20:54:28+03:00" }, "irrigation_schedule_status_2": { "actual_end_time": "2026-08-03T21:47:53+03:00", "actual_irrigation_amount": 68, "expected_end_time": "2026-08-03T21:47:52+03:00", "expected_irrigation_amount": 0, "irrigation_amount_unit": "liter", "irrigation_mode": "duration", "schedule_index": 0, "schedule_status": "end", "schedule_type": "manual", "start_time": "2026-08-03T21:37:53+03:00" }, "linkquality": 76, "manual_default_settings": null, "rain_delay": null, "rain_delay_end_datetime": null, "read_swvzf_records": null, "real_time_irrigation_duration_1": 0, "real_time_irrigation_duration_2": 0, "real_time_irrigation_volume": 0, "seasonal_watering_adjustment": null, "state_1": "OFF", "state_2": "OFF", "update": { "installed_version": 4104, "latest_release_notes": null, "latest_source": null, "latest_version": 4104, "state": "idle" }, "valve_abnormal_state": "normal", "valve_alarm_settings": null }

One can see that manual_default_settings is empty.

What did you expect to happen?

To be able to change the values. For example, default fail_safe is 10mins, which means any automation that needs to keep the valve open for more than 10min will fail.

How to reproduce it (minimal and precise)

Nothing special. It was the default behavior after pairing.

Zigbee2MQTT version

2.13.0

Adapter firmware version

20230507

Adapter

Sonoff Dongle-E

Setup

HA add-on

Device database.db entry

{"id":18,"type":"EndDevice","ieeeAddr":"0xa4c138bbf3bf745d","nwkAddr":25327,"manufId":4742,"manufName":"SONOFF","powerSource":"Battery","modelId":"SWV-ZF2","epList":[1,2],"endpoints":{"1":{"profId":260,"epId":1,"devId":2,"inClusterList":[0,1,3,6,32,64599,64529],"outClusterList":[3,25],"clusters":{"64529":{"attributes":{"0":0,"20500":0,"20504":[0,0,0,0],"20509":[0,0,10,0,0,0,0,1,0,0,0,0],"20510":[10,10,10,10,10,10,10,10,10,10,10,10],"20512":[7,5,1,5]}},"genBasic":{"attributes":{"modelId":"SWV-ZF2","manufacturerName":"SONOFF","powerSource":3,"zclVersion":8,"hwVersion":0,"dateCode":"20260622","swBuildId":"1.0.8"}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":200,"batteryVoltage":31}},"genOnOff":{"attributes":{"onOff":0}},"genPollCtrl":{"attributes":{"checkinInterval":14400}},"customClusterEwelink":{"attributes":{"20495":353,"20506":23,"valveAbnormalState":0,"childLock":0,"realTimeIrrigationDuration":0,"realTimeIrrigationVolume":0,"hourIrrigationDuration":0,"hourIrrigationVolume":0,"irrigationScheduleStatus":[1,0,1,0,50,3,188,132,50,3,190,219,50,3,190,220,1,0,0,0,63]}}},"binds":[{"cluster":32,"type":"endpoint","deviceIeeeAddress":"0x00124b002390d3be","endpointID":1},{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b002390d3be","endpointID":1},{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b002390d3be","endpointID":1}],"configuredReportings":[{"cluster":1,"attrId":33,"minRepIntval":3600,"maxRepIntval":65000,"repChange":10}],"meta":{}},"2":{"profId":260,"epId":2,"devId":2,"inClusterList":[0,6],"outClusterList":[],"clusters":{"genOnOff":{"attributes":{"onOff":0}},"genBasic":{"attributes":{"appVersion":16}},"customClusterEwelink":{"attributes":{"20506":35,"realTimeIrrigationDuration":0,"hourIrrigationDuration":0,"irrigationScheduleStatus":[1,0,1,0,50,3,198,177,50,3,201,8,50,3,201,9,1,0,0,0,68]}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b002390d3be","endpointID":1}],"configuredReportings":[],"meta":{}}},"appVersion":16,"hwVersion":0,"dateCode":"20260622","swBuildId":"1.0.8","zclVersion":8,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{"configured":"0.0.0"},"lastSeen":1785826347384,"checkinInterval":3600}

Debug log

No response

Notes

Device firmware id is 1.0.8 (20260622), with firmware version 4104.

silfax avatar Aug 04 '26 06:08 silfax

Workaround. Managed to change manual settings using MQTT Explorer with the full payload:

{ "manual_default_settings": { "irrigation_mode": "duration", "irrigation_amount_unit": "liter", "fail_safe": 30, "irrigation_duration": 30, "irrigation_amount": 0 } }

Following this, it looks that manual settings can be altered via the Z2M frontend.

silfax avatar Aug 04 '26 07:08 silfax

Hi, I'm seeing what looks like a related/underlying issue on the same model (SWV-ZF2, dual-channel). While my main symptom is different (device becomes completely unresponsive to all commands for extended periods, rather than a specific write failure), I suspect it may share the same root cause given the shared custom cluster implementation and similar firmware timeline. Sharing my findings in case it's useful.

Environment: Zigbee2MQTT 2.13.0, zigbee-herdsman 10.8.0, zigbee-herdsman-converters 26.90.0, Debian/Docker deployment. Device firmware went from 1.0.7 β†’ 1.0.9 via OTA during testing.

Troubleshooting steps attempted:

Initial observation: genOnOff bind/reporting configuration failed with timeout errors even during initial pairing β€” present from day one. Power cycling: Removed and reinserted batteries multiple times. Device worked normally for a short period (~5 minutes to a few hours) after each reset before becoming unresponsive again. Re-pairing: Deleted and re-paired the device multiple times. Same pattern repeated each time. Physical button testing: Confirmed the valve motor/water flow works correctly via physical button press even during periods when Zigbee communication is completely dead β€” ruling out a mechanical fault. LED responds to button presses during dead periods, but the Zigbee radio stays silent. Factory reset attempt: Tried the 10-second button long-press for factory reset during a dead period β€” no response (LED did not enter fast-flash state), suggesting the main controller couldn't even process a local reset trigger at that moment. OTA update attempts: Repeatedly triggered manual OTA checks; most failed with "Device didn't respond to OTA request". One eventually succeeded, updating firmware 1.0.7 β†’ 1.0.9. This temporarily resolved the issue for ~8 hours before the same unresponsive pattern returned. Long-term automated monitoring: Set up a script subscribing to the device's MQTT state topic to continuously log last_seen over ~4 days, to precisely characterize the unresponsive windows. Statistical findings: A recurring ~15.0–15.1 minute unresponsive window appears very consistently (~200 occurrences in one 4-day sample), suggesting an internal timer/cycle. Longer dead periods also occur unpredictably on top of this β€” up to 8.29 hours in one instance β€” accounting for ~37% of total time unresponsive. Comparison with a second unit: A single-channel SWV-ZFU on the same coordinator, same Zigbee2MQTT instance, same network remained stable throughout, with <0.3% downtime over the same period β€” ruling out network/environmental/coordinator-side causes. "Keepalive" mitigation attempt: Set up a script sending a child_lock toggle every 10 minutes, hypothesizing this might prevent deep sleep. Result: during unresponsive windows, keepalive commands consistently failed with Request superseded (each new command canceling the still-pending previous one before the device ever woke to process it) β€” confirming the device wasn't waking up at all during these windows, not just failing to process one command type. genOnOff.on commands sent independently during the same windows also timed out (timed out after 10000ms), confirming all command types fail uniformly during dead periods. Device attribute inspection: genPollCtrl.checkinInterval reports as 14400 (quarter-seconds = 3600s = 1 hour) β€” longer than the observed baseline "dead window" and much shorter than the longest observed outages.

Given the severity and duration of these outages (up to 8+ hours unresponsive), happy to open a separate, more focused issue if that would be more useful for tracking β€” let me know. Can also provide full Zigbee2MQTT logs on request.

lekuejj avatar Aug 11 '26 18:08 lekuejj

Hi @silfax , thanks for the detailed report, and sorry for the inconvenience.

We were able to reproduce the get failure when the device is first initialized and added to Zigbee2MQTT. However, after configuring and applying the Manual Default Settings in Zigbee2MQTT, subsequent get requests for manual_default_settings returned normally.

As a temporary workaround, could you please try configuring and applying the Manual Default Settings in Zigbee2MQTT first, and then perform the get operation again? This should allow the value to be returned correctly.

Regarding the get failure immediately after device initialization, our internal team is currently investigating the cause. We will continue looking into this behavior.

Thank you again for your feedback and for helping us investigate this issue.

CubeZ2mDeveloper avatar Aug 14 '26 06:08 CubeZ2mDeveloper

Hi, I'm seeing what looks like a related/underlying issue on the same model (SWV-ZF2, dual-channel). While my main symptom is different (device becomes completely unresponsive to all commands for extended periods, rather than a specific write failure), I suspect it may share the same root cause given the shared custom cluster implementation and similar firmware timeline. Sharing my findings in case it's useful.

Environment: Zigbee2MQTT 2.13.0, zigbee-herdsman 10.8.0, zigbee-herdsman-converters 26.90.0, Debian/Docker deployment. Device firmware went from 1.0.7 β†’ 1.0.9 via OTA during testing.

Troubleshooting steps attempted:

Initial observation: genOnOff bind/reporting configuration failed with timeout errors even during initial pairing β€” present from day one. Power cycling: Removed and reinserted batteries multiple times. Device worked normally for a short period (~5 minutes to a few hours) after each reset before becoming unresponsive again. Re-pairing: Deleted and re-paired the device multiple times. Same pattern repeated each time. Physical button testing: Confirmed the valve motor/water flow works correctly via physical button press even during periods when Zigbee communication is completely dead β€” ruling out a mechanical fault. LED responds to button presses during dead periods, but the Zigbee radio stays silent. Factory reset attempt: Tried the 10-second button long-press for factory reset during a dead period β€” no response (LED did not enter fast-flash state), suggesting the main controller couldn't even process a local reset trigger at that moment. OTA update attempts: Repeatedly triggered manual OTA checks; most failed with "Device didn't respond to OTA request". One eventually succeeded, updating firmware 1.0.7 β†’ 1.0.9. This temporarily resolved the issue for ~8 hours before the same unresponsive pattern returned. Long-term automated monitoring: Set up a script subscribing to the device's MQTT state topic to continuously log last_seen over ~4 days, to precisely characterize the unresponsive windows. Statistical findings: A recurring ~15.0–15.1 minute unresponsive window appears very consistently (~200 occurrences in one 4-day sample), suggesting an internal timer/cycle. Longer dead periods also occur unpredictably on top of this β€” up to 8.29 hours in one instance β€” accounting for ~37% of total time unresponsive. Comparison with a second unit: A single-channel SWV-ZFU on the same coordinator, same Zigbee2MQTT instance, same network remained stable throughout, with <0.3% downtime over the same period β€” ruling out network/environmental/coordinator-side causes. "Keepalive" mitigation attempt: Set up a script sending a child_lock toggle every 10 minutes, hypothesizing this might prevent deep sleep. Result: during unresponsive windows, keepalive commands consistently failed with Request superseded (each new command canceling the still-pending previous one before the device ever woke to process it) β€” confirming the device wasn't waking up at all during these windows, not just failing to process one command type. genOnOff.on commands sent independently during the same windows also timed out (timed out after 10000ms), confirming all command types fail uniformly during dead periods. Device attribute inspection: genPollCtrl.checkinInterval reports as 14400 (quarter-seconds = 3600s = 1 hour) β€” longer than the observed baseline "dead window" and much shorter than the longest observed outages.

Given the severity and duration of these outages (up to 8+ hours unresponsive), happy to open a separate, more focused issue if that would be more useful for tracking β€” let me know. Can also provide full Zigbee2MQTT logs on request.

Hi, thank you for sharing such detailed findings and for taking the time to investigate this so thoroughly. The long-term monitoring data and the comparison with the single-channel model are especially helpful.

Since the symptoms and behavior you described are significantly different from the manual_default_settings issue discussed here, we think it would be better to track this separately.

Could you please open a new issue specifically for the unresponsive behavior? This will allow us to investigate and track the two issues independently. Please include the details and logs you have already collected, especially the recurring ~15-minute unresponsive windows and the longer outages.

Once the new issue is created, we will take a closer look at it.

Thanks again for your detailed investigation and for bringing this to our attention.

CubeZ2mDeveloper avatar Aug 14 '26 06:08 CubeZ2mDeveloper

Hi, I'm seeing what looks like a related/underlying issue on the same model (SWV-ZF2, dual-channel). While my main symptom is different (device becomes completely unresponsive to all commands for extended periods, rather than a specific write failure), I suspect it may share the same root cause given the shared custom cluster implementation and similar firmware timeline. Sharing my findings in case it's useful. Environment: Zigbee2MQTT 2.13.0, zigbee-herdsman 10.8.0, zigbee-herdsman-converters 26.90.0, Debian/Docker deployment. Device firmware went from 1.0.7 β†’ 1.0.9 via OTA during testing. Troubleshooting steps attempted: Initial observation: genOnOff bind/reporting configuration failed with timeout errors even during initial pairing β€” present from day one. Power cycling: Removed and reinserted batteries multiple times. Device worked normally for a short period (~5 minutes to a few hours) after each reset before becoming unresponsive again. Re-pairing: Deleted and re-paired the device multiple times. Same pattern repeated each time. Physical button testing: Confirmed the valve motor/water flow works correctly via physical button press even during periods when Zigbee communication is completely dead β€” ruling out a mechanical fault. LED responds to button presses during dead periods, but the Zigbee radio stays silent. Factory reset attempt: Tried the 10-second button long-press for factory reset during a dead period β€” no response (LED did not enter fast-flash state), suggesting the main controller couldn't even process a local reset trigger at that moment. OTA update attempts: Repeatedly triggered manual OTA checks; most failed with "Device didn't respond to OTA request". One eventually succeeded, updating firmware 1.0.7 β†’ 1.0.9. This temporarily resolved the issue for ~8 hours before the same unresponsive pattern returned. Long-term automated monitoring: Set up a script subscribing to the device's MQTT state topic to continuously log last_seen over ~4 days, to precisely characterize the unresponsive windows. Statistical findings: A recurring ~15.0–15.1 minute unresponsive window appears very consistently (~200 occurrences in one 4-day sample), suggesting an internal timer/cycle. Longer dead periods also occur unpredictably on top of this β€” up to 8.29 hours in one instance β€” accounting for ~37% of total time unresponsive. Comparison with a second unit: A single-channel SWV-ZFU on the same coordinator, same Zigbee2MQTT instance, same network remained stable throughout, with <0.3% downtime over the same period β€” ruling out network/environmental/coordinator-side causes. "Keepalive" mitigation attempt: Set up a script sending a child_lock toggle every 10 minutes, hypothesizing this might prevent deep sleep. Result: during unresponsive windows, keepalive commands consistently failed with Request superseded (each new command canceling the still-pending previous one before the device ever woke to process it) β€” confirming the device wasn't waking up at all during these windows, not just failing to process one command type. genOnOff.on commands sent independently during the same windows also timed out (timed out after 10000ms), confirming all command types fail uniformly during dead periods. Device attribute inspection: genPollCtrl.checkinInterval reports as 14400 (quarter-seconds = 3600s = 1 hour) β€” longer than the observed baseline "dead window" and much shorter than the longest observed outages. Given the severity and duration of these outages (up to 8+ hours unresponsive), happy to open a separate, more focused issue if that would be more useful for tracking β€” let me know. Can also provide full Zigbee2MQTT logs on request.

Hi, thank you for sharing such detailed findings and for taking the time to investigate this so thoroughly. The long-term monitoring data and the comparison with the single-channel model are especially helpful.

Since the symptoms and behavior you described are significantly different from the manual_default_settings issue discussed here, we think it would be better to track this separately.

Could you please open a new issue specifically for the unresponsive behavior? This will allow us to investigate and track the two issues independently. Please include the details and logs you have already collected, especially the recurring ~15-minute unresponsive windows and the longer outages.

Once the new issue is created, we will take a closer look at it.

Thanks again for your detailed investigation and for bringing this to our attention.

Thanks, see this: https://github.com/Koenkk/zigbee2mqtt/issues/32849

lekuejj avatar Aug 14 '26 20:08 lekuejj

Hi @silfax , thanks for the detailed report, and sorry for the inconvenience.

We were able to reproduce the get failure when the device is first initialized and added to Zigbee2MQTT. However, after configuring and applying the Manual Default Settings in Zigbee2MQTT, subsequent get requests for manual_default_settings returned normally.

As a temporary workaround, could you please try configuring and applying the Manual Default Settings in Zigbee2MQTT first, and then perform the get operation again? This should allow the value to be returned correctly.

Regarding the get failure immediately after device initialization, our internal team is currently investigating the cause. We will continue looking into this behavior.

Thank you again for your feedback and for helping us investigate this issue.

Thank you for taking the time to look into this issue. The only workaround I was able to find was to send the full payload for β€˜Manual Default Settings’ via MQTT Explorer. After that, I was able to change the values from inside Z2M as expected. Before sending the full payload, any changes done inside Z2M were not saved. Please let me know if you want me tot try anything else. However, I don’t know if this would help, since now I have it working as expected. Thanks again.

silfax avatar Aug 14 '26 20:08 silfax

Hi @silfax, thank you for the detailed information and for helping us investigate this issue.

We have attempted to reproduce the reported behavior, but so far we have not been able to reproduce the situation where manual_default_settings cannot be configured after the device has been added to Zigbee2MQTT.

If possible, could you please try the following steps once more?

  1. Put the device back into pairing mode and add it to Zigbee2MQTT again.
  2. Once the device has been successfully added, try to configure manual_default_settings from the Zigbee2MQTT frontend.
  3. If the configuration fails as described, please provide the Zigbee2MQTT logs covering the entire process, from when the device starts being added/pairs successfully until the manual_default_settings configuration fails.

Having the complete logs from this process would be very helpful for us to understand what is happening and further investigate the issue.

Thank you again for your cooperation and for providing the additional information.

CubeZ2mDeveloper avatar Aug 17 '26 10:08 CubeZ2mDeveloper

Another SWV-ZF2 data point that I think isolates this to the frontend, not the device or the Zigbee link.

Short version: when I edit manual_default_settings in the Exposes tab, Z2M receives a /set message containing the previous value, not the one I typed. Publishing the same composite manually with the new value works immediately, on the same device, seconds apart.

Environment

Zigbee2MQTT 2.13.0 (commit fcbb7ff)
Device SONOFF SWV-ZF2 (Hydro Duo, dual channel)
Firmware 1.0.9 (installed_version 4105)
Adapter zstack
Frontend URL http://<host>:8085/#/device/0/0x<ieee>/exposes

What happens

irrigation_duration was 19. I set the field to 20 in the Exposes form and applied it, four times. Each time Z2M received 19:

[2026-08-25 23:17:37] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/0x<ieee>/set' with data
'{"manual_default_settings":{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,
"irrigation_amount_unit":"liter","irrigation_duration":19,"irrigation_mode":"duration"}}'
[2026-08-25 23:17:37] debug: z2m: Publishing 'set' 'manual_default_settings' to 'Sonoff kraan'

Identical payloads at 23:18:14, 23:18:37 and 23:19:48. No error is logged, the command is processed, and the resulting state publish simply still reports irrigation_duration: 19. So from the device's point of view nothing went wrong β€” it was asked to set the value it already had.

One minute later, publishing the composite myself (Home Assistant β†’ Developer Tools β†’ Actions β†’ mqtt.publish):

[2026-08-25 23:20:53] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Sonoff kraan/set' with data
'{"manual_default_settings":{"irrigation_mode":"duration","irrigation_amount_unit":"liter",
"irrigation_duration":20,"irrigation_amount":0,"fail_safe":0}}'
[2026-08-25 23:20:54] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Sonoff kraan', payload
'{... "manual_default_settings":{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,
"irrigation_amount_unit":"liter","irrigation_duration":20,"irrigation_mode":"duration"} ...}'

Applied on the first attempt. The device and the firmware are clearly able to accept the write.

Why I think the frontend is echoing state rather than sending the form

The payloads the frontend sends include irrigation_amount_real_liter. That property is never read by convertSet for manual_default_settings β€” it is only ever produced in the fromZigbee direction (and derived again from the cached settings elsewhere). It is not part of the writable feature list of the composite.

Its presence in an outgoing /set therefore suggests the frontend is submitting the cached state object for this composite instead of the edited form values, which would also explain why the value that arrives is always the current one.

Possible reason it did not reproduce for you

Both this report and the original one are dual-channel (Hydro Duo) devices. If the composite form is bound to state per device rather than per endpoint, a two-endpoint device could pick up the wrong or stale object while a single-channel device would appear to work. That would fit the fact that you could not reproduce it.

Workaround, for anyone landing here

Publish the whole composite yourself β€” every field is required and all values must be integers:

{"manual_default_settings":{"irrigation_mode":"duration","irrigation_amount_unit":"liter",
"irrigation_duration":20,"irrigation_amount":0,"fail_safe":0}}

to zigbee2mqtt/<friendly_name>/set. In Home Assistant this is Developer Tools β†’ Actions β†’ mqtt.publish; MQTT Explorer or mosquitto_pub work equally well.

Happy to run any test on this device if it helps β€” I can reproduce the frontend behaviour on demand.

DJSparkXz avatar Aug 25 '26 22:08 DJSparkXz

Another SWV-ZF2 data point that I think isolates this to the frontend, not the device or the Zigbee link.

Short version: when I edit manual_default_settings in the Exposes tab, Z2M receives a /set message containing the previous value, not the one I typed. Publishing the same composite manually with the new value works immediately, on the same device, seconds apart.

Environment

Zigbee2MQTT 2.13.0 (commit fcbb7ff) Device SONOFF SWV-ZF2 (Hydro Duo, dual channel) Firmware 1.0.9 (installed_version 4105) Adapter zstack Frontend URL http://<host>:8085/#/device/0/0x<ieee>/exposes

What happens

irrigation_duration was 19. I set the field to 20 in the Exposes form and applied it, four times. Each time Z2M received 19:

[2026-08-25 23:17:37] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/0x<ieee>/set' with data
'{"manual_default_settings":{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,
"irrigation_amount_unit":"liter","irrigation_duration":19,"irrigation_mode":"duration"}}'
[2026-08-25 23:17:37] debug: z2m: Publishing 'set' 'manual_default_settings' to 'Sonoff kraan'

Identical payloads at 23:18:14, 23:18:37 and 23:19:48. No error is logged, the command is processed, and the resulting state publish simply still reports irrigation_duration: 19. So from the device's point of view nothing went wrong β€” it was asked to set the value it already had.

One minute later, publishing the composite myself (Home Assistant β†’ Developer Tools β†’ Actions β†’ mqtt.publish):

[2026-08-25 23:20:53] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Sonoff kraan/set' with data
'{"manual_default_settings":{"irrigation_mode":"duration","irrigation_amount_unit":"liter",
"irrigation_duration":20,"irrigation_amount":0,"fail_safe":0}}'
[2026-08-25 23:20:54] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Sonoff kraan', payload
'{... "manual_default_settings":{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,
"irrigation_amount_unit":"liter","irrigation_duration":20,"irrigation_mode":"duration"} ...}'

Applied on the first attempt. The device and the firmware are clearly able to accept the write.

Why I think the frontend is echoing state rather than sending the form

The payloads the frontend sends include irrigation_amount_real_liter. That property is never read by convertSet for manual_default_settings β€” it is only ever produced in the fromZigbee direction (and derived again from the cached settings elsewhere). It is not part of the writable feature list of the composite.

Its presence in an outgoing /set therefore suggests the frontend is submitting the cached state object for this composite instead of the edited form values, which would also explain why the value that arrives is always the current one.

Possible reason it did not reproduce for you

Both this report and the original one are dual-channel (Hydro Duo) devices. If the composite form is bound to state per device rather than per endpoint, a two-endpoint device could pick up the wrong or stale object while a single-channel device would appear to work. That would fit the fact that you could not reproduce it.

Workaround, for anyone landing here

Publish the whole composite yourself β€” every field is required and all values must be integers:

{"manual_default_settings":{"irrigation_mode":"duration","irrigation_amount_unit":"liter", "irrigation_duration":20,"irrigation_amount":0,"fail_safe":0}} to zigbee2mqtt/<friendly_name>/set. In Home Assistant this is Developer Tools β†’ Actions β†’ mqtt.publish; MQTT Explorer or mosquitto_pub work equally well.

Happy to run any test on this device if it helps β€” I can reproduce the frontend behaviour on demand.

Thanks for the detailed report. We did some additional testing locally with the SWV-ZF2 and found a slightly different behavior that may explain what you are seeing.

In our test, changing irrigation_duration from 19 to 20 resulted in the following sequence.

First, Zigbee2MQTT received the correct new value:

[2026-08-26 11:39:24] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/0xa4c138f1a7e59bf5/set' with data '{"manual_default_settings":{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,"irrigation_duration":20,"irrigation_mode":"duration"}}'

The converter then generated the corresponding Zigbee write with the new value:

[2026-08-26 11:39:24] debug: zh:controller:endpoint: ZCL command 0xa4c138f1a7e59bf5/1 customClusterEwelink.write({"20509":{"value":{"elementType":32,"elements":{"0":0,"1":0,"2":20,"3":0,"4":20,"5":0,"6":10,"7":1,"8":0,"9":0,"10":0,"11":0}},"type":72}}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false})

The device then returned a successful write response:

[2026-08-26 11:39:26] debug: zh:controller: Received payload: clusterID=64529, address=8836, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=255, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":10,"commandIdentifier":4},"payload":[{"status":0}],"command":{"name":"writeRsp","ID":4}}

Interestingly, immediately afterwards, Zigbee2MQTT published the state twice. The first state still contained the previous value:

"manual_default_settings":{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,"irrigation_duration":19,"irrigation_mode":"duration"}

and shortly afterwards another state update contained the new value:

"manual_default_settings":{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,"irrigation_duration":20,"irrigation_mode":"duration"}

So in this test, the first write to 20 was actually sent correctly and the device acknowledged it successfully. The intermediate 19 state appears because the first incoming Zigbee message does not contain the updated manual_default_settings data, so the previously cached value is temporarily retained in the published state. The subsequent state update contains the actual new value.

This could potentially explain the behavior you observed when clicking Apply multiple times in quick succession. For example:

Apply 20
  ↓
/set = 20
  ↓
device accepts the write
  ↓
Z2M temporarily publishes 19
  ↓
frontend renders 19 again
  ↓
another Apply
  ↓
/set = 19

In that situation, the first write may have succeeded, while a subsequent click could write the old value back again.

Regarding irrigation_amount_real_liter: this field is intentional. It is an internal value used by manual_default_settings to preserve the precise irrigation amount in liters. Since irrigation_amount is rounded according to the selected water_flow_unit, this value acts as the precise reference when switching between liters, US gallons, and Imperial gallons. This avoids accumulating rounding errors when changing units. Therefore, its presence in the outgoing composite payload does not indicate that the frontend is incorrectly submitting a cached state object.

Regarding the endpoint theory, we checked this on our side as well. manual_default_settings is a device-level setting rather than a per-channel setting. It is intentionally written to a single endpoint, and the resulting setting applies to both channels. There are therefore no separate manual_default_settings values being maintained or written for the two endpoints.

Could you please try changing the value once, click Apply only once, and then wait for the state to settle before trying again?

If the issue still occurs, please provide the complete debug log from the moment you change the value in the Exposes tab through all subsequent state updates. In particular, we would like to see the /set message, the corresponding Zigbee write, the device response, and all state publishes afterwards. This will help us determine whether the correct value is being sent but is not being applied by the device, or whether the frontend is actually sending the previous value.

CubeZ2mDeveloper avatar Aug 26 '26 04:08 CubeZ2mDeveloper

Thanks β€” running your test led somewhere concrete. This is browser-specific: it reproduces in Firefox, but not in Chromium or Safari, and only when the value is changed with the number input's stepper arrows rather than typed.

That is almost certainly why you could not reproduce it.

The two cases, same device, same session

Typing the value works. 20 β†’ 15, typed, one Apply:

[2026-08-26 11:07:49] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/0x<ieee>/set' with data
'{"manual_default_settings":{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,
"irrigation_amount_unit":"liter","irrigation_duration":15,"irrigation_mode":"duration"}}'

[2026-08-26 11:07:49] debug: zh:controller:endpoint: ZCL command 0x<ieee>/1 customClusterEwelink.write(
{"20509":{"value":{"elementType":32,"elements":{"0":0,"1":0,"2":15,"3":0,"4":15,"5":0,"6":10,"7":1,
"8":0,"9":0,"10":0,"11":0}},"type":72}}, {...})

[2026-08-26 11:07:50] debug: zh:controller: Received payload: clusterID=64529, endpoint=1,
destinationEndpoint=1, linkQuality=116, frame={... "commandIdentifier":4},
"payload":[{"status":0}],"command":{"name":"writeRsp","ID":4}}

[2026-08-26 11:07:50] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Sonoff kraan', payload
'{... "manual_default_settings":{... "irrigation_duration":15 ...} ...}'

Applied on the first click. Note there was no intermediate state publish carrying the old value here β€” the double publish you described did not occur at all in this run.

Using the stepper arrows does not. 15 β†’ 16 with one click on the up arrow, then one Apply:

[2026-08-26 11:11:55] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/0x<ieee>/set' with data
'{"manual_default_settings":{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,
"irrigation_amount_unit":"liter","irrigation_duration":15,"irrigation_mode":"duration"}}'

[2026-08-26 11:11:55] debug: zh:controller:endpoint: ZCL command 0x<ieee>/1 customClusterEwelink.write(
{"20509":{"value":{"elementType":32,"elements":{"0":0,"1":0,"2":15,"3":0,"4":15,...}},"type":72}}, {...})

[2026-08-26 11:11:55] debug: zh:controller: Received payload: clusterID=64529, endpoint=1,
"payload":[{"status":0}],"command":{"name":"writeRsp","ID":4}}

[2026-08-26 11:11:55] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Sonoff kraan', payload
'{... "manual_default_settings":{... "irrigation_duration":15 ...} ...}'

The field showed 16, the payload carries 15 β€” the value from before the edit. The device correctly acknowledges a write of 15 over 15, so nothing is wrong on the device side. Repeated at 11:18:28 with the same result, including a variant where I clicked another field first to blur the input before pressing Apply. Blurring makes no difference.

The frontend builds the wrong payload

From the browser console in Firefox, after changing 15 β†’ 16 with the arrows and clicking Apply once:

Calling API (0 | 0): {"topic":"0x<ieee>/set","payload":{"manual_default_settings":
{"fail_safe":0,"irrigation_amount":0,"irrigation_amount_real_liter":0,"irrigation_amount_unit":"liter",
"irrigation_duration":15,"irrigation_mode":"duration"}}}

So the stale value is already present when the frontend constructs the message. Nothing is lost in transit.

Chromium and Safari send the correct value

I repeated exactly the same interaction in headless Chromium 151 against the same Zigbee2MQTT instance, intercepting WebSocket.send so the message was captured but never transmitted:

{"topic":"0x<ieee>/set","payload":{"manual_default_settings":{"fail_safe":0,"irrigation_amount":0,
"irrigation_amount_real_liter":0,"irrigation_amount_unit":"liter","irrigation_duration":16,
"irrigation_mode":"duration"}}}

16 β€” correct. Same page, same bundle, same device, one click on the same stepper arrow.

Safari was then tested by hand on the same page, same 15 β†’ 16 stepper click, one Apply:

[2026-08-26 11:31:18] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/0x<ieee>/set' with data
'{"manual_default_settings":{... "irrigation_duration":16 ...}}'
[2026-08-26 11:31:18] debug: zh:controller:endpoint: ZCL command 0x<ieee>/1 ... "2":16 ...
[2026-08-26 11:31:19] ... "payload":[{"status":0}]

Also correct.

Summary of every attempt today on this device, all single Apply clicks:

Time Browser Input method Sent
11:07:49 Firefox typed 20 β†’ 15 15 β€” correct
11:11:55 Firefox stepper 15 β†’ 16 15 β€” wrong
11:18:28 Firefox stepper, then blurred 15 β€” wrong
11:25:05 Firefox stepper 15 β€” wrong
11:25:58 Firefox stepper 15 β€” wrong
β€” Chromium stepper 15 β†’ 16 16 β€” correct (intercepted)
11:31:18 Safari stepper 15 β†’ 16 16 β€” correct

In Chromium I also verified the DOM side: the stepper click fires input and change with the new value, and the React props on the input update from value: 15 to value: 16. So there the component sees the edit. The Firefox payload above shows it does not.

Ruling things out

  • Not a stale cached frontend. The browser and the server are both on index-B_eahVWI.js.
  • Not the double state publish. In the failing runs only one state publish occurred, and in yesterday's original report the four Apply clicks were 23, 23 and 71 seconds apart β€” far outside that window. The very first of those already carried the old value, with no preceding Apply that could have written the new one.
  • Not the device. Every write is acknowledged with status: 0.

On irrigation_amount_real_liter

Thanks for explaining that. Your reasoning is convincing and I withdraw that part of my earlier report β€” its presence in the outgoing payload is intentional and not evidence of a cached state object being submitted.

Suggested repro

Open the Exposes tab in Firefox, change any numeric feature of a composite using the up/down arrows of the number input (not by typing), click Apply once, and compare the Calling API line in the console with what the field shows. Chromium and Safari will not reproduce it.

Environment

Zigbee2MQTT 2.13.0 (commit fcbb7ff), frontend index-B_eahVWI.js, SONOFF SWV-ZF2 firmware 1.0.9 (installed_version 4105), zstack coordinator (Z-Stack 3.x.0, revision 20240710). Failing browser: Firefox on macOS. Working browsers: Safari on macOS, Chromium 151 headless.

Happy to run anything else on this device.

DJSparkXz avatar Aug 26 '26 11:08 DJSparkXz

Thank you for the detailed investigation and for narrowing this down.

I was also able to reproduce the same behavior in Firefox. When the value is changed using the up/down arrows of the number input, clicking Apply sends the previous value instead of the newly selected value. When the value is entered by typing, it works as expected.

Based on our testing, this appears to be a frontend component compatibility/state synchronization issue specific to Firefox, rather than an issue with the device, Zigbee communication, or the converter. The fact that the incorrect value is already present in the payload constructed by the frontend further supports this.

As this appears to be related to the frontend component, we would suggest opening an issue in the frontend repository for further investigation:

https://github.com/Nerivec/zigbee2mqtt-windfront

Thank you again for the thorough testing and for helping us narrow down the cause of this issue.

CubeZ2mDeveloper avatar Aug 26 '26 12:08 CubeZ2mDeveloper

Can confirm this on a different but related Sonoff model (SWV-ZFE, "Rasensprenger" branded as Hydro ONE), firmware 1.1.0 / installed_version 4352, Z2M 2.13.0-1. Same exact error when reading manual_default_settings:

Publish 'get' 'manual_default_settings' to 'Rasensprenger_04' failed: 'RangeError [ERR_OUT_OF_RANGE]: ZCL command 0xa4c13815705affff/1 customClusterEwelink.read(["manualDefaultSettings"], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (The value of "offset" is out of range. It must be >= 0 and <= 21. Received 22)'

All four of my devices started failing simultaneously right after they picked up an OTA firmware update (4103β†’4352) on the same day. Individually /get-ing the flattened keys (manual_irrigation_mode, manual_irrigation_amount, manual_fail_safe) also doesn't work β€” Z2M reports "No converter available" for those. /set on manual_default_settings also doesn't appear to take effect (verified via irrigation_schedule_status.expected_irrigation_amount staying at the old value after a fresh /set + valve run), so this isn't just a read-side issue β€” it may be affecting writes too. This is blocking any automation that needs to reliably set/verify capacity-mode irrigation amounts. Given issue #32450 shows the same offset-based crash for seasonal_watering_adjustment on a related model, this looks like a shared bug in how the eWeLink custom-cluster converter parses/reads these list-type attributes across the SWV-ZF* family.

SvenK510 avatar Aug 28 '26 19:08 SvenK510

I can reproduce the same manualDefaultSettings read failure on a SONOFF SWV-ZNE.

Environment:

  • Zigbee2MQTT 2.14.2
  • SONOFF SWV-ZNE
  • Firmware 4352
  • Home Assistant add-on
  • Device factory-reset and freshly re-paired
  • Interview completed successfully
  • Healthy Zigbee communication (regular reports, good LQI, battery 100%)

Reproduction:

Reading manualDefaultSettings on customClusterEwelink fails with:

RangeError [ERR_OUT_OF_RANGE]: ZCL command ... customClusterEwelink.read(["manualDefaultSettings"], ...) failed (The value of "offset" is out of range. It must be >= 0 and <= 21. Received 22)

The issue persists after a full factory reset, removal/rejoin and fresh interview.

The device itself continues to communicate normally, so this does not look like a general Zigbee connectivity problem.

This also appears related to #32450, where the Hydro firmware's ARRAY encoding causes the ZCL decoder to run past the end of a 22-byte response. That issue specifically notes that manualDefaultSettings can be affected by the same parsing problem.

Impact in my setup: I deliberately verify the valve's device-side manual watering settings before allowing a manual irrigation cycle. Since this read cannot be decoded, the automation correctly refuses to open the valve.

Additional observation: Before the factory reset, reads of other private scheduling attributes were also unreliable. After re-pairing, the device clearly responds, but manualDefaultSettings still fails specifically during decoding, which makes a firmware/protocol parsing incompatibility more likely than a pairing issue.

I can provide additional debug/raw payload logs if useful.

gamnot avatar Oct 12 '26 09:10 gamnot