Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for Valetudo zones and "go to locations" #11

Open
aebgit opened this issue Aug 24, 2020 · 1 comment
Open

support for Valetudo zones and "go to locations" #11

aebgit opened this issue Aug 24, 2020 · 1 comment

Comments

@aebgit
Copy link

aebgit commented Aug 24, 2020

I want to ask if you would consider support for cleaning of zones and "go to locations" defined in Valetudo.
Valetudo provides a great UI to define Zones and "Goto Locations". Having them available in Homekit would allow to ask Siri to "clean the living room" for example.
I have realized this for now with a workaround via the plugin "homebridge-http" that makes just a put request to the API. Please see my config-examples below:

With this switch I can ask Siri to clean the living-room (Zone-ID "-2"). I retrieved the IDs via developer mode of a WebBrowser from /api/zones:

{
            "accessory": "HTTP-SWITCH",
            "name": "Putze das Wohnzimmer",
            "switchType": "stateless",
            "timeout": 5000,
            "onUrl": {
                "url": "http://192.168.10.245/api/start_cleaning_zones_by_id",
                "method": "PUT",
                "body": "[-2]",
                "headers": {
                    "Content-Type": "application/json"
                }
            }
},

With this switch I can ask the vacuum to got to a dedicated coordinate. I use this in a scene to drive the vacuum triggered by a schedule to the trash bin. I retrieved the coordinates via developer mode of a WebBrowser from /api/spots:

{
            "accessory": "HTTP-SWITCH",
            "name": "Gehe zum Mülleimer",
            "switchType": "stateless",
            "timeout": 5000,
            "onUrl": {
                "url": "http://192.168.10.245/api/go_to",
                "method": "PUT",
                "body": {
                    "x": 2402,
                    "y": 2288
                },
                "headers": {
                    "Content-Type": "application/json"
                }
            }
},
@onfoot
Copy link
Owner

onfoot commented Aug 24, 2020

Yeah, I have been thinking about it, but since I haven't had the opportunity to start working on it, because I use my vacuum on two floors, so all zones pretty much invalidate themselves once the vacuum has to find its way all over again. I should probably look into saving/restoring/switching maps so I could actually use this. ;)

I'd need to enumerate the zones set up currently, and expose buttons for them. If it's possible to do it dynamically so that after zones are added or edited we don't need to restart the plugin/homebridge, then we're golden. I'll check out the api and finally start implementing this. Shouldn't be too hard probably. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants