miio icon indicating copy to clipboard operation
miio copied to clipboard

Too short timeout for Roborock Vacuum V1?

Open krejkrejkrej opened this issue 4 years ago • 0 comments

I've struggled an entire day with getting miio to control my Roborock Vacuum (v1), and found out two things that may be useful for you to know. I'll open two separate tickets.

I just could not get miio to discover or connect to the robot, I always got errors like this:

$ ./miio inspect --token 30655xxxxxxxxxxxxxxxx6934 10.28.10.180
 INFO  Attempting to inspect 10.28.10.180
 ERROR  Could inspect device. Error was: Could not connect to device, token needs to be specified

$ <executed command to store token, with succeeded>

$ ./miio inspect 10.28.10.180
 INFO  Attempting to inspect 10.28.10.180
 WARNING  Could not find device

It seems like the timeout value of 2000 ms is too short for the vacuum to respond in most cases. After increasing the timeout to 5000 ms here:

https://github.com/aholstenson/miio/blob/dbd66fd9c6ebe7a206eb202624c268a1d77424d0/lib/network.js#L435

miio could connect to the robot to store the token locally (btw, is is really necessary to connect to the vacuum to do this?), and inspect it. BUT, only a few times, after which the command again times out. There is possibly some other issue as well, that have not been able to pin-point yet.

The vacuum is on Firmware version: 3.5.4_004004, if that matters.

krejkrejkrej avatar Jan 02 '20 18:01 krejkrejkrej