Closed FeiiiikLV closed 2 weeks ago
Same issue - reset my password and still no luck.
Same here, I've got errors in logs:
Edited: My timezone is +8
same for me
I seem to have the same issue, my logging is being flooded with the same errors as @zhujunsan and the enity "Current stage" shows that my printer is offline. It started at 11:22 AM CEST. Although this might look like Bambu cloud issue, both Bambu Studio and Bamby Handy work perfectly fine.
I'm not sure if it is somehow related, but it started at the same time (to the minute) as I got a notification in Bambu Handy that a print was ready.
Same issue here too, but I haven't changed my password or reconfigured the integration lately.
I get a total of 4 different error messages repeating quite rapidly (every ~2 seconds, integration had been running for about 8 minutes at time of screenshot):
In the order they appear in that screenshot, the sources are as follows:
custom_components/bambu_lab/pybambu/bambu_client.py:266 custom_components/bambu_lab/pybambu/bambu_client.py:265 custom_components/bambu_lab/pybambu/bambu_client.py:401 custom_components/bambu_lab/pybambu/bambu_client.py:397
No other useful information in the errors as far as I can tell.
Edit: Debug log excerpt follows, IP removed but the rest is unchanged:
2024-10-21 21:52:56.588 DEBUG (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] Connect: Attempting Connection to XXX.XXX.XXX.XXX 2024-10-21 21:52:57.400 DEBUG (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] Starting listen loop 2024-10-21 21:52:57.405 INFO (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] On Connect: Connected to Broker 2024-10-21 21:52:57.405 DEBUG (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] Loading slicer settings... 2024-10-21 21:52:57.405 DEBUG (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] Loading slicer settings 2024-10-21 21:52:57.405 DEBUG (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] Getting slicer settings from Bambu Cloud 2024-10-21 21:52:57.443 DEBUG (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] Received error: 403 2024-10-21 21:52:57.443 ERROR (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] A listener loop thread exception occurred: 2024-10-21 21:52:57.443 ERROR (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ValueError'> Args: 403 2024-10-21 21:52:58.444 WARNING (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] On Disconnect: Disconnected from Broker: 0 2024-10-21 21:52:58.444 WARNING (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] _on_disconnect
Perhaps some sort of cloud auth/API change?
I have the same problem, thought i was blocked by API.
But after login through postman and manual check mqtt with mqttx everything is fine.
I haven't had time to dive in to logs, but noticed that my printer isn't sending info to HA where as it was last week
Same problem here, no data from the integration and all appear disconnected
Failed to connect when trying to configure it back Removed the printer and also removed the integration but it's not working and the credentials are 100% fine
Failed to connect. Check credentials.
This also breaks local/LAN mode setups because it's trying to download something from Bambu Cloud, and failing:
2024-10-21 15:30:45.338 DEBUG (P1S-Mqtt-68) [custom_components.bambu_lab.pybambu] Connect: Attempting Connection to 192.168.23.239
2024-10-21 15:30:46.076 DEBUG (P1S-Mqtt-68) [custom_components.bambu_lab.pybambu] Starting listen loop
2024-10-21 15:30:46.079 INFO (P1S-Mqtt-68) [custom_components.bambu_lab.pybambu] On Connect: Connected to Broker
2024-10-21 15:30:46.079 DEBUG (P1S-Mqtt-68) [custom_components.bambu_lab.pybambu] Loading slicer settings...
2024-10-21 15:30:46.079 DEBUG (P1S-Mqtt-68) [custom_components.bambu_lab.pybambu] Loading slicer settings
2024-10-21 15:30:46.079 DEBUG (P1S-Mqtt-68) [custom_components.bambu_lab.pybambu] Getting slicer settings from Bambu Cloud
2024-10-21 15:30:46.119 DEBUG (P1S-Mqtt-68) [custom_components.bambu_lab.pybambu] Received error: 403
I commented out the slicer settings updates that are causing this to get things working again for now (gist of pybambu/bambu_client.py
)
Same issue here, Login to Cloud failed. Maybe it's Bambu ..
+1, same on North America, A1 here.
Just randomly stopped working for me too, was working fine yesterday evening. P1S, Lan Mode.
[Edit]
Applying this patch to bambu_client.py
300,301c300,301
< self.bambu_cloud = BambuCloud(region, email, username, auth_token)
< self.slicer_settings = SlicerSettings(self)
---
> # self.bambu_cloud = BambuCloud(region, email, username, auth_token)
> # self.slicer_settings = SlicerSettings(self)
346c346
< self.slicer_settings.update()
---
> # self.slicer_settings.update()
487c487
< self.slicer_settings.update()
---
> # self.slicer_settings.update()
solves it, but you won't get filament infos anymore. Looks like logging into the bambu account is broken.
Is stopped working here on A1 in LAN mode.
Just randomly stopped working for me too, was working fine yesterday evening. P1S, Lan Mode.
[Edit]
Applying this patch to
bambu_client.py
300,301c300,301 < self.bambu_cloud = BambuCloud(region, email, username, auth_token) < self.slicer_settings = SlicerSettings(self) --- > # self.bambu_cloud = BambuCloud(region, email, username, auth_token) > # self.slicer_settings = SlicerSettings(self) 346c346 < self.slicer_settings.update() --- > # self.slicer_settings.update() 487c487 < self.slicer_settings.update() --- > # self.slicer_settings.update()
solves it, but you won't get filament infos anymore. Looks like logging into the bambu account is broken.
This worked for me!
Same issue for me on my X1C.
same here
Same here
Ok i have try to connect with python. The reason why it does not work is the cloudflare protection.
Response status: 403
Attention Required! | Cloudflare This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
Rootcause:
requests onyl can http 1.1 instead of http2
this may fix it:
# Using httpx.Client with http2=True
with httpx.Client(http2=True) as client:
response = client.post(url, json=data, timeout=10)
if not response.is_success:
LOGGER.debug(f"Received error: {response.status_code}")
raise ValueError(f"Error: {response.status_code} - {response.text}")
return response.json()['accessToken']
not tested....
but tbh. py is not my world xD
@AdrianGarside maybe you can help here to solve it
That only checks out for the cloud account and not LAN only mode, right?
Yes the lan mode should work correct if u follow this: https://github.com/greghesp/ha-bambulab/issues/607
not tested....
but tbh. py is not my world xD
@AdrianGarside maybe you can help here to solve it
I can test that code if you want. The only thing is that I'm completely new to this integration (got my printer last Friday), so I have no idea where to change this code. So if that is something you can tell me, I can change the code and test.
I have try it here: filebrowser: /homeassistant/custom_components/bambu_lab/pybambu/bambu_cloud.py
But i'm not sure if this works if i just change it and restart hass
The DDoS of holiday sale probably also nuked their backend API. It started right about the time people started reporting issues.
Just randomly stopped working for me too, was working fine yesterday evening. P1S, Lan Mode.
[Edit]
Applying this patch to
bambu_client.py
300,301c300,301 < self.bambu_cloud = BambuCloud(region, email, username, auth_token) < self.slicer_settings = SlicerSettings(self) --- > # self.bambu_cloud = BambuCloud(region, email, username, auth_token) > # self.slicer_settings = SlicerSettings(self) 346c346 < self.slicer_settings.update() --- > # self.slicer_settings.update() 487c487 < self.slicer_settings.update() --- > # self.slicer_settings.update()
solves it, but you won't get filament infos anymore. Looks like logging into the bambu account is broken.
This worked for me!
Works for me too, apart from the AMS. All slots are empty.
I have try it here: filebrowser: /homeassistant/custom_components/bambu_lab/pybambu/bambu_cloud.py
But i'm not sure if this works if i just change it and restart hass
I think I changed it in the correct location and restarted HASS. I don't get any (additional) error in the logging, so the change at least doesn't give any compile/run error. However, it does not solve the issue. I'm still getting the same errors as before and I get no data from my printer.
@bscheutjens @kurim
You'd have to replace every use of the requests
library targeting the BambuLab API by calls using the httpx
API. Or at least, you'd need to replace more than just the login call used to retrieve the accessToken. There seem to be five API calls, all located in bambu_cloud.py
.
I did not modify bambu_cloud.py
yet because as far as I can tell, my HomeAssistant does not have httpx installed.
You also need to add httpx as a requirement to the manifest. I can confirm that this fix is working. I'll create a pull request.
Initial to see i create it out off homeassistant to see the request response, after searching for a solution for cloudflare and python I run into httpx
(pip install httpx + pip install httpx[http2]).
It seems httpx is already installed:
so this could work
I copied the changes from @TheDuffman85 into my local files, restarted HASS and the integration works again. Thanks @TheDuffman85
Yes, I also can confirm that it works, big shoutout to @TheDuffman85 !
What still need to fix is the mqtt.
Detected blocking call to load_default_certs with args (<ssl.SSLContext object at 0x7f75109ad0>,) inside the event loop by custom integration 'bambu_lab' at custom_components/bambu_lab/pybambu/bambu_client.py, line 519:
self.client.tls_set(tls_version=ssl.PROTOCOL_TLS, cert_reqs=ssl.CERT_NONE) (offender: /usr/local/lib/python3.12/site-packages/paho/mqtt/client.py, line 806: context.load_default_certs())
Will this be patched as I have this issue too X1C
Lan mode also fails
@TheDuffman85 I changed the manifest.json and bambu_cloud.py manual from your pull request and your fix works Like a charm! Very good Job!!
Hope the PR gets merged soon, you deserved it :)
Same here after changing the files restarted HASS and the integration works . Thanks @TheDuffman85
I edited my files with @TheDuffman85 changes and it's back up and running! We have 71 printers to monitor so we were lost without this!
Works all fine again after editing the 2 files suggested by @TheDuffman85 . Includung AMS.
Great work! Thanks!
Have also updated my files according to @TheDuffman85 and it's working great.
You also need to add httpx as a requirement to the manifest. I can confirm that this fix is working. I'll create a pull request.
Can confirm working. Thank you!
New dev release with this fix: https://github.com/greghesp/ha-bambulab/releases/tag/v2.0.23-dev3
Please test and let me know if you see any issues.
I edited my files with @TheDuffman85 changes and it's back up and running! We have 71 printers to monitor so we were lost without this!
71!!! I'm impressed HA / this integration can scale that well.
New dev release with this fix: https://github.com/greghesp/ha-bambulab/releases/tag/v2.0.23-dev3
Please test and let me know if you see any issues.
Looks good to me!
Heads up for others moving from the standard release: the “image” entity of the printer camera is no longer provided; instead there is a new “camera” entity. If you also use the Obico spaghetti detection automation I don’t believe the included blueprints will work for you any more.
I edited my files with @TheDuffman85 changes and it's back up and running! We have 71 printers to monitor so we were lost without this!
Hey, any chance you could help me set up a dashboard, currently trying to create a dashboard with my 45 printers to display current statuses and help me navigate all the printers.
New dev release with this fix: https://github.com/greghesp/ha-bambulab/releases/tag/v2.0.23-dev3
Please test and let me know if you see any issues.
This fixed the issue, now I can add all the devices. The only thing I notice is that when adding the devices quickly it gives an error that the credentials are wrong. Maybe something to do with downloading data... Usually happens when I add 2 or 3 printers really fast.
New dev release with this fix: https://github.com/greghesp/ha-bambulab/releases/tag/v2.0.23-dev3
Please test and let me know if you see any issues.
Seems to be working for me, thanks
Can confirm, works in LAN only mode. Thanks @TheDuffman85
After updating to dev branch everything works fine, thanks 👍
Funktioniert wieder einwandfrei nach dem Bearbeiten der 2 Dateien vorgeschlagen von https://github.com/TheDuffman85 Einschließlich AMS.
Tolle Arbeit! Vielen Danke!
Possibly dumb question because I'm possibly dumb, but how do I update to the dev branch?
Simplest way is to install v2.0.23-dev3 using HACS. But this version is currently only running with HA 2024.10. PR #616 will make it compatible with older HA versions as well.
Simplest way is to install v2.0.23-dev3 using HACS. But this version is currently only running with HA 2024.10. PR #616 will make it compatible with older HA versions as well.
That worked. Thanks!
It seems to be working as intended again.
Describe the bug
Trying to connect to Bambu Cloud. Changed the password in BambuLab to update to new password standards. Email removed for security.
To Reproduce
Install Integration and try to activate it.
Expected Behaviour
I expected to login into Bambu Cloud and add printers with cloud connection
What device are you using?
P1P
Diagnostic Output
Log Extracts
No response
Other Information
No response