Issue with Neato botvac zones

Ok so this is what I see happening and its confirmed here.

It looks like the values are being overwritten by the last map thats added.

Can you replace line 246-253 with the following, its the entire try/catch block. I am trying to see if we can update the value to add to the variable instead of overwriting the assignment :slight_smile: I don’t think the zone cleaning call will work but it might lol. Lets look at the debug logs first and see if it returns the value that we expect and take it from there

                try:
                    robot_boundaries = self.robot.get_map_boundaries(
                        maps["id"]
                    ).json()
                    _LOGGER.debug("Boundaries for robot '%s' in map '%s': %s", self._name, maps["name"], robot_boundaries)
                    self._robot_boundaries.update(robot_boundaries)
                    _LOGGER.debug("List of boundaries for '%s': %s", self._name, self._robot_boundaries)
                except NeatoRobotException as ex:
                    _LOGGER.error("Could not fetch map boundaries: %s", ex)
                    self._robot_boundaries = {}

Edit: added another debug statement so we can see the boundaries that it gets and see if it gets added to variable instead of replacing it like it is now.

Thanks for your reply! Unfortunately i’m already in bed. I’ll will change the code tomorrow morning. I’ll let you know!

1 Like

Got the new data;

2020-07-08 08:30:36 DEBUG (SyncWorker_9) [custom_components.neato.vacuum] Running Neato Vacuums update
2020-07-08 08:30:37 DEBUG (SyncWorker_1) [custom_components.neato.sensor] self._state={'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': 99}, '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-2', 'schedule': 'basic-2', 'softwareUpdate': 'basic-1', 'spotCleaning': 'basic-3', 'wifi': 'basic-1'}, 'meta': {'modelName': 'BotVacD7Connected', 'firmware': '4.5.3-189'}}
2020-07-08 08:30:37 DEBUG (SyncWorker_4) [custom_components.neato.switch] self._state={'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': 99}, '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-2', 'schedule': 'basic-2', 'softwareUpdate': 'basic-1', 'spotCleaning': 'basic-3', 'wifi': 'basic-1'}, 'meta': {'modelName': 'BotVacD7Connected', 'firmware': '4.5.3-189'}}
2020-07-08 08:30:37 DEBUG (SyncWorker_4) [custom_components.neato.switch] State: {'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': 99}, '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-2', 'schedule': 'basic-2', 'softwareUpdate': 'basic-1', 'spotCleaning': 'basic-3', 'wifi': 'basic-1'}, 'meta': {'modelName': 'BotVacD7Connected', 'firmware': '4.5.3-189'}}
2020-07-08 08:30:37 DEBUG (SyncWorker_4) [custom_components.neato.switch] Schedule state: off
2020-07-08 08:30:37 DEBUG (SyncWorker_9) [custom_components.neato.vacuum] self._state={'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': 99}, '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-2', 'schedule': 'basic-2', 'softwareUpdate': 'basic-1', 'spotCleaning': 'basic-3', 'wifi': 'basic-1'}, 'meta': {'modelName': 'BotVacD7Connected', 'firmware': '4.5.3-189'}}
2020-07-08 08:30:37 DEBUG (SyncWorker_9) [custom_components.neato.vacuum] Found the following maps: [{'id': '2020-04-28T06:45:59Z', 'name': 'Eerste verdieping', 'url': 'URL', 'raw_floor_map_url': 'FLOOR URL', 'raw_floor_map_url': 'FLOORMAP_URL', 'url_valid_for_seconds': 300}]
2020-07-08 08:30:38 DEBUG (SyncWorker_9) [custom_components.neato.vacuum] Boundaries for robot 'Tippi wan' in map 'Eerste verdieping': {'version': 1, 'reqId': '1', 'result': 'ok', 'data': {'boundaries': [{'id': 'eb715818-f988-4b92-af8c-ee883050235b', 'type': 'polyline', 'vertices': [[0.2929, 0.3263], [0.271, 0.351]], 'name': '', 'color': '#000000', 'enabled': True}, {'id': '8e207c1b-8026-4ed2-8c45-9f8da3642274', 'type': 'polyline', 'vertices': [[0.5327, 0.3451], [0.5899, 0.3449]], 'name': '', 'color': '#000000', 'enabled': True}, {'id': 'cb069462-6749-448d-b702-fb9fe12ea4f4', 'type': 'polygon', 'vertices': [[0.5911, 0.2466], [0.8025, 0.2466], [0.8025, 0.4725], [0.5911, 0.4725]], 'name': 'Computerkamer', 'color': '#FFC974', 'enabled': True}, {'id': '45334152-0e4e-4dee-81e8-5bf7061af150', 'type': 'polygon', 'vertices': [[0.4896, 0.4392], [0.7655, 0.4392], [0.7655, 0.7093], [0.4896, 0.7093]], 'name': 'Babykamer', 'color': '#E06A83', 'enabled': True}, {'id': 'bb80c9d8-e89b-4e99-b5fc-f1ce10e37d8b', 'type': 'polygon', 'vertices': [[0.3944, 0.3509], [0.5928, 0.3509], [0.5928, 0.4395], [0.3944, 0.4395]], 'name': 'Overloop', 'color': '#7BB472', 'enabled': True}, {'id': 'd6f18115-ce08-4477-9f2d-30f4fe0e5c1c', 'type': 'polygon', 'vertices': [[0.1838, 0.4337], [0.49, 0.4337], [0.49, 0.7687], [0.1838, 0.7687]], 'name': 'Slaapkamer', 'color': '#5B7BA5', 'enabled': True}, {'id': '40f90c3c-fb93-405f-95a0-53294f940a61', 'type': 'polygon', 'vertices': [[0.1929, 0.2402], [0.3954, 0.2402], [0.3954, 0.4363], [0.1929, 0.4363]], 'name': 'Badkamer', 'color': '#E49770', 'enabled': True}]}}
2020-07-08 08:30:38 DEBUG (SyncWorker_9) [custom_components.neato.vacuum] List of boundaries for 'Tippi wan': {'version': 1, 'reqId': '1', 'result': 'ok', 'data': {'boundaries': [{'id': 'eb715818-f988-4b92-af8c-ee883050235b', 'type': 'polyline', 'vertices': [[0.2929, 0.3263], [0.271, 0.351]], 'name': '', 'color': '#000000', 'enabled': True}, {'id': '8e207c1b-8026-4ed2-8c45-9f8da3642274', 'type': 'polyline', 'vertices': [[0.5327, 0.3451], [0.5899, 0.3449]], 'name': '', 'color': '#000000', 'enabled': True}, {'id': 'cb069462-6749-448d-b702-fb9fe12ea4f4', 'type': 'polygon', 'vertices': [[0.5911, 0.2466], [0.8025, 0.2466], [0.8025, 0.4725], [0.5911, 0.4725]], 'name': 'Computerkamer', 'color': '#FFC974', 'enabled': True}, {'id': '45334152-0e4e-4dee-81e8-5bf7061af150', 'type': 'polygon', 'vertices': [[0.4896, 0.4392], [0.7655, 0.4392], [0.7655, 0.7093], [0.4896, 0.7093]], 'name': 'Babykamer', 'color': '#E06A83', 'enabled': True}, {'id': 'bb80c9d8-e89b-4e99-b5fc-f1ce10e37d8b', 'type': 'polygon', 'vertices': [[0.3944, 0.3509], [0.5928, 0.3509], [0.5928, 0.4395], [0.3944, 0.4395]], 'name': 'Overloop', 'color': '#7BB472', 'enabled': True}, {'id': 'd6f18115-ce08-4477-9f2d-30f4fe0e5c1c', 'type': 'polygon', 'vertices': [[0.1838, 0.4337], [0.49, 0.4337], [0.49, 0.7687], [0.1838, 0.7687]], 'name': 'Slaapkamer', 'color': '#5B7BA5', 'enabled': True}, {'id': '40f90c3c-fb93-405f-95a0-53294f940a61', 'type': 'polygon', 'vertices': [[0.1929, 0.2402], [0.3954, 0.2402], [0.3954, 0.4363], [0.1929, 0.4363]], 'name': 'Badkamer', 'color': '#E49770', 'enabled': True}]}}
2020-07-08 08:30:39 DEBUG (SyncWorker_9) [custom_components.neato.vacuum] Boundaries for robot 'Tippi wan' in map 'Benedenverdieping': {'version': 1, 'reqId': '1', 'result': 'ok', 'data': {'boundaries': [{'id': 'f04a63de-941b-4154-b3ab-5955eb561ad9', 'type': 'polygon', 'vertices': [[0.5161, 0.356], [0.6309, 0.356], [0.6309, 0.4896], [0.5161, 0.4896]], 'name': 'Yinthe', 'color': '#FFC974', 'enabled': True}, {'id': 'f5e22c37-b94b-4c9f-9114-aeeeced808a8', 'type': 'polygon', 'vertices': [[0.6296, 0.2065], [0.7883, 0.2065], [0.7883, 0.4731], [0.6296, 0.4731]], 'name': 'Keuken', 'color': '#E06A83', 'enabled': True}, {'id': '4b0a91c7-a01c-42ce-8eca-024adac2a5ec', 'type': 'polygon', 'vertices': [[0.2656, 0.2747], [0.3887, 0.2747], [0.3887, 0.459], [0.2656, 0.459]], 'name': 'Tapijt', 'color': '#7BB472', 'enabled': True}, {'id': '9ed44d61-c65a-4fa0-96df-d9c8bd05e38b', 'type': 'polygon', 'vertices': [[0.43, 0.5701], [0.6271, 0.5701], [0.6271, 0.6515], [0.43, 0.6515]], 'name': 'Trapkast', 'color': '#5B7BA5', 'enabled': True}, {'id': '5bba9e41-40a1-421d-8a21-1a7630f2f9dd', 'type': 'polygon', 'vertices': [[0.5838, 0.4843], [0.8201, 0.4843], [0.8201, 0.6938], [0.5838, 0.6938]], 'name': 'Entree', 'color': '#E49770', 'enabled': True}, {'id': '8478da68-ce3a-4700-8efd-747f7cf1b661', 'type': 'polygon', 'vertices': [[0.5012, 0.2374], [0.645, 0.2374], [0.645, 0.438], [0.5012, 0.438]], 'name': 'Eethoek', 'color': '#C46262', 'enabled': True}, {'id': 'e12ed8bb-d6da-4be5-9713-d55964879752', 'type': 'polygon', 'vertices': [[0.2107, 0.1649], [0.5836, 0.1649], [0.5836, 0.7097], [0.2107, 0.7097]], 'name': 'Woonkamer', 'color': '#618BAF', 'enabled': True}, {'id': '7d1a651a-d25b-4ccc-b9da-695fecd9e028', 'type': 'polygon', 'vertices': [[0.5026, 0.2001], [0.8075, 0.2001], [0.8075, 0.4871], [0.5026, 0.4871]], 'name': 'Keuken en eettafel', 'color': '#E2D071', 'enabled': True}]}}
2020-07-08 08:30:39 DEBUG (SyncWorker_9) [custom_components.neato.vacuum] List of boundaries for 'Tippi wan': {'version': 1, 'reqId': '1', 'result': 'ok', 'data': {'boundaries': [{'id': 'f04a63de-941b-4154-b3ab-5955eb561ad9', 'type': 'polygon', 'vertices': [[0.5161, 0.356], [0.6309, 0.356], [0.6309, 0.4896], [0.5161, 0.4896]], 'name': 'Yinthe', 'color': '#FFC974', 'enabled': True}, {'id': 'f5e22c37-b94b-4c9f-9114-aeeeced808a8', 'type': 'polygon', 'vertices': [[0.6296, 0.2065], [0.7883, 0.2065], [0.7883, 0.4731], [0.6296, 0.4731]], 'name': 'Keuken', 'color': '#E06A83', 'enabled': True}, {'id': '4b0a91c7-a01c-42ce-8eca-024adac2a5ec', 'type': 'polygon', 'vertices': [[0.2656, 0.2747], [0.3887, 0.2747], [0.3887, 0.459], [0.2656, 0.459]], 'name': 'Tapijt', 'color': '#7BB472', 'enabled': True}, {'id': '9ed44d61-c65a-4fa0-96df-d9c8bd05e38b', 'type': 'polygon', 'vertices': [[0.43, 0.5701], [0.6271, 0.5701], [0.6271, 0.6515], [0.43, 0.6515]], 'name': 'Trapkast', 'color': '#5B7BA5', 'enabled': True}, {'id': '5bba9e41-40a1-421d-8a21-1a7630f2f9dd', 'type': 'polygon', 'vertices': [[0.5838, 0.4843], [0.8201, 0.4843], [0.8201, 0.6938], [0.5838, 0.6938]], 'name': 'Entree', 'color': '#E49770', 'enabled': True}, {'id': '8478da68-ce3a-4700-8efd-747f7cf1b661', 'type': 'polygon', 'vertices': [[0.5012, 0.2374], [0.645, 0.2374], [0.645, 0.438], [0.5012, 0.438]], 'name': 'Eethoek', 'color': '#C46262', 'enabled': True}, {'id': 'e12ed8bb-d6da-4be5-9713-d55964879752', 'type': 'polygon', 'vertices': [[0.2107, 0.1649], [0.5836, 0.1649], [0.5836, 0.7097], [0.2107, 0.7097]], 'name': 'Woonkamer', 'color': '#618BAF', 'enabled': True}, {'id': '7d1a651a-d25b-4ccc-b9da-695fecd9e028', 'type': 'polygon', 'vertices': [[0.5026, 0.2001], [0.8075, 0.2001], [0.8075, 0.4871], [0.5026, 0.4871]], 'name': 'Keuken en eettafel', 'color': '#E2D071', 'enabled': True}]}}

