naofireblade / homebridge-neato

A Neato vacuum robot plugin for homebridge.
MIT License
69 stars 18 forks source link

Support for zone cleaning #28

Closed az0uz closed 5 years ago

az0uz commented 5 years ago

Added zone cleaning support.

Each zone cleaning switch is added as a separate accessory to be able to set a different room for each of them (enabling voice control via Siri to clean a specific room)

This PR needs to wait for node-botvac to be updated to include the persistant map implementation

but is fully working if you manually homebridge-neato to use the above branch of node-botvac

fixes https://github.com/naofireblade/homebridge-neato/issues/20

az0uz commented 5 years ago

I need to fix the generation of multiple accessory. The uuid I generate is not permanent, it is reset each time homebridge is restarted. I was generating the uuid myself as it was using the same for all 'zone' accessories which was creating conflicts.

naofireblade commented 5 years ago

Awesome work! I will merge this when node-botvac is updated and you are ready with this PR. According to your last comment, this is still WIP?

az0uz commented 5 years ago

yes I'll try to fix the accessories uuid reset in the coming days !

az0uz commented 5 years ago

it's done, we just need to wait for node-botvac to merge the PR and publish the new version

ifeign commented 5 years ago

it's done, we just need to wait for node-botvac to merge the PR and publish the new version

looks like they're waiting on you to fix the readme before merging.

ifeign commented 5 years ago

Node-botvac just merged the necessary PR! Zone cleaning should now be able to be merged into this plugin!!

naofireblade commented 5 years ago

I looked into this, but I cannot test it for lack of a D7. The PR adds a new robot for each room?

naofireblade commented 5 years ago

I know that you can enter Strings in Homekit (with the Eve app). I used that in another plugin: https://github.com/naofireblade/homebridge-logic

I'm not sure if you can select from an Enum. That would be cool to select the room to clean.

ifeign commented 5 years ago

I've got a D7 and I could test this, what's the best way - should I wait for you to publish this update or should I create a fork? (I'm not terribly familiar with compiling code etc)

az0uz commented 5 years ago

@naofireblade I had to create one accessory per room, as per an HomeKit limitation, you can't have a multi room accessory (for now at least). So to be able to put each 'Clean' Switch in different HomeKit room, the only way was to create multiple accessories. At startup, it will create Switches names Clean the <room> or Clean <room> if the room name has > two words and contains 's. The logic is to name your room like:

az0uz commented 5 years ago

@ifeign you should be able to test it by doing (if using npm):

npm install -g az0uz/homebridge-neato.git#8ef24c9d4034d2eb8c49e2267285db7f16b6289b

and when you are done / the PR is merged, you can reinstall the official upstream by doing :

npm uninstall -g homebridge-neato
npm install -g homebridge-neato
ifeign commented 5 years ago

Thanks @az0uz, I just gave it a try and it works! No issues on my part.

naofireblade commented 5 years ago

Hey @az0uz thank you very much for the PR and your explanation. I merged and released it. @ifeign thank you for testing and commenting on this PR as well.