Ligio / hacc-ozmo

Home Assistant Custom Component for Ecovacs Deebot Ozmo 900
MIT License
64 stars 29 forks source link

Start/Stop/Pause doesn't work on DEEBOT 930 #6

Open guice opened 4 years ago

guice commented 4 years ago

Deebot 930, start/stop/pause isn't doing anything.

I've noticed "turn_on" activates its cleaning, and "turn_off" finishes it. "return_to_base" does work as well.

Could there be something difference in the 930 command set? Is there somewhere I can see or understand the API calls used? I'd like to create some REST calls so I can see how things work.

guice commented 4 years ago

FYI, for the DEEBOT 930, this is what I've discovered:

start/stop/pause isn't doing anything. And I can't figure out the "resume" after you pause it.

Battery and status seem to update appropriately. I have not tested clean_spot as I'm not sure of a good way to discovery areas. Any API info on that? I'm on iOS, no packet sniffers there.

tekalignbeza commented 4 years ago

Hi @guice did you make any progress on the above issue ? i just install this custom integration and I have same issue.

guice commented 4 years ago

No progress. That's just how it is at this point, it would seem.

ghost commented 4 years ago

my deeboot ozmo 900 has the same problem.

scottyphillips commented 4 years ago

Start wasn't working because I believe that 'service.start' is expecting to call 'async_start' which is currently missing from this implementation. I picked up on this because the HomeKit 'on' function was not working against the Vacuum switch, which itself is linked to 'service.start' rather then 'service.on'

@Ligio maybe take a look at implementing something similar to this in vacuum.py (working for me):

    def turn_on(self, **kwaags):
        """Turn the vacuum on and start cleaning."""
        from ozmo import Clean, SpotArea

        self.clean_mode = 'auto'
        self.device.run(Clean(mode=self.clean_mode, speed=self.fan_speed, action='start'))
        return true

    def start(self, **kwargs):
        self.turn_on()

    async def async_start(self, **kwargs):
        await self.turn_on()

I had to dummy return a True value for 'turn_on' as asyncio was complaining about NoneType being returned from self.turn_on

Probably if 'async_stop' was implemented it would fix that issue too.