Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neato Botvac D3 not responding to commands from HASS #24119

Closed
webworxshop opened this issue May 26, 2019 · 14 comments · Fixed by #27249
Closed

Neato Botvac D3 not responding to commands from HASS #24119

webworxshop opened this issue May 26, 2019 · 14 comments · Fixed by #27249

Comments

@webworxshop
Copy link
Contributor

@webworxshop webworxshop commented May 26, 2019

Home Assistant release with the issue:
0.93.2

Last working Home Assistant release (if known):
0.82.1 (previous version I updated from)

Operating environment (Hass.io/Docker/Windows/etc.):
Docker, using official image.

Component/platform:
Neato Vacuum

Description of problem:
Vacuum state is available and correct, but start and spot clean services do not work. No error is printed in the logs. I started the vacuum via the Neato app and was able to send it back to the dock via HASS. Occasionally the vacuum will make a sound when the a service is called, but it doesn't start running.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

neato:
  username: !secret neato_user
  password: !secret neato_password

Traceback (if applicable):
None

Additional information:
Neato model: D3 Connected

@dshokouhi

This comment has been minimized.

Copy link
Contributor

@dshokouhi dshokouhi commented May 26, 2019

What does the status attribute show after you attempt to clean via HA? Also can you share the yaml you used? Do you happen to have no go lines setup as well? If no error is printed then the vacuums status attribute will be more helpful here. You may need to wait 5 minutes for the attribute to update but check it after you attempt to clean via the front end.

@webworxshop

This comment has been minimized.

Copy link
Contributor Author

@webworxshop webworxshop commented May 26, 2019

Hi @dshokouhi, thanks for the quick response.

The yaml configuration is as specified in my original post. I wasn't triggering the vacuum from any yaml automations in my testing, just via the frontend. I've tried both the buttons on the vacuum status card and calling the services from the services dev-tool tab. Neither work. I'm assuming this means it won't work from an automation either.

I've given the start service another try from the frontend. However, the vacuum status attribute has not changed at all even after 10 minutes and there is no error attribute. The vacuum did play a jingle when the service was called, which was different to the normal start up jingle.

I don't have any no-go lines set up.

I'm not sure if any of this is any help, but please let me know of anything you'd like me to do to gather further information.

Thanks again!

@dshokouhi

This comment has been minimized.

Copy link
Contributor

@dshokouhi dshokouhi commented May 27, 2019

Ok can you do me a favor and try to run the commands from the library directly?

https://github.com/stianaske/pybotvac

See if you can grab the state of the device and also start cleaning from the steps mentioned in the readme. Please post the output of the state result here and any errors when you run start cleaning.

I think there may be a missing error or alert due the additional jingle you hear, also when you hear that sound do you see any alerts or errors in the Neato app? that can be something else to help troubleshoot here.

@webworxshop

This comment has been minimized.

Copy link
Contributor Author

@webworxshop webworxshop commented May 27, 2019

OK, here is some output from the library:

>>> robot.get_robot_state()
<Response [200]>
>>> robot.state
{'version': 1, 'reqId': '1', 'result': 'ok', 'data': {}, 'error': None, 'alert': None, 'state': 1, 'action': 0, 
'cleaning': {'category': 2, 'mode': 1, 'modifier': 1, 'navigationMode': 1, 'spotWidth': 0, 'spotHeight': 0}, 
'details': {'isCharging': True, 'isDocked': True, 'isScheduleEnabled': False, 'dockHasBeenSeen': False, 
'charge': 99}, 'availableCommands': {'start': True, 'stop': False, 'pause': False, 'resume': False, 
'goToBase': False}, 'availableServices': {'generalInfo': 'basic-1', 'houseCleaning': 'basic-3', 'IECTest': 
'basic-1', 'logCopy': 'basic-1', 'maps': 'advanced-1', 'preferences': 'basic-1', 'schedule': 'minimal-1', 
'softwareUpdate': 'basic-1', 'spotCleaning': 'micro-2', 'wifi': 'basic-1'}, 'meta': {'modelName': 
'BotVacD3Connected', 'firmware': '4.4.0-72'}}
>>> robot.start_cleaning() # robot plays same jingle as before, stubbornly refuses to clean
<Response [200]>
>>> robot.get_robot_state()
<Response [200]>
>>> robot.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': 100}, 'availableCommands': {'start': True, 'stop': False, 'pause': 
False, 'resume': False, 'goToBase': False}, 'availableServices': {'generalInfo': 'basic-1', 
'houseCleaning': 'basic-3', 'IECTest': 'basic-1', 'logCopy': 'basic-1', 'maps': 'advanced-1', 'preferences': 
'basic-1', 'schedule': 'minimal-1', 'softwareUpdate': 'basic-1', 'spotCleaning': 'micro-2', 'wifi': 'basic-1'}, 
'meta': {'modelName': 'BotVacD3Connected', 'firmware': '4.4.0-72'}}

I don't seem to be getting any errors in the neato app when running these commands.

One time I tried the start_cleaning() method I got a set of tracebacks indicating that the connection timed out. I don't want to post the full thing here because it contains the robot serial number. If you think this would be useful let me know and I'll post an anonymised version.

That time the robot didn't play the jingle, so I suspect this is happening with at least some of the commands from Home Assistant.

EDIT: I just noticed during further testing that the jingle that is being played is the same as that played when the robot returns to the dock after cleaning. That might be a clue!

@dshokouhi

This comment has been minimized.

Copy link
Contributor

