Skip to content

enhancement: add support for sprinkler zones that are currently running #147

@FeatherKing

Description

@FeatherKing

the current implementation doesnt have any idea if the sprinkler zones actually started or not. The Wyze API is goofy and doesnt allow you to query the status of a particular zone. However, i looked at some of the payloads i captured a while ago. I think I could craft a sensor that at least says "some schedule is running"

the wyze app calls this endpoint
https://wyze-lockwood-service.wyzecam.com/plugin/irrigation/schedule_runs?device_id=BS_WK1_7abcdefgh&limit=2

and the payload looks like

{
    "code": 1,
    "current": 1,
    "data": {
        "schedules": [
            {
                "complete_time": "2025-05-04T10:40:21",
                "current_running_zone": null,
                "cycle_soak": null,
                "device_id": "BS_WK1_7C78B20625B2",
                "duration": 12,
                "duration_str": "00:00:12",
                "end_date": null,
                "end_local": "2025-05-04T10:40:21",
                "end_ts": 1746376821,
                "end_utc": "2025-05-04T16:40:21Z",
                "run_days": null,
                "run_times": null,
                "running_index": null,
                "schedule_id": "App Quick Run",
                "schedule_name": "App Quick Run",
                "schedule_state": "past",
                "schedule_type": "MANUAL",
                "skipped": false,
                "skipped_reason": [],
                "start_date": null,
                "start_local": "2025-05-04T10:40:09",
                "start_ts": 1746376809,
                "start_utc": "2025-05-04T16:40:09Z",
                "update": "2025-05-04T16:40:21Z",
                "update_ts": 1746376821,
                "zone_count": 1,
                "zone_info": null,
                "zone_runs": [
                    {
                        "start_ts": 1746376809,
                        "zone_number": 3,
                        "zone_id": "dc5bf2e7905a4f32b499e35f569bfc74",
                        "start_local": "2025-05-04T10:40:09",
                        "end_ts": 1746376821,
                        "end_local": "2025-05-04T10:40:21",
                        "end_utc": "2025-05-04T16:40:21Z",
                        "zone_name": "Backyard S",
                        "type": "IRRIGATE",
                        "start_utc": "2025-05-04T16:40:09Z"
                    }
                ]
            }
        ]
    },
    "hash": "1",
    "instance_id": "169035949a...ac57123b91",
    "isShowToast": 0,
    "message": "Success",
    "toastMsg": null,
    "total": 1,
    "version": 1
}

after looking at a few of these, there is this field
"schedule_state": "past",
that flips to
"schedule_state": "running",

i think a first implementation could be "some zone is running", but with a little more effort you could possibly show exactly which zone is running.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions