-
-
Notifications
You must be signed in to change notification settings - Fork 9
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]: unable to connect to the cloud service on A1 printer #59
Comments
This is an issue created by Bambu and their new workflow for authentication. It's going to be a while before I implement those changes in the plugin. It's the same issue that has impacted the HA integration as documented in their issue greghesp/ha-bambulab#673, which is what this plugin uses as its underlying worker. |
@penguinpatrol if you use HA and install that plugin you can then pull the correct auth token from core.config_entries |
oh awesome i do use that where will i find the config entry?? |
I've started working on the authentication flow within the plugin's settings. Will be available soon once I've been able to test it. |
i managed to find it but nothing seems to have changed trying to enter it so hopefully the propper fix will sort it when its released |
I've just released version 0.1.8rc8 that has an updated login flow for the new verification processes required by Bambu. Enter email/password and press login, then using either 2fa verification code or verification code emailed to the given email address and click verify. If all goes smooth the auth token will be populated and you just click save. |
how would i update this? the software update tab shows the plugin as being up to date? (nevermind just gotr it i didnt realise i had to install from the zip) |
oh thanks! i am currently installing from the zip |
in terminal tab do you see multiple file list refreshes over and over? when sending files through the cloud the option to cache printing files on the printer is a requirement. make sure that option is enabled on your printer. |
althought i cant seem to find the setting? is it on the printer itself? does it not show while printing? |
I'm OctoPrint's settings enable debug for octoprint.plugins.bambu_printer in the logging section, restart OctoPrint and let's get some detailed logs to troubleshoot. I am assuming you have an SD card in the printer. |
yeah sd card in the printer and print is currently running |
plugin_bambu_printer_serial (2).log |
perfect...
this seems to be an authentication failed error when trying to retrieve the file list over ftps. you do also have the access code entered in the plugin's settings? it's possible this is a limitation of A1/P1 devices. I have heard from the development community that once cloud connected some services are no longer available locally to connect to. |
yeah i have the access code in i know it works locally as i tried that before its just the cloud not registering the current print, i know home assistant bambu connection work fine all of thoes scanners and such are connected. |
ah wait i did change the wifi a few hours ago that may jhave something to do with it edit: i dont think it does the HA plugin is working as normal |
the file list will be generated locally over ftps direct connection to printer, so the IP address and access code must be present, then when the file list is able to be generated the printing status from cloud should be picked up properly. |
Using Version 0.1.8rc11 after entering the verification code from the email, and click verify, the auth token isn't generated, and another verification code is sent from bambu labs. |
any errors in logs? could you reproduce the process with debug logging enabled, which will include some additional information for assistance troubleshooting the process. can't guarantee there will be anything obvious. |
Got this in the logs:
|
thanks, I'll have to do some additional testing and check upstream with the pybambu module to see if something changed in the authentication flow again. I vaguely remember having a double email once, but I think this error indicates an issue with getting the underlying username. |
Just released a potential fix in https://github.com/jneilliii/OctoPrint-BambuPrinter/releases/tag/0.1.8rc12, but I haven't personally tested it yet. I have merged in the upstream changes for pybambu and adjusted to get it working in local only mode the way I use it. Give it a try and see if your authentication with cloud is working now. |
Just downloaded it, and the plugin is no longer able to load 2024-12-02 06:37:24,977 - octoprint.plugin.core - ERROR - Error loading plugin bambu_printer |
Hopefully is fixed in 0.1.8rc13 I just released. |
The addon loads now, but when I enter my password and click login a verification code is sent, but there is no longer a textbox to enter the verification code, and the following error was in the log: 2024-12-02 07:24:44,455 - octoprint.server.api - ERROR - Error while executing SimpleApiPlugin bambu_printer |
Ok, this will require me to try the process myself and step through it. I was hoping for more of a drop in replacement from the ha project, but they've changed quite a bit. I'll get to it eventually this week. |
Just released version 0.1.8rc14, which I was able to use to login to cloud and verify the code emailed to me. |
I was able to login and verify the code and the auth token field was populated, but it seems to provide no method to connect to the printer in Octoprint via the cloud connection's MQTT. |
Once those are saved and you disconnect and connect back to printer in connection panel, it automatically will connect to cloud mqtt. |
I didn't realise I needed to enter the local info as well for it to load, but once I had it entered it connected. The only problem is that once connected it seems to not work. This turns up in the log:
|
hmm, seems error code 16 might be a problem with handling a bunch of messages at once after connection, or something else is getting in the way. I was worried that even after fixing the login issues that this might be a problem, because I had heard that A1/P1 series printers block the local file access via ftps that the plugin uses to retrieve the file list. I'll have to look into the pybambu module code to see if there is anything in there to help with listing/uploading files while in cloud connected mode. Without the file listing being possible, the plugin has no way of figuring out what is going on with ongoing prints, etc. |
I guess there's a fundamental difference in the way octoprint and home assistant handle it. The HA component has no problem showing on-going prints, but I don't think it ever retrieves a file list. |
Yes, very much so. The HA integration doesn't care about or have any knowledge of the files stored on the printer, but OctoPrint needs that information to calculate the print progress based on file size. It's very convoluted, but is the only way that the integration can work with OctoPrint, using the known filename that is displayed in file list of OctoPrint and it's file size to create a printing x/y bytes as an emulated SD card print. |
If there's anything I can do to help testing it, let me know. I assume it must be possible to get the file list somehow, as bambu studio is able to do it. |
That's my assumption as well, assuming there's an API file listing approach. |
Seeing as it's required to have the ip, serial number and access code for the plugin to work anyway, could you just use those to get the file list via ftp? |
My understanding is that A1/P1 series printers block local Ian access to ftp when they are connected to cloud. I don't have this printer so cannot confirm that statement. |
I just checked with my A1 on the latest firmware (01.04.00.00) and I'm able to use WinSCP to ftp with TLS into my printer and view the files on (I presume) the SD card while the printer is connected to the cloud. |
interesting, because ftps access to the printer is exactly how the plugin attempts to load the file list. In that view do you see a cache folder? What's inside that cache folder? |
Top level is cache Then inside the cache folder is a all the gcode, .bbl and .3mf files for stuff that I've printed. On a side note, when I first tried to connect to the printer via ftps this morning, it timed out, but after I'd opened bambu studio to make sure the printer was online, I was then able to connect via ftps. |
that's even more interesting. I wonder if bambu studio is triggering something on the printer side to accept ftps connections. |
So I was thinking that maybe the printer is in a semi-sleep mode and doesn't accept connections then, till something wakes it up ... but my HA instance is constantly connected ... so maybe there is a specific command bambu studio/handy is doing to wake it up. |
Describe the Bug
unable to connect to the cloud service on A1 printer i can enter in the login details but the login button doesn't work (there is no response and the auth token does not fill)
Expected Behavior
i expect to be able to log in to the cloud service
Debug Logs
plugin_bambu_printer_serial.log
Screenshots
Printer and Plugin Setting Details
The text was updated successfully, but these errors were encountered: