Closed rand256 closed 4 years ago
At first I erroneously wrote the specific issue not directly connected to original Valetudo, but now I've rewritten it in more general form.
I'm guessing that the msgID is the culprit here. The whole logic around that isn't very nice anyways.
You could try adding logging to each increment of it and see what happens
Is this still an issue?
Nope.
I wrote a small mod of Valetudo and came across this issue.
If you happen to call any function from
/lib/miio/Vacuum.js
that is usingsendMessage
early enough, like, straight inValetudo.js
, and this happens right after device was (re-)booted, then something definitely breaks and Valetudo stops responding to any requests which is based onsendMessage
- for example, getting state from/api/current_status
etc. Valetudo process is stuck at ~20% CPU usage in this case, but data from web interface still could be loaded: onlysendMessage
-based/api/
requests are kept in "pending..." state forever.This issue however doesn't happen if Valetudo was manually restarted when the device is online for some time. It fails only if one is trying to send messages to the vacuum when it's just booted.
Probably it can't be encountered in current releases or master branch (since no messages are sent until user manually opens the web interface, which requires some time), but I believe it is worth finding and fixing since Valetudo seems just can't recover from this state itself if it managed to get into it somehow.