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 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.
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"
@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 )
@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.