ok still not adding, just replacing…will need to think about this fix.

Whats odd is that the map is not returning both maps here

2020-07-08 08:30:37 DEBUG (SyncWorker_9) [custom_components.neato.vacuum] Found the following maps: [{'id': '2020-04-28T06:45:59Z', 'name': 'Eerste verdieping', 'url': 'URL', 'raw_floor_map_url': 'FLOOR URL', 'raw_floor_map_url': 'FLOORMAP_URL', 'url_valid_for_seconds': 300}]

It only shows 1 map here which is odd.

Ok lets try replacing vacuum.py with

Made some changes that I think should do the trick :slight_smile:

Dude, you’re awesome!

It works!!! Replaced the file, tried Custom Cleaning service. Called Zone ‘Badkamer’ (first floor) and whoops, it runs! Did the same for the ground floor, and whoops it works!

Many thanks!!

1 Like

Excellent, thanks for confirming! I’ll probably be submitting it to HA core this weekend after I clean up the code a bit and get it ready :slight_smile:

Edit: This will be live in 0.113

1 Like

There it is, your fix has been deployed in .113, that’s great!

So, thank you very much! Great work!

1 Like

thank you for testing and getting the logs :slight_smile:

Hi

I’ve just got a neato D7, I’m running latest firmware and I’m on HA 0.113.3. Currently I only have one map setup in the neato app, but I have zoned all the rooms on this floor and added two no go lines.

