stianaske / pybotvac

Python module for interacting with Neato Botvac Connected vacuum robots.
MIT License
85 stars 44 forks source link

Neato D7 spot cleaning return basic-4, this is not defined in robot.py #39

Closed vandalon closed 4 years ago

vandalon commented 5 years ago

Hi,

When I change line 137 to: elif self.service_version == 'basic-3' or self.service_version == 'basic-4':

All works fine, otherwise spot cleaning does not work on my D7.

dshokouhi commented 5 years ago

Can you show the output for the robots state? I have a D7 and spot cleaning does not have basic-4 service version. What firmware are you on? Here is my state output and you can see spot cleaning is basic-3. When I check official neato docs I also do not see basic-4 listed for spot cleaning. Curious to see whats changed. You can also copy line 84 to line 137, I can update my PR to fix this when you respond back with the state response.

{'version': 1, 'reqId': '1', 'result': 'ok', 'data': {}, 'error': None, 'alert': None, 'state': 1, 'action': 0, 'cleaning': {'category': 4, 'mode': 2, 'modifier': 1, 'navigationMode': 1, 'mapId': '', 'spotWidth': 0, 'spotHeight': 0}, 'details': {'isCharging': False, 'isDocked': True, 'isScheduleEnabled': False, 'dockHasBeenSeen': False, 'charge': 97}, 'availableCommands': {'start': True, 'stop': False, 'pause': False, 'resume': False, 'goToBase': False}, 'availableServices': {'findMe': 'basic-1', 'generalInfo': 'basic-1', 'houseCleaning': 'basic-4', 'IECTest': 'advanced-1', 'logCopy': 'basic-1', 'manualCleaning': 'basic-1', 'maps': 'basic-2', 'preferences': 'basic-1', 'schedule': 'basic-2', 'softwareUpdate': 'basic-1', 'spotCleaning': 'basic-3', 'wifi': 'basic-1'}, 'meta': {'modelName': 'BotVacD7Connected', 'firmware': '4.4.0-72'}}
vandalon commented 5 years ago

I'm sorry for my late reaction. The output indeed show's basic-3, but when printing the value within the vacuum.py it prints basic-4 and changing add the or self.service_version == 'basic-4': does fix the issue :)

Santobert commented 4 years ago

As far as I can see, spot_cleaning and house_cleaning does not have the same service_version. Basic-4 only applies to house_cleaning even though the syntax is nearly the same as for spot_cleaning. It looks like the spot_cleaning version is basic-3 for the D7. My PR #61 fixes this.