homebridge-xiaomi-roborock-vacuum icon indicating copy to clipboard operation
homebridge-xiaomi-roborock-vacuum copied to clipboard

Feature request: going to a position with button pressing

Open ursusHU opened this issue 3 years ago • 9 comments

Would it be possible to have such button in HK? My vacuum’s dock is hidden and every time I still need to open the Mihome app to navigate it to a point where I can get the dustbin out. A simple button would be enough, when on the vacuum goes to the predefined coordinates, when off goes back to the dock. Thanks in advance!

ursusHU avatar Jul 17 '20 17:07 ursusHU

Hi @ursusHU! It sounds like a great idea. I think it may be similar to #130?

afharo avatar Jul 17 '20 17:07 afharo

Hi @afharo, yes that’s the same request :) I wonder if this would be possible to use the zone cleaning feature somehow with defining a small area.

ursusHU avatar Jul 18 '20 09:07 ursusHU

Going to a position, it should be easy to implement. I just don't have enough spare time to put it together, sorry 🙂

afharo avatar Jul 20 '20 09:07 afharo

I know that having separate Dock and GoToPosition buttons would be better, but if anyone wants quick solution for goTOposition just edit file homebridge-xiaomi-roborock-vacuum/miio/lib/devices/vacuum.js

find function find() and change it like this:

/**
   * Activate the find function, will make the device give off a sound.
   */
  find() {
    return this.call("app_goto_target",[26000,26300]).then(() => null);
    //return this.call("find_me", [""]).then(() => null);
  }

There you will have on findMeButton going to position. But you need to have find option enabled in setup config

kajaba avatar Oct 07 '20 12:10 kajaba

Thank you @kajaba! It'd be great to use your suggestion to add a button based on the config

afharo avatar Oct 07 '20 12:10 afharo

I think its the matter of half an hour, but hey, I am not a developer of this The same is for Dock button

return this.call("app_charge", [""]).then(() => null);

kajaba avatar Oct 07 '20 12:10 kajaba

The same is for Dock button

return this.call("app_charge", [""]).then(() => null);

Turning the speed down to 0% already does that. It calls app_stop and app_charge

afharo avatar Oct 07 '20 12:10 afharo

https://github.com/maisun/homebridge-xiaomi-roborock-vacuum fork has go to target.

mouth4war avatar Dec 01 '20 16:12 mouth4war

I would also love this pin to go function. Are you guys gonna implement it in main plugin?

adamrzanek avatar Jan 05 '21 15:01 adamrzanek

I've been thinking about this for quite some time now. My vacuum is parked below a sideboard, thus can't be reached without moving it. I'd love to move it to a specific location once a week when I come home. The automation-part should be quite easy.

I know that having separate Dock and GoToPosition buttons would be better, but if anyone wants quick solution for goTOposition just edit file homebridge-xiaomi-roborock-vacuum/miio/lib/devices/vacuum.js

find function find() and change it like this:

/**
   * Activate the find function, will make the device give off a sound.
   */
  find() {
    return this.call("app_goto_target",[26000,26300]).then(() => null);
    //return this.call("find_me", [""]).then(() => null);
  }

There you will have on findMeButton going to position. But you need to have find option enabled in setup config

~~Quite a lot has changed in index.js, so I am not sure where to implement this. @afharo if you can perhaps give me a hint, I'll try to implement it and make a pull request.~~

Never mind. Found it and will now start working on it.

luc-ass avatar Aug 25 '22 16:08 luc-ass

It should be resolved by @luc-ass in version https://github.com/homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum/releases/tag/v0.23.0

afharo avatar Aug 27 '22 08:08 afharo