I used the integration and I can see my vacuum and my map, but I can’t see any zones, nor do I know how to trigger a zone clean from HA?

Just wondered if you could give me a few pointers?

Many thanks

Andy

You won’t be able to see the zones listed in HA. To clean a zone you need to make use of neato.custom_cleaning service call as detailed in the docs: https://www.home-assistant.io/integrations/neato/#service-neatocustom_cleaning

1 Like

Hello ladies and gents, trying to get my D7 Connected vacuum to clean specific zones with Home assistant. I CAN at least get the vac to start and clean with “no go lines” disabled with this. But it won’t clean the actual zone. It just starts cleaning with “no go lines” (Same as just hitting the start button with no zone specified.

entity_id: vacuum.michelle
mode: 2
navigation: 1
category: 2
zone: Kitchen

But when I try to get it to clean and actual zone using the script below, the vac will pull forward and the stop and shoot me a notification saying the vac is on the wrong floor. If I use the vacuum’s app to clean just the kitchen zone it has no trouble.

entity_id: vacuum.michelle
mode: 2
navigation: 1
category: 4
zone: Kitchen

Make sure your zone names are unique across multiple floorplans. So if you have a zone named kitchen you shouldnt have another zone with a similar name.

1 Like

yeah only have one zone named that. And only one floor plan. So not sure if this is the issue unless there is some type of old floor plan in the cache of the vacuum somehow?

Delete the floorplan in teh neato app and recreate it then try. Its possible the mapping data isnt right.

I don’t “think” that is the issue because I just ran a new map today. (extra hard to do when there is dogs and kids running around) only able to do it when we are all out of the house lol.

Is the “home” name supposed to be in the path somehow? Like

zone: home/kitchen

What version of HA are you on?

HA 0.116.1 running it via docker on a SSD, ras pi 4 with 4gb of ram.

Try the service call again

entity_id: vacuum.name
zone: Kitchen

Its possible that when you made the call the vacuum did its normal search and got confused. By default the integration uses category: 4 so no need to set that. You cannot use category: 2 with a zone name. More details about each command can be found here: https://www.home-assistant.io/integrations/neato/#platform-services

1 Like

BOOM! that was it! thank you!

1 Like