@dshokouhi dshokouhi commented May 27, 2019

yes I definitely need that traceback...feel free to remove or redact the robot serial and any other personal information.....that will be most helpful. The state seems to be fine oddly enough. One thing you can try is to create a cleaning map to see if that allows it to be cleaned. But I will need that traceback to see whats causing it to error out.

@webworxshop

This comment has been minimized.

Copy link
Contributor Author

@webworxshop webworxshop commented May 27, 2019

OK, here is the (redacted) traceback:

>>> robot.start_cleaning() 
Traceback (most recent call last):
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
    chunked=chunked)
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/connectionpool.py", line 344, in _make_request
    self._validate_conn(conn)
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/connectionpool.py", line 843, in _validate_conn
    conn.connect()
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/connection.py", line 316, in connect
    conn = self._new_conn()
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f538657f940>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='nucleo.neatocloud.com', port=443): Max retries exceeded with url: /vendors/neato/robots/XXXXXXXX-XXXXXXXXXXXX/messages (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f538657f940>: Failed to establish a new connection: [Errno 110] Connection timed out',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/pybotvac/robot.py", line 76, in start_cleaning
    if self.service_version == 'basic-1':
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/pybotvac/robot.py", line 226, in service_version
    return self.available_services['houseCleaning']
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/pybotvac/robot.py", line 222, in available_services
    return self.state['availableServices']
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/pybotvac/robot.py", line 218, in state
    return self.get_robot_state().json()
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/pybotvac/robot.py", line 176, in get_robot_state
    return self._message({'reqId': "1", 'cmd': "getRobotState"})
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/pybotvac/robot.py", line 61, in _message
    headers=self._headers)
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/home/rob/.virtualenvs/pybotvac/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='nucleo.neatocloud.com', port=443): Max retries exceeded with url: /vendors/neato/robots/XXXXXXXX-XXXXXXXXXXXX/messages (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f538657f940>: Failed to establish a new connection: [Errno 110] Connection timed out',))

After I completed my testing last night I also noticed a message in the Neato app regarding a missing cleaning map (it advised me to run another clean and contact support if the problem persists). The message seems to have disappeared now so I can't give you the exact wording.

Do I need to go through the no-go lines/floorplan wizard to create a cleaning map? The robot has been creating maps on every run already. It seems odd that it now wouldn't have one.

@dshokouhi

This comment has been minimized.

Copy link
Contributor

@dshokouhi dshokouhi commented May 27, 2019

Yea that is just a connection error so nothing specific. Since you do not have a floorplan have you tried waiting a minute or two after the jingle to see if it will start cleaning on its own? The code is designed to grab the error for missing floorplan and start a new clean.

https://github.com/stianaske/pybotvac/blob/master/pybotvac/robot.py#L116

Can you try the vacuum.neato_custom_cleaning service call? Try sending category: 2 and the entity_id of the vacuum as the service data. Let me know if that works. I have a feeling this will work, if that is case the quickest fix I can offer is to create a floorplan using the neato app, floorplans are not the same as the cleaning map you get when the vacuum is done cleaning. You can create a floorplan in the menu in the neato app.

@webworxshop

This comment has been minimized.

Copy link
Contributor Author

@webworxshop webworxshop commented May 28, 2019

Yes, I have tried waiting and the vacuum doesn't start with the normal vacuum.start service. The good news is that it starts with the vacuum.neato_custom_cleaning service with the options you specified above.

I'll try running the wizard to create the floorplan in the next few days and see if that makes a difference to the other services.

Thanks for your help so far.

@dshokouhi

This comment has been minimized.

Copy link
Contributor

@dshokouhi dshokouhi commented May 28, 2019

Ok probably what is happening is your model of the botvac is not returning the expected error message like the D7 does. This is actually not an issue with Home Assistant but more of an issue with the library at pybotvac. Can you file a bug at this repository (https://github.com/stianaske/pybotvac) since you had the same behavior using the start_cleaning method? Once we get it fixed there we can get it fixed in HA. In the meantime you can create a switch template that starts the vacuum with the above service call if you prefer not to create a floorplan. If you chose to create one and stick with it then nothing is needed :)

@webworxshop

This comment has been minimized.

Copy link
Contributor Author

@webworxshop webworxshop commented Jun 8, 2019

Sorry it's taken me a while to get back to this. I ran the cleaning run to create the floorplan and it does appear to work now. Spot cleaning via HASS still doesn't work though (I guess it's the same issue since it just uses the start_cleaning method underneath).

I've posted a corresponding issue for pybotvac: stianaske/pybotvac#41

Thanks for all the help so far.

@stale

This comment has been minimized.

Copy link

@stale stale bot commented Sep 6, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 6, 2019
@webworxshop

This comment has been minimized.

Copy link
Contributor Author

@webworxshop webworxshop commented Sep 6, 2019

Tested in latest version of HASS, no change in behaviour. Still valid as underlying issue in pybotvac library has not been fixed.

@stale stale bot removed the stale label Sep 6, 2019
@Santobert Santobert mentioned this issue Oct 6, 2019
7 of 7 tasks complete
@aeckard87

This comment has been minimized.

Copy link

@aeckard87 aeckard87 commented Nov 14, 2019

Tested in latest version of HASS, seeing same issue with D5

@Santobert

This comment has been minimized.

Copy link
Member

@Santobert Santobert commented Nov 14, 2019

@aeckard87 please describe your problem in a new issue. Tell us exactly what you are doing and what happens as result. Thanks

The issue described here it's solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.