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

Roborock S7 can't be added to Home Assistant #1041

Closed
fettlaus opened this issue May 10, 2021 · 8 comments
Closed

Roborock S7 can't be added to Home Assistant #1041

fettlaus opened this issue May 10, 2021 · 8 comments

Comments

@fettlaus
Copy link
Contributor

I have tried adding my S7 today, and I am getting this error, I can add my S4 without any issues

ERROR (MainThread) [homeassistant.components.xiaomi_miio.device] DeviceException during setup of xiaomi device with host

I am running core-2021.5.1

Originally posted by @Claustn in #990 (comment)

@fettlaus
Copy link
Contributor Author

@Claustn Do you have any additional logs from this?

@fettlaus fettlaus changed the title I have tried adding my S7 today, and I am getting this error, I can add my S4 without any issues Roborock S7 can't be added to Home Assistant May 10, 2021
@Claustn
Copy link
Contributor

Claustn commented May 10, 2021

I tried enabling debug logging in home assistant, but it did not give me a lot more detail.

2021-05-10 23:16:40 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.device] Initializing with host x.y.z.æ (token xxxxxxx...)
2021-05-10 23:16:45 DEBUG (SyncWorker_0) [miio.miioprotocol] Unable to discover a device at address x.y.z.æ
2021-05-10 23:16:45 ERROR (MainThread) [homeassistant.components.xiaomi_miio.device] DeviceException during setup of xiaomi device with host x.y.z.æ

I have confirmed that I have the right IP for the device both on my router, Xiaomi app and the python token extractor, it is running firmware 4.1.2_0978

I am relatively new to HomeAssistant, so I am not sure if there is a way to get even more detailed logs for this, but if you have any suggestions let me know and I will try to get more logs

@rytilahti
Copy link
Owner

"Unable to discover a device at address x.y.z.æ" error happens when the device is not responding to the handshake datagram. Could you check that you are able to command the device from console (by installing python-miio and executing miiocli vacuum --ip <addr> --token <token> status, for example)?

@Claustn
Copy link
Contributor

Claustn commented May 11, 2021

Thank you for your suggestion, here is the debug output

❯ miiocli -d vacuum --ip x.y.z.æ --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx status INFO:miio.cli:Debug mode active Running command status DEBUG:miio.miioprotocol:Unable to discover a device at address x.y.z.æ DEBUG:miio.click_common:Exception: Unable to discover the device x.y.z.æ Traceback (most recent call last): File "/home/clausn/miiocli/lib/python3.8/site-packages/miio/click_common.py", line 59, in __call__ return self.main(*args, **kwargs) File "/home/clausn/miiocli/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/clausn/miiocli/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/clausn/miiocli/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/clausn/miiocli/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/clausn/miiocli/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/clausn/miiocli/lib/python3.8/site-packages/miio/click_common.py", line 280, in wrap kwargs["result"] = func(*args, **kwargs) File "/home/clausn/miiocli/lib/python3.8/site-packages/click/decorators.py", line 73, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/clausn/miiocli/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/clausn/miiocli/lib/python3.8/site-packages/miio/click_common.py", line 245, in command_callback return miio_command.call(miio_device, *args, **kwargs) File "/home/clausn/miiocli/lib/python3.8/site-packages/miio/click_common.py", line 193, in call return method(*args, **kwargs) File "/home/clausn/miiocli/lib/python3.8/site-packages/miio/vacuum.py", line 264, in status return VacuumStatus(self.send("get_status")[0]) File "/home/clausn/miiocli/lib/python3.8/site-packages/miio/device.py", line 178, in send return self._protocol.send( File "/home/clausn/miiocli/lib/python3.8/site-packages/miio/miioprotocol.py", line 161, in send self.send_handshake() File "/home/clausn/miiocli/lib/python3.8/site-packages/miio/miioprotocol.py", line 74, in send_handshake raise DeviceException("Unable to discover the device %s" % self.ip) miio.exceptions.DeviceException: Unable to discover the device x.y.z.æ Error: Unable to discover the device x.y.z.æ

@Claustn
Copy link
Contributor

Claustn commented May 11, 2021

For some reason I missed the first part of your troubleshooting guide, saying that there can be issues when using multiple subnets.. I will do some tests, to see if I can get it connected by changing the network layout...

@rytilahti
Copy link
Owner

The discovery error happens indeed when the device is not answering to the initial handshake, so you could launch tcpdump or wireshark to verify that you are indeed not receiving a response from the device.

If that is the case with your device, feel free to open a PR to update the documentation accordingly :-)

@Claustn
Copy link
Contributor

Claustn commented May 11, 2021

I can confirm via WireShark that I never get a response when I query the S7 from a different subnet than the vacuum itself.

Thank you very much for your help in troubleshooting this

@fettlaus
Copy link
Contributor Author

I assume this issue is kind of solved then.
See #1045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants