-
Notifications
You must be signed in to change notification settings - Fork 78
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
Robot still running - changedCharging / changedCleaning #36
Comments
Hmm, I use the plugin exactly the same way. A HomeKit Automation starts the robot and cleans the house. After the cleaning he drives into the dock. The status is always correct, updated within 30 seconds. At the conclusion, when driving to the dock and docking. I can not understand your problem. So i need a debug log where the problem occurs, of course with the timestamps when the status should have updated. Can it be that your robot loses the WLAN signal during the cleaning, because the signal becomes too weak? Because in this case, the status can no longer update. since no automatic reconnect can take place over the api without a restart of homebridge. In this case, you would have to work on your wireless coverage. |
Hi Nico, thank you for replying! I do have a room with weak WIFI signal and maybe that's the reason. I checked the log file of HomeBridge but couldn't find anything suspicious, what error message shall I search for disconnect? Would it be possible to implement re-connect logic every 30 seconds when the device is offline?
|
Hi, in the debuglog you can clearly see that he has not got any information after starting. Not even that the battery is only at X% percent.
I think that problem is the wifi. Start the robot near the WLAN-AP, block the way and see if the statuses are updated properly. Restart Unfortunately, you can not install a reconnect logic. Since the miio API does not notice when no information comes or the connection is demolished - and it is quite normal, if the robot does nothing, that he even hours, even days, no infos sends. |
Hi Nico, I don't any debug message in the log. How you show me how to enable debug logs? Thanks! |
Start |
Hi again, I enabled debug mode now and can see the battery level. It decrease until 77% and seems to lost the connection:
|
Certainly the weak Wi-Fi signals |
I think so too :( Is there a way to test where does the robot lost the signal? |
Ok tried another plugin "homebridge-xiaomi-mi-robot-vacuum" which doesn't have the issue. Guess it reconnects - I probably have to stay with that. |
Really? I checked his code. Him plugin makes everything similar, like my plugin - no reconnect. |
Hi Nico, I must say that I'm also confused now. |
Just briefly looked into the code:
Do I expect the error message 'ERR getBattery | No vacuum cleaner is discovered.' printed out in HomeBridge log file? Looks like it is updated when requested by HomeKit at the moment, could this be called periodically and reset the connection when the error returned? Assume people with bigger space will most likely suffer the same WIFI issues, implement the re-connect machnism could be very useful feature. |
Is the message |
Searched in the log and couldn't find this error at all. I'm wondering:
|
No idea, you said it would be like that. HomeKit only gets the battery status on request. The message would only appear ... it will not work the way you think. If you do not get a message in your debug log that the Wi-Fi connection has been torn off, the plugin can not re-establish the connection. In my opinion, it does not get the miIO API. So I can not do anything here. |
Ok, understood. Could it be possible to pull the battery state from your plugin every minute? I also started a thread on this in miio project. |
Yes do it: https://github.com/aholstenson/miio/ The API communicates any battery level changes, then the message appears - not every minute. |
Thanks!
|
Fork it, code it, test it and make a pull request. |
Would like to try but not really familiar with javascript ecosystem so will take some time. Will write back when I manage this. Thanks for the help! |
I feel the same as you. I am it administrator, not a programmer. I can write simple batch, powershell, and bash scripts. It is my first javascript plugin. Much try and error, step by step, it takes a long time, but it works. :-D |
I like that :-) which editor/ide do you use? |
I use Sublime Text on macOS. |
Hi, thank you for the new version with the fix for the running status.
However I still seem to have some problem with status after the cleaning job is completed.
Basically when the roborock S50 finishes full house clean and returns to the dock station, HomeKit thinks it's still running until either 1) I manually turn the fan off (but it gives issue next time when I start cleaning from Homekit) or 2) restart HomeBridge service. I did several tests recently, same behaviour regardless if I start cleaning from Homekit or Mi Home. If I start clean and stop manually in HomeKit (turn off the fan), everything works as expected.
To conclude: it looks to me that the plugin cannot detect when the cleaning job is finished (and the roborock returns to the dock station) and think it's still running (forever).
The text was updated successfully, but these errors were encountered: