dgreif / ring

Unofficial packages for Ring Doorbells, Cameras, Alarm System, and Smart Lighting
MIT License
1.21k stars 163 forks source link

Add support for water valves #1450

Closed vandreykiv closed 1 month ago

vandreykiv commented 2 months ago

Description

Ring support z-wave based valves to be added. Currently they are not supported by plugin and are hidden.

Notfication for closing

{
    "data": {
        "gcmData": "{\"aps\":{\"alert\":\"Water Shut-Off Valve 39619 in Garage closed by USERNAME\"},\"action\":\"com.ring.push.HANDLE_VALVE_CLOSED_BY_USER\",\"alarm_meta\":{\"location_id\":\"uuid\"}}"
    },
    "from": "876313859327",
    "priority": "normal",
    "fcmMessageId": "56706ccc-3bfa-46ee-90b6-a0b410aa257e"
}

Push for opening valve:

{
    "data": {
        "gcmData": "{\"aps\":{\"alert\":\"Water Shut-Off Valve 39619 in Garage opened by USERNAME\"},\"action\":\"com.ring.push.HANDLE_VALVE_OPENED_BY_USER\",\"alarm_meta\":{\"location_id\":\"UUID\"}}"
    },
    "from": "876313859327",
    "priority": "normal",
    "fcmMessageId": "e5caca44-f29d-420c-9324-55a287580c41"
}

Proposed solution

No response

Alternatives

open

{
                    "adapterType": "zwave",
                    "batteryStatus": "none",
                    "categoryId": 37,
                    "commStatus": "ok",
                    "commandTypes": {
                        "communication-poll": {
                            "requiresTrust": false
                        },
                        "reconfigure.start": {
                            "requiresTrust": false
                        },
                        "update-node-neighbors.start": {
                            "requiresTrust": false
                        },
                        "valve.close": {
                            "requiresTrust": false
                        },
                        "valve.open": {
                            "requiresTrust": false
                        }
                    },
                    "deviceFoundTime": 1721184191799,
                    "deviceType": "valve.water",
                    "lastCommTime": 1721185479932,
                    "lastUpdate": 1721185479962,
                    "linkQuality": "ok",
                    "managerId": "zwave",
                    "manufacturerName": "Zooz",
                    "name": "Water Shut-Off Valve 39619",
                    "placement": "unassigned",
                    "pollInterval": 21600,
                    "roomId": 7,
                    "setupByPluginStatus": "complete",
                    "setupByUserStatus": "complete",
                    "subCategoryId": 0,
                    "tags": [],
                    "tamperStatus": "ok",
                    "zid": "4c522c8b-c9c4-uuid",
                    "valveState": "open"
                }

closed

{
                    "adapterType": "zwave",
                    "batteryStatus": "none",
                    "categoryId": 37,
                    "commStatus": "ok",
                    "commandTypes": {
                        "communication-poll": {
                            "requiresTrust": false
                        },
                        "reconfigure.start": {
                            "requiresTrust": false
                        },
                        "update-node-neighbors.start": {
                            "requiresTrust": false
                        },
                        "valve.close": {
                            "requiresTrust": false
                        },
                        "valve.open": {
                            "requiresTrust": false
                        }
                    },
                    "deviceFoundTime": 1721184191799,
                    "deviceType": "valve.water",
                    "lastCommTime": 1721188310163,
                    "lastUpdate": 1721188310192,
                    "linkQuality": "ok",
                    "managerId": "zwave",
                    "manufacturerName": "Zooz",
                    "name": "Water Shut-Off Valve 39619",
                    "placement": "unassigned",
                    "pollInterval": 21600,
                    "roomId": 7,
                    "setupByPluginStatus": "complete",
                    "setupByUserStatus": "complete",
                    "subCategoryId": 0,
                    "tags": [],
                    "tamperStatus": "ok",
                    "zid": "4c522c8b-c9c4-uuid",
                    "valveState": "closed"
                }

Device data

No response

tsightler commented 2 months ago

Thanks for the PR. I've had the data for this for a while, but there were just too many other things that had to be addressed to keep things in this project working at all. I'll let @dgreif review it when he has time, but it looked good to me at first glance.

vandreykiv commented 2 months ago

image

614990C7-CF5E-4BE5-ADEF-25FDC4A3A8CC_4_5005_c

@tsightler @dgreif I can make it as Service.Valve rather than switch to look like a fauces but one thing that I can't overcome is Characteristic.RemainingDuration can't be set to null or something and display as Waiting...

vandreykiv commented 2 months ago

image

614990C7-CF5E-4BE5-ADEF-25FDC4A3A8CC_4_5005_c

@tsightler @dgreif I can make it as Service.Valve rather than switch to look like a fauces but one thing that I can't overcome is Characteristic.RemainingDuration can't be set to null or something and display as Waiting...

Seems it can't be used in automations so it make no sense to make it anything other that basic switch unfortunately

tsightler commented 2 months ago

I feel like it really needs to be a generic valve. I'm not sure why you wouldn't be able to use it in an automation, I know it's possible to use other HomeKit water valves in automations. Looking at the images above, it seems like it was registered as an irrigation or faucet type based on the duration properties. At some point I can try to look at this, but it could be a while, just not a lot of time right now.

OK, I withdraw this objection, looked at 2-3 other valves paired via other bridges, and they are all switches in Homekit (or even outlets/lights).