greghesp / ha-bambulab

A Home Assistant Integration for Bambu Lab Printers
696 stars 58 forks source link

[Bug] Binary sensor online toggles when printing in progress #546

Open FWeinb opened 1 week ago

FWeinb commented 1 week ago

Describe the bug

Today the binary_sensor.<printername>_online started to behave erratically with toggling between "Running"/"Not Running" multiple times.

To Reproduce

  1. Go to History for binary_sensor.<printername>_online See: image

Expected Behaviour

Binary sensor will stay online as long as the printer is turned on.

What device are you using?

P1S

Diagnostic Output

I got an javascript exception when trying to download the diagnostics:
ha-config-integration-page.ts:1323 Uncaught (in promise) {code: 'invalid_format', message: "expected str for dictionary value @ data['path']. Got None"}

Log Extracts

No response

Other Information

Printer is in "LAN Mode"

AdrianGarside commented 4 days ago

The online sensor toggles to off if the mqtt connection to the printer drops or if it doesn't get data for 20 minutes. Your drops are much shorter than that. So the connection to the printer is dropping and reconnecting. Are you cloud or local connected to it?

FWeinb commented 4 days ago

I am using the printer in "LAN mode", the last few days it I could not reproduce this issue again. Might be a bad WiFi Signal?

FWeinb commented 3 days ago

After some more investigation it looks like this was related to an old instance open that constantly tried to reconnect with a wrong access code. Did not have this issue in the last few days.