SWV-ZF2 ends manual irrigation early but state_1 remains ON
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.7k
- Forks
- 2k
- Avg merge
- 18h 55m
- Merged PRs (30d)
- 35
Description
What happened?
A SONOFF SWV-ZF2 was configured for a 21-minute manual irrigation.
The device accepted and reported:
manual_irrigation_duration: 21manual_irrigation_mode: durationmanual_fail_safe: 30
The irrigation started correctly and water consumption increased to 20 L during
approximately the first 5–6 minutes.
The device then reported the irrigation schedule as finished, but state_1
remained ON. Water consumption stopped increasing while the reported valve
state stayed ON.
An external Home Assistant safety automation finally sent OFF after 32 minutes.
What did you expect to happen?
The valve should irrigate for the configured 21 minutes and then:
- physically stop the irrigation;
- publish
state_1: OFF; - report a coherent actual end time and duration.
The 30-minute local fail-safe should also ensure the state returns to OFF.
How to reproduce it (minimal and precise)
- Set manual_irrigation_mode to duration.
- Set manual_irrigation_duration to 21.
- Confirm that the device reports the value back as 21.
- Turn channel 1 ON.
- Observe irrigation_schedule_status_1, real_time_irrigation_duration_1,
real_time_irrigation_volume and state_1. - The schedule may be reported as ended prematurely while state_1 remains ON.
Zigbee2MQTT version
2.12.1
Adapter firmware version
8.0.2 [GA]
Adapter
EmberZNet
Setup
Zigbee2MQTT 2.12.1 running as a Docker container on an x86-64 home server.
Host OS: Debian GNU/Linux 12 (bookworm)
Linux 6.12.43+deb12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.43-1~bpo12+1 (2025-09-06) x86_64 GNU/Linux
/etc/issue.net contains a custom access-warning banner, so it has been omitted.
Device database.db entry
{"id":26,"type":"EndDevice","ieeeAddr":"0xREDACTED","nwkAddr":0,"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,"20486":1,"20487":1,"20500":0,"20504": [0,0,0,0],"20507":0,"20508":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],"20511": [1,0,1,0,49,230,223,231,49,230,226,63,49,230,223,241,1,0,0,0,1],"20512":[7,5,1,5]}},"genBasic":{"attributes":{"modelId":"SWV-ZF2","manufacturerName":"SONOFF","powerSource":3,"zclVersion":8,"appVersion":16,"hwVersion":0,"dateCode":"20260428","swBuildId":"1.0.7"}},"genPowerCfg":{"attributes": {"batteryPercentageRemaining":74,"batteryVoltage":25}},"genOnOff":{"attributes":{"onOff":0}},"genPollCtrl":{"attributes":{"checkinInterval":14400}},"customClusterEwelink":{"attributes": {"20495":20,"20504": [0,0,0,0],"20506":5,"valveAbnormalState":0,"childLock":0,"realTimeIrrigationDuration":0,"realTimeIrrigationVolume":0,"hourIrrigationDuration":0,"hourIrrigationVolume":0,"irrigationScheduleStatus":[1,0,1,0,49,251,241,218,49,251,246,198,49,251,243,33,1,0,0,0,20],"manualDefaultSettings":[0,0,21,0,21,0,10,1,0,0,0,30],"rainDelayEndDatetime":0,"valveAlarmSettings": [11,1,3,0],"seasonalWateringAdjustment":[10,10,10,10,10,10,10,10,10,10,10,10]}}},"binds":[{"cluster":32,"type":"endpoint","deviceIeeeAddress":"0xREDACTED_COORDINATOR","endpointID":1}, {"cluster":1,"type":"endpoint","deviceIeeeAddress":"0xREDACTED_COORDINATOR","endpointID":1}, {"cluster":6,"type":"endpoint","deviceIeeeAddress":"0xREDACTED_COORDINATOR","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": {"64529":{"attributes":{"20486":0,"20508":0}},"genBasic":{"attributes":{"hwVersion":0}},"genOnOff":{"attributes":{"onOff":0}},"customClusterEwelink":{"attributes": {"20506":0,"realTimeIrrigationDuration":0,"hourIrrigationDuration":0}}},"binds": [{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0xREDACTED_COORDINATOR","endpointID":1}],"configuredReportings":[],"meta": {}}},"appVersion":16,"hwVersion":0,"dateCode":"20260428","swBuildId":"1.0.7","zclVersion":8,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta": {"configured":"0.0.0"},"lastSeen":1785349945158,"checkinInterval":3600}
Debug log
The original incident was recorded with the default info log level, so a full
debug log is not currently available. I can reproduce it with debug logging if
required, but reproduction operates a physical irrigation valve.
Relevant Zigbee2MQTT output from the incident is included below.
TimeoutOverflowWarning: 5184001000 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
Notes
Timeline:
- 23:03:54: irrigation started.
- 23:03:55:
state_1changed toON. - 23:05:02: 6 L.
- 23:06:01: 9 L.
- 23:07:02: 12 L.
- 23:08:03: 15 L.
- 23:09:03: 19 L.
- 23:10:04: 20 L.
- No further water consumption was reported.
- 23:35:55: an external safety automation sent
OFF.
A later device payload simultaneously contained:
{
"state_1": "ON",
"manual_irrigation_duration": 21,
"manual_irrigation_mode": "duration",
"manual_fail_safe": 30,
"real_time_irrigation_duration_1": 5,
"real_time_irrigation_volume": 20,
"irrigation_schedule_status_1": {
"schedule_status": "end",
"schedule_type": "manual",
"irrigation_mode": "duration",
"start_time": "2026-07-28T23:03:54+02:00",
"expected_end_time": "2026-07-28T23:24:54+02:00",
"actual_end_time": "2026-07-28T23:09:21+02:00",
"actual_irrigation_amount": 20
}
}
This is internally inconsistent: the schedule is marked as ended after about
5 minutes, while state_1 remains ON.
Zigbee2MQTT also repeatedly logged:
TimeoutOverflowWarning: 5184001000 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing with debug logging and inspect the SWV-ZF2 irrigation schedule, state, and timeout handling around the reported TimeoutOverflowWarning. Done means a 21-minute manual run ends coherently with physical irrigation stopped, state_1 OFF, and consistent duration and end-time values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100