-
Notifications
You must be signed in to change notification settings - Fork 2
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
Set up remote Python control on A1 mini #147
Comments
I will lean to using this https://github.com/mchrisgm/bambulabs_api, given it has more developer-oriented features and a well-documented usage guide. The set up seems quite straightforward but I still need to register the printer with a Bambu account to collect all the information for the Python API connection setup:
Now I have the IP and SN, but for the access code is now shown as an IP address not the numerical code, according to the community it seems I need to login to the Handy App then the Studio app to enable this access code feature. https://forum.bambulab.com/t/a1-mini-where-do-i-find-the-access-code/56991/5 |
I have set up the connection with the Bambulabs-api. Most of the commands work well:
Example video (the printer reacts faster than I expect): IMG_1548.MOVHowever, the set_bed_temperature command doesn’t update the target temperature on the UI or change the actual bed temperature (as checked using the bed_temp command), regardless of whether a print job is in progress. though I think still possible to adjust the bed temperature (and most print settings) by modifying the G-code file and maybe a better practice comparing to changing the speed and temperature during the print job @sgbaird @SissiFeng Do you have any idea on to which level / how many parameters the students will need to change in the MO practical? |
Thank you! Probably at minimum, nozzle temperature, print speed, and bed temperature. Maybe something related to extrusion speed? Nozzle temperature and print speed would be a good start. |
I believe all of these parameters can be modified directly in the G-code for the print model. If the G-code is too complex for the students to understand, we could provide a script to directly edit these parameters in the G-code and send them to the printer using the Python API. Alternatively, modifying the API to expose these parameters could be another option. @SissiFeng and I have discussed that to have a relatively complicated pattern to print so the results will be more evaluable than a simple one. One possible choice could be the UofT logo or the tree on the logo. I think Sissi would give more comments on this after we have several trial prints. |
We'll want the students to only interact with the Python function, not with g code, so we should have a wrapper. Up to you to send g code via API vs. modify the package to expose those commands. One way or another the top level Python function will take the parameters as inputs and enforce reasonable bounds for safety. If you modify the package, please fork the repo, make the changes there, include a link to it here, and make a pull request to the main repo. Might be worth opening an issue to ask about recommendations for getting this functionality, but doesn't have to stop you from trying out things. Oh, nice! I like this idea. Maybe the AC logo / graphic? (Without the text). I have an SVG if you need. |
Does the Python package assume the orchestrator is connected to the same network as the A1 mini, or can it be remote accessed? If it can't be remote accessed, then we probably need a dedicated device for it, right? (I suppose we could dual-purpose the Zero 2W on the camera toolhead) |
I think so. It is using the local IP address for connection. |
I think a high priority will be to see if a Raspberry Pi Zero 2W can communicate with the A1 mini via bambulabs_api. I recommend using a Raspberry Pi 4B or 5 during the prototyping stage. I have Raspberry Pi 4B (4 GB) and Raspberry Pi 5 (2 GB) available, and I gave @Jonathan-Woo a Raspberry Pi 5 (4GB) which he's using for prototyping the camera toolhead image acquisition with AWS S3 bucket integration #159 #158. Aside: with latest version of firmware, we may need to enable a developer mode setting. @Neil-YL can you open an issue with bambulabs_api to ask about the issue we're having with setting the bed temperature? (somewhat related to mchrisgm/bambulabs_api#62) Can you also open an issue asking about whether it's compatible with a Raspberry Pi and/or Linux OS? (since RPi single board computers also have an Ubuntu option for the OS) Random notes
Worth considering whether to run regular bed level calibrations via We should see about printing a series of two squares with different settings via the API (again, I think having separate files for each iteration would simplify things - make it so we don't have to do much with G-code). |
https://github.com/greghesp/ha-bambulab likely best
Just ordered AMS version with extra 0.2, 0.6, and 0.8 mm nozzles
https://ca.store.bambulab.com/products/a1-mini
Some possibility of using:
The text was updated successfully, but these errors were encountered: