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 S5 Max not discovered #944

Closed
lyghtnox opened this issue Feb 11, 2021 · 6 comments
Closed

Roborock S5 Max not discovered #944

lyghtnox opened this issue Feb 11, 2021 · 6 comments
Labels

Comments

@lyghtnox
Copy link
Contributor

lyghtnox commented Feb 11, 2021

Describe the bug
Hi,
My roborock S5 Max is not detected with the discovery mode nor I can connect by specifying the IP (I get miio.exceptions.DeviceException: Unable to discover the device).
However, I was able to discover it and get its token before I connected it to my WiFi through the Roborock app.
I tried to connect from the same subnet and with internet available.
Any idea why this is happening?

Version information (please complete the following information):

  • OS: Arch Linux
  • python-miio: 0.5.4

Device information:
If the issue is specific to a device [Use miiocli device --ip <ip address> --token <token> info]:

  • Model: Roborock S5 Max
  • Hardware version:
  • Firmware version: 01.13.40

Console output

(venv) [nath@arch-nath ~]$ mirobo --ip 10.42.x.x --token 454a737639... -d info
INFO:miio.vacuum_cli:Debug mode active
DEBUG:miio.vacuum_cli:Connecting to 10.42.x.x with token 454a737639...
DEBUG:miio.miioprotocol:Unable to discover a device at address 10.42.x.x
DEBUG:miio.click_common:Exception: Unable to discover the device 10.42.x.x
Traceback (most recent call last):
  File "/home/nath/venv/lib/python3.9/site-packages/miio/click_common.py", line 59, in __call__
    return self.main(*args, **kwargs)
  File "/home/nath/venv/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/nath/venv/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/nath/venv/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/nath/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/nath/venv/lib/python3.9/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/nath/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/nath/venv/lib/python3.9/site-packages/miio/vacuum_cli.py", line 423, in info
    res = vac.info()
  File "/home/nath/venv/lib/python3.9/site-packages/miio/device.py", line 177, in info
    return DeviceInfo(self.send("miIO.info"))
  File "/home/nath/venv/lib/python3.9/site-packages/miio/device.py", line 143, in send
    return self._protocol.send(
  File "/home/nath/venv/lib/python3.9/site-packages/miio/miioprotocol.py", line 160, in send
    self.send_handshake()
  File "/home/nath/venv/lib/python3.9/site-packages/miio/miioprotocol.py", line 87, in send_handshake
    raise DeviceException("Unable to discover the device %s" % self.ip)
miio.exceptions.DeviceException: Unable to discover the device 10.42.x.x
Error: Unable to discover the device 10.42.x.x
@lyghtnox lyghtnox added the bug label Feb 11, 2021
@lyghtnox
Copy link
Contributor Author

I just noticed port 54321/UDP is closed on the roborock. Why is that?

pi@rpi3:~ $ sudo nmap -sU -p54321 10.42.x.x
Starting Nmap 7.70 ( https://nmap.org ) at 2021-02-12 09:17 GMT
Nmap scan report for s5max.lan (10.42.x.x)
Host is up (0.0030s latency).

PORT      STATE  SERVICE
54321/udp closed bo2k
MAC Address: B0:4A:39:0D:x:x (Unknown)

Nmap done: 1 IP address (1 host up) scanned in 1.24 seconds

@rytilahti
Copy link
Owner

Try mirobo discover --handshake 1 to see if the device is responding to the discovery query when broadcasted, but based on the log message about discovery, it is unlikely to do that.

Sometimes such issues are caused by having different subnets, but as that is not the case here, I don't really know what could help here.

@lyghtnox
Copy link
Contributor Author

I tried the discovery already but it didn't show up. However, my yeelights do respond.

@lyghtnox
Copy link
Contributor Author

lyghtnox commented Feb 17, 2021

Ok, for anyone having the same issue, it was because I was using the roborock app. If you are using this app, even with a correct token, it seems that the robot won't respond at all.
I switched to the Xiaomi Home app and everything is working fine

@rytilahti
Copy link
Owner

Glad you found a solution! Would you mind creating a PR to add your findings to https://github.com/rytilahti/python-miio/blob/master/docs/troubleshooting.rst ?

@lyghtnox
Copy link
Contributor Author

Sure!

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

No branches or pull requests

2 participants