Xiaomi Robot Vacuum Binding

@BOFH90

The logic now is that if 5 times in a row there is a timeout, then I send a ping request.
If the ping request succeeds, I make put the thing offline with configuration error. This because normally if you can ping the device, but there is no communication the issue is the token.

The 2nd change you see in your log is that once there are more than 5 commands in the queue, or it is offline with config error, there regular refresh is skipped. If it is offline with config error I do send one command so it does not stay in the offline forever.

As soon as a single response is successfully received, it should turn back to online. It should also not prevent any commands from being send (e.g. even when offine it will still try to send a command. Hence if you switch it to vacuum mode, that command will be send)

If it helps you I’ll publish it somewhere this week, no problem. Keep in mind that the mihome app seems to be picky so does not yet allow you to add emulated devices yet. I don’t know what it is exactly looking for. (Maybe it derives info from the wifi network name).

I use it as debug tool which works great

@illxi
I published the emulator here:

I can reproduce the problem. If I change something in the Thing-Config (e.g. Timeout from 10 to 11), the Thing starts to go Online until serveral hours until my wifi reconnects the robots. If it´s once offline, it never goes back online again, until i change something in the Thing-Settings. Otherwise everything works as expected.

@BOFH90 I’ll try to reproduce your issue and fix it

@BOFH90I could reproduce the issue and fixed it now.
Will be available soon

thank you!

Thank you :slight_smile: I’ve installed the updated Binding and report you back if the issue is fixed :blush:

@BOFH90 the automatic build process seems to be broken. So it is not yet available in the market. The fix is only available in github.

I’ll let you know when it is available in the market

@BOFH90 it should working again. You can get it from the marketplace

hi @marcel_verpaalen

I tried the current version of the binding…
air purifier looks a lot better … :wink:

should I format the temp locally or should the binding already set the correct value for the temp?

Hi NoOneAtAll, i’ve the same problem. Did you find a solution? Thx in advance. Jörg

Hi, can help me anyone with this Problem. In the logfile i see the following exceptions

2017-10-01 18:39:11.451 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Communication error for Mi IO device at 192.168.178.129: Receive timed out
2017-10-01 18:39:11.451 [DEBUG] [nal.transport.MiIoAsyncCommunication] - No response from device 03DA2708 at 192.168.178.129 for command {"id":17,"method":"miIO.info","params":[]}.
2017-10-01 18:39:11.479 [DEBUG] [ing.miio.handler.MiIoAbstractHandler] - Received response for 03DA2708 type: MIIO_INFO, result: null, fullresponse: {"error":"No Response"}
2017-10-01 18:39:11.479 [DEBUG] [ing.miio.handler.MiIoAbstractHandler] - Error received: "No Response"

Thx in advance!

@marcel_verpaalen Many thank for the development of the binding

regards, Jörg

@joerg, the most common issue with no communication is a wrong token.
In that case your thing will be online for a minute or so and than go offline with config error.

With a working toke, your device does not give an error, it just did not reply. (Only reply is to the ping, which does not require a token )

Hi Marcel,

thank you for your fast answer. Is there a chance to validate my token?

I extracted the token as descript here https://github.com/aholstenson/miio/blob/master/docs/management.md.

Many Thanks,
Jörg

Hi Jörg! No luck so far. The device stays online but doesn’t respond. Good luck to you!

@NoOneAtAll Maybe it has something todo with the token. Did you receive it from an iOS App? Turning Debug log on i saw the following

Could not decrypt token xxxx

Now im using the following method https://github.com/aholstenson/miio/blob/master/docs/management.md. Also the original error has gone, now i get a timeout …As marcel told me this is a hint for a wrong token.

Jörg

@joerg_ramser the other… If you have multiple apps running at the same time. As the device tracks the id, and I think multiple apps gives issue with the conflicting message id’s. (This is also the reason you should avoid to have the same device twice defined as thing)

On the latest version of the ios app, the token is 96 characters long. Based on a single example I build the decoding for that. I think there was somewhere a confirmation it worked.

can I ask this again?