thoukydides / homebridge-aeg-robot

AEG RX9 / Electrolux Pure i9 robot vacuum plugin for Homebridge
https://www.thouky.co.uk
ISC License
5 stars 0 forks source link

Add option to return home instead of pause when switching off the cleaning button #52

Closed Tomcraft1980 closed 1 month ago

Tomcraft1980 commented 1 month ago

Description of Enhancement

You currently promote two buttons to HomeKit, one for "cleaning" (play/pause) and one for "return home" (home/pause). It would be useful to have a single button for this like: Turn on: play Turn off: home

HomeKit Mapping

No response

AEG/Electrolux Appliance(s)

AEG RX9-2-4ANM 900 277 479

thoukydides commented 1 month ago

Apple are supposed to be adding native robot vacuum cleaner support to HomeKit imminently, so I would prefer to wait for that and integrate it properly rather than making this sort of change now.

Even if appropriate characteristics/services weren't going to be added I would not be keen on this approach:

  1. It would not be good for indicating the clean being paused. If the switch is set to off then it would not be possible to initiate a return home. If the switch is set on then it would not be possible to resume the clean.
  2. My own use is more often to pause the clean (when the doorbell or phone rings) than to return home.
  3. I am generally not keep on implementing multiple alternate interfaces to the same functionality.

I might reconsider this after seeing what Apple end up defining, but for now I do not intend to implement this suggestion.

Tomcraft1980 commented 1 month ago

My usage is a little other from yours. I never use the pause function for the robots as I set up an automation that triggers all vacuums, when nobody is at home (last person left home) and sends them back to the dock, when the first person arrives back at home.

If someone wants to implement this like me, simply edit the following file via HB console using the following commad, although it might be a little frustrating to edit this file again after every plugin update:

nano node_modules/homebridge-aeg-robot/dist/accessory-robot.js

Search in addSwitchClean() {...}

            const command = value ? 'play' : 'pause';`

And replace with:

            //const command = value ? 'play' : 'pause';
            const command = value ? 'play' : 'home';