andreypopov / node-red-contrib-miio-roborock

Xioami Roborock node-red nodes
Apache License 2.0
32 stars 12 forks source link

Handshake timeout #1

Closed Lyve1981 closed 4 years ago

Lyve1981 commented 5 years ago

I have been able to successfully extract the token that I need by using a modified app, the reported token is 32 characters long so it seems to be valid.

But still, when trying to connect, I get a handshake timeout message from the node 2-3 seconds after deployment. The device is a Xiaowa Roborock E20/E25 with the latest firmware. The device is pingable from the machine running Node-RED so it doesn't seem to be a general network issue.

Any help would be highly appreciated.

andreypopov commented 5 years ago

Never heard about e20/e25 what is code for your device? my is rockrobo.vaccum.s5 https://github.com/aholstenson/miio/tree/master/docs/devices

Lyve1981 commented 5 years ago

Sorry, you're right, depending on the country the models are named differently. The model is: roborock.vacuum.e2

andreypopov commented 4 years ago

Handshake timeout - probably token issue

mboerma commented 4 years ago

Just got this error too. I've tried two roborock node-red nodes:

node-red-contrib-miio-roborock (this one) and node-red-contrib-xiaomi-roborock

Both get similar error messages. Token works with other tools like the RoboRock Control Center (RRCC).

mboerma commented 4 years ago

I figured out how to "fix" this, in my case at leased. I changed the IP address to an incorrect one. Deployed it. Next changed it back to the correct one. This fixed the issue of time-outs for me.

ma-gu-16 commented 4 years ago

Same here, Miio Roborock Error: Could not connect to device, handshake timeout

and after some of this: "trying to refresh token due to expiry"

I have a fixed IP Address and the 32sign Token.

Its not working. Is there anything else what i can do ?

niXta1 commented 4 years ago

I had the same problem. Looking in the sqlite file you could see the incorrect IP. Mocking around with the routers lease and fixed IP settings and rebooting stuff etc. got it settled correctly and I was immediately able to connect.

ma-gu-16 commented 4 years ago

I had the same problem. Looking in the sqlite file you could see the incorrect IP. Mocking around with the routers lease and fixed IP settings and rebooting stuff etc. got it settled correctly and I was immediately able to connect.

Witch one ? Where is this file ? Thank you :-)

Lyve1981 commented 4 years ago

Hey guys, sorry for the late response. In my case, I figured it out: The connecting device needs to be on the devices subnet. As my node red server is on a different network than the devices itself, it caused issues of not being able to connect. As soon as I added a second node red server on the smart home net, it works perfectly.

niXta1 commented 4 years ago

I had the same problem. Looking in the sqlite file you could see the incorrect IP. Mocking around with the routers lease and fixed IP settings and rebooting stuff etc. got it settled correctly and I was immediately able to connect.

Witch one ? Where is this file ? Thank you :-)

The file where you extract the token from. In my case it was from an iPhone, "_mihome.sqlite". It still said the old IP even though it had already connected with the new defined IP. In my case, all was on the same subnet.

egeu5 commented 4 years ago

Hi, same problem for me. My device worked great but it has no fixed IP. I set a fixed one and set the new in node red. Now it isn't working (same error "handshake timeout"). I checked if the token has changed but it hasn't. From iobroker it is working.

I deleted the device in node red - deploy - make a new device - deploy - same error. Any ideas?

egeu5 commented 4 years ago

Now i changed the Ip adress back to the original, edit it in node red, and it worked again.

I also tried to delete the whole device buti did not work either.

Any ideas?

andreypopov commented 4 years ago

finally, in 1-2 months i will buy roborock and fix all issues !)

egeu5 commented 4 years ago

If I can help you just tell how. I am not a good programmer but test different things, help with log files and so on...

S474N commented 4 years ago

Have Roborock S5 Max, with firmware 1.08.76. Token extracted (32 chars long). Inserted into plugin with correct IP (pingable) and there is error:

"Miio Roborock Error: Could not connect to device, handshake timeout"

andreypopov commented 4 years ago

Yesterday I bought S5 Max!! Very soon I will add full support!

"Miio Roborock Error: Could not connect to device, handshake timeout" - no connection. My roborock connects fine.

andreypopov commented 4 years ago

Have Roborock S5 Max, with firmware 1.08.76. Token extracted (32 chars long). Inserted into plugin with correct IP (pingable) and there is error:

"Miio Roborock Error: Could not connect to device, handshake timeout"

do you use examples? check configuration nodes

S474N commented 4 years ago

@andreypopov yes, tested with imported examples. Changed IP and token to me, and same problem.

Will wait for your solution :D

S474N commented 4 years ago

@andreypopov how did you extract token?

I used this: https://github.com/prinz3nroll3/roborock-token/releases

andreypopov commented 4 years ago

Total commander + mihome app but I installed Roborock app and token was changed, looking for another solution

S474N commented 4 years ago

I think, that this will be problem:

https://community.home-assistant.io/t/new-roborock-s5-max-vacuum-cleaner/154093/75

andreypopov commented 4 years ago

so, we have to use MiHome app ..

S474N commented 4 years ago

I cannot add them to Xiaomi Home (have iOS devices only). I can choose only "Roborock S5 Max" on Czechia server (in China mainland doesn't exists), but cannot add it.

andreypopov commented 4 years ago

do not use roborock app.

  1. Install MiHome app, pair
  2. Install Bluestacks or use native android
  3. Install android MiHome app, log in
  4. install total Commander, check smartHome logs

profit!

andreypopov commented 4 years ago

Handshake timeout is definitely incorrect token.

S474N commented 4 years ago

As I wrote, have iOS devices only ;)

Tested with Czechia Server, but cannot add it. Same in Germany server, it can be addded only in US server.

I used Memu Android emulator for Windows and MiHome 4.5.0 and it works.

But the way is also via Charles Proxy: https://www.reddit.com/r/homebridge/comments/hcl75o/howto_easy_way_to_obtain_xiaomi_device_tokens/