Skip to content
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

Valetudo MQTT disconnecting every 2 minutes #2058

Closed
szymucha94 opened this issue Apr 30, 2024 · 4 comments
Closed

Valetudo MQTT disconnecting every 2 minutes #2058

szymucha94 opened this issue Apr 30, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@szymucha94
Copy link

szymucha94 commented Apr 30, 2024

What is happening?

In short: my backup solution pauses HAOS VM at 1:30 every Monday causing mqtt disconnect from the vacuum robot after which connections last only for 2 minutes until robot is rebooted.
I stayed on one of the 2022 valetudo versions and decided to update to 2024.2 last week. This issue is only visible since yesterday (when the mosquitto broker was paused) - on old versions mqtt was always perfectly stable.
Using HA 2023.11.2. Robot is Mijia 1C. Attaching screenshots - please let me know what kinds of other logs you need.
Robot is not seen disconnecting from wifi, so this seems like MQTT issue. This is also seen on two identical mijia 1c robots (both running same valetudo versions, both under servers that backup VMs in the same way)

Broken or not as expected?

Broken

What should be happening?

MQTT should reconnect and stay connected with no need to reboot the robot.

How to reproduce

  1. Forcibly pause Mosquitto and let the robot disconnect for a moment
  2. Resume mosquitto, wait for the valetudo to connect
  3. Watch how it reconnects every 2 minutes

Is this Valetudo-related?

Certainly Valetudo-related

Please enter the Valetudo version you're using

2024.2

Please enter the vendor and model of robot you're using

Mijia 1C

Please enter the robot's firmware version you're using

1122

Additional context

Issue is seen on two identical robots. This issue did not happen on old (2022) valetudo versions.

Context reflection

No, it's only the Valetudo version that changed.

Screenshots

mosquitto_logs
mqtt availability
mqtt
timeline_ha
val_logs
wifi

@szymucha94 szymucha94 added the bug Something isn't working label Apr 30, 2024
@Hypfer
Copy link
Owner

Hypfer commented Apr 30, 2024

I was indeed able to reproduce the issue.

By pure coincidence, just 3 hours ago(!) there was a new release of the MQTT library used which contains a single bugfix for "keepalive issues": mqttjs/MQTT.js#1855

Please try the latest nightly build and let me know if the issue still persists

Repository owner deleted a comment from bendiger May 1, 2024
@szymucha94
Copy link
Author

szymucha94 commented May 5, 2024

I switched to "nightly" update branch and attempted update twice. I'm not sure install worked because updater still pops up with the same nightly built.
System information after update:
obraz
Updater still offers new package:
obraz

@szymucha94
Copy link
Author

szymucha94 commented May 5, 2024

Well, I think this update attempt broke my robot, or at least this is a very weird coincidence. When attempting to charge it turns on in lower mode and moves a bit in docking station, then complains about charging error.
Need to reflash this with official build. (after reflash battery charges fine, I checked logs in previous state and there was nothing worrying. Don't have time to reproduce this and investigate further unfortunately)

@Krispkiwi

This comment was marked as off-topic.

@Hypfer Hypfer closed this as completed May 20, 2024
Repository owner deleted a comment from rwjack Jun 21, 2024
Repository owner locked as resolved and limited conversation to collaborators Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants