-
Notifications
You must be signed in to change notification settings - Fork 110
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
[Bug] Failed to connect. #612
Comments
Same issue - reset my password and still no luck. |
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 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 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, Failed to connect when trying to configure it back Failed to connect. Check credentials. |
This also breaks local/LAN mode setups because it's trying to download something from Bambu Cloud, and failing:
I commented out the slicer settings updates that are causing this to get things working again for now (gist of |
Same issue here, Login to Cloud failed. |
+1, same on North America, A1 here. |
Just randomly stopped working for me too, was working fine yesterday evening. P1S, Lan Mode. [Edit] 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. |
This worked for me! |
Same issue for me on my X1C. |
same here |
Same here |
Ok i have try to connect with python.
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: #607 |
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: 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. |
Works for me too, apart from the AMS. All slots are empty. |
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. |
You'd have to replace every use of the I did not modify |
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. |
Got it working too, if you're seeing an httpx error in your logs, make sure you go into your venv and install httpx from there (my system was on 0.27.2 - but the env was on 0.25) |
Pushed an official release: https://github.com/greghesp/ha-bambulab/releases/tag/v2.0.23 |
@AdrianGarside any chance of pushing newest changes to the pybambu repo? |
I just updated HA to 2024.10.3 and also your newest release for ha-bambulab but I do not get any connection. I was testing with older HA version and your Dev release yesterday and this was working fine. Also MQTT connection is fine when troubleshooting via Postman and MQTTX. Debug Log attached.
Thanks |
I've just updated the integration this morning and I am observing the same errors as reported by @klausiklau. Prior to updating, I had manually applied a fix to use httpx. This was working fine up until I installed the update. |
Can you try downgrading to see if things start working again? I’m wondering if things have changed on the Bambu end again such that existing connections to their cloud mqtt kept working until your restarted HA with the update to the integration. The official release is the exact same source as the dev6 release. |
@AdrianGarside, I'm still on dev6 and when I turned on my printer a few minutes ago it was indeed not working. I checked the HA logging and the errors (the same as before) started at the time I turned on the printer. I also see this new one: Logger: custom_components.bambu_lab.pybambu Exception. Type: <class 'ssl.SSLEOFError'> Args: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000) |
Upgraded a few minutes ago, everything lost connection. Now downgraded to dev3, as it was working for me yesterday. Still all the devices are offline, tried to force refers data, it shows 403 error |
Same Here. Dev Version was working great.. but now even downgrade to dev again doesnt help |
did try to downgrade both (HA and your addon) but still same issue |
I can confirm that the issue is the API call to get slicer settings is now returning access denied and the way we handle that is taking down the entire connection. I'll push a quick fix to disable it - custom filaments will be lost until/if we can resolve the access denied error. |
i wonder, the errors are refering to MQTT connection: 2024-10-23 07:10:57.500 DEBUG (P1S-Mqtt-336) [custom_components.bambu_lab.pybambu] Connect: Attempting Connection to us.mqtt.bambulab.com i have the same errors in my ha installation. |
https://github.com/greghesp/ha-bambulab/releases/tag/v2.0.24 It seems like there's two issues going on. I'm only seeing the slicer settings issue locally (north america region). The mqtt connection errors above aren't hitting me. For those hitting the mqtt errors - what region are you in? |
From Europe |
same here, europe, but if i update to 2.0.24, the mqtt error seems to be fixed too.. |
socket.gaierror is a problem resolving the hostname (GetAddressInfo) to connect to. |
The new release works for me, thanks for the quick resolve. I'm not sure about the mqtt errors. I'm also from Europe, but I don't see those errors in my HA log. But I didn't check them before installing 2.0.24, so this might be completely useless information :P |
for me still the same issue. I do believe the connection issue to us.mqtt.bambulab.com is not working because of this error:
Edit: Region is Europe |
That's just a warning. Everyone currently gets that with newer home assistant versions. It does not currently affect any of the functionality. |
The same is here, it was previously connected. This is the log:
|
Please try v2.0.25-dev1. It has a fix to add user agents in http requests that looks to be required now bambu has deployed cloud flare. |
v2.0.25-dev1 seems to work again. updated and flawlessly. |
@AdrianGarside Thanks, it works for me.
|
That warning isn't blocking currently and there's an issue tracking it. |
Re-closing since I believe all connectivity issues are currently resolved. The latest dev build (2.0.25-dev1) has a fix to re-enable retrieving custom filaments but is otherwise the same as 2.0.24. If you are still having connectivity issues, please open a new issue with debug logs. |
I don't have time currently. The big problem I need to fix with the pybambu repo is to cleanup all the member variable usage across the boundary to create a more defensible API boundary. Most of the code just reaches in and uses class member variables directly which means I can make breaking changes far too easily and python doesn't have a compile step to flag those. |
Describe the bug
Trying to connect to Bambu Cloud. Changed the password in BambuLab to update to new password standards.
![image](https://private-user-images.githubusercontent.com/28270147/378338994-0be6fc58-c5b4-4018-bf31-43dafca683bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MjcyMzEsIm5iZiI6MTczODkyNjkzMSwicGF0aCI6Ii8yODI3MDE0Ny8zNzgzMzg5OTQtMGJlNmZjNTgtYzViNC00MDE4LWJmMzEtNDNkYWZjYTY4M2JiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDExMTUzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4ZGY0MDgwZGI1MzZhZjNiN2M2ZDU5ZjcyMjIxNzViNTAyYWFjMzc2Mzk2Yjg3NzdhM2YxZWZhMGU5NWFhOTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.hNMEZBNPPdeTYA27aNzKlbi12ck_RtIzoWLnrI1Sw54)
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
Can't, because the Integration isn't active yet.
Log Extracts
No response
Other Information
No response
The text was updated successfully, but these errors were encountered: