You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Equipment monitoring camera for A1 mini livestream (standalone, separate from toolhead camera) #161
The built-in camera on the A1 mini doesn't support streaming directly (see below), so in addition to the "toolhead camera" from #158, we'll likely want to have a separate monitoring camera that lets people see the device in motion to create the "feeling of control remote hardware". This will be the same as any other setup described in #11. Might seem a bit redundant given there's already a toolhead camera and the built-in A1 mini camera, but I think it will enhance the experience to be able to observe the full system operating in response to commands, and possibly for troubleshooting too.
Some resources related to the Bambu Lab built-in camera / A1 Mini streaming being unsupported:
Maybe webcamd from above would work, but seems like it could be more work than its worth compared with replicating the Pi Zero 2W setup.
@Jonathan-Woo could you also get one of these cameras set up, mounted, and pointing at the A1 mini? (secondary priority to the image capture task mentioned in #144)
changed the title [-]Equipment monitoring camera for A1 mini (standalone, separate from toolhead camera)[/-][+]Equipment monitoring camera for A1 mini livestream (standalone, separate from toolhead camera)[/+]on Jan 23, 2025
Thanks for all the effort getting the OT-2 livestream set up (and especially all the ground work leading up to it). What's the status on setting up this one?
I was busy with the toolhead camera but this should be doable. The only concern is the upload bandwidth if we have to use the Nokia. @Neil-YL any luck with using utoronto wifi?
I was busy with the toolhead camera but this should be doable. The only concern is the upload bandwidth if we have to use the Nokia. @Neil-YL any luck with using utoronto wifi?
Not yet. Last week the students from Jae's course were using the system actively. I will have a try tomorrow.
Oh, good point. I'm not sure. In the meantime, if we have trouble with eduroam / UoT, could we reduce the resolution to the lowest reasonable/allowed setting for YouTube, which we could increase later on? (I.e., just to get more pieces connected). Thanks so much for working on all these pieces ☺️
Oh, good point. I'm not sure. In the meantime, if we have trouble with eduroam / UoT, could we reduce the resolution to the lowest reasonable/allowed setting for YouTube, which we could increase later on? (I.e., just to get more pieces connected). Thanks so much for working on all these pieces ☺️
My plan is to set the streaming python file as auto-started and leave it with UofT network to test the stability. I will test it today.
---Update---
Kinda surprised that I can SSH to Zero2 with the UofT network. I used my UTORAUTH account to log in. Now the OT-2 streaming is via UofT network.
That's great news! We can try to get a non-personal account set up with it. I need to explore that - there may be someone else at the AC who's done that. Is the one you're talking about the OT-2 stream or the A1 mini stream? If the latter, could you add a link to the stream?
I just updated the stream for the OT-2. Do we have another mount for the Picam? (one is used for the OT-2 streaming and one is used for the toolhead cam of the Bambu)
BTW today we had a meeting with Jae and I believe we will move forwards with the Bambu A1 mini for the MO practical.
I am thinking if the printer(I mean the one prints paper) in the AC office is set up with a non-personal network connection info and if so, could we use it for the streaming Pi zero2.
Looks like we have 3, though I'm not sure where the 3rd would be.
Thanks for the update about the meeting! I think the office (paper) printer is connected over Ethernet. The office building has a lot of restrictions about enabling Ethernet ports. What I'm pretty sure about is that the AC can get additional UToronto emails that aren't tied to an individual. Just not sure if those emails can be used to sign into the network..
Looks like we have 3, though I'm not sure where the 3rd would be.
Thanks for the update about the meeting! I think the office (paper) printer is connected over Ethernet. The office building has a lot of restrictions about enabling Ethernet ports. What I'm pretty sure about is that the AC can get additional UToronto emails that aren't tied to an individual. Just not sure if those emails can be used to sign into the network..
I will look it up.
I recall giving one Picam assembly to Matthias so he could test image capturing on the battery slurry sample. I’m not sure if the assembly is still at NRC. I think I can 3D print a mount and duplicate the code onto a new Pi Zero 2.
Ah, got it. If you gave one of the mounts to him, then I don't think there are more. Maybe at NRC, I'd need to check with him once he's back from travel.
If you could get the livestream set up, even without the mount yet, that would be great to keep getting more pieces connected. You can cover it with a box or something if needed since it won't be mounted yet.
You could also give it a try with the camera case shown above. Pretty sure that hasn't been used yet, though I don't think it was designed to be attached to a tripod.
Printing something simple sounds find. The main issue is with the nuts and bolts. I'm not sure what we have on hand. Ideally, we'd use the same nuts and bolts as what's from the "Pro Mini Camera Mount".
Thanks for the details! Hmm.. do you want to stick with the old script? Lmk what you think
Yes, it seems to be more promising, but before we make the decision, I would love to deploy the old script on the A1mini again. (Previously it repeatedly has the frozen frame issue.
Thanks for the details! Hmm.. do you want to stick with the old script? Lmk what you think
Yes, it seems to be more promising, but before we make the decision, I would love to deploy the old script on the A1mini again. (Previously it repeatedly has the frozen frame issue.
So far so good except for several broken pipe issues that the script can handle.
(copy comment from the OT2 Prefect issue) @sgbaird Do you have any ideas on the direction that we should work on, regarding the centralized stream monitor or each stream zero2w has its own code to (re)start a new stream every 8 hours.
Ah, right. I forgot that was one of the hang-ups. I hesitantly lean towards the central manager, hosted on an oracle free-tier virtual machine, running 24/7
You could also set that up as an additional Python script / service file that's running on the Zero 2W. Just not sure if that will cause performance issues.
You could also set that up as an additional Python script / service file that's running on the Zero 2W. Just not sure if that will cause performance issues.
If the computing power were an issue, could we set it up within the same device.py code, adding a YouTube API ending current stream and starting a new one (before starting the libcamera and the ffmpeg), and use the crontab to reboot the zero2w every 8 hours.
Thanks! I think we can probably move to having all streams running the old script, and set up a separate device (e.g., RPi 5, cloud virtual machine) to monitor and keep a set of streams alive. Taking the central manager approach may lead to fewer unrecoverable streams like this.
81 hrs is pretty good, considering we'll be restarting every 8 hours, and that other streams running the old script have had a fairly good track record, too.
Thanks! I think we can probably move to having all streams running the old script, and set up a separate device (e.g., RPi 5, cloud virtual machine) to monitor and keep a set of streams alive. Taking the central manager approach may lead to fewer unrecoverable streams like this.
81 hrs is pretty good, considering we'll be restarting every 8 hours, and that other streams running the old script have had a fairly good track record, too.
The API start script will also run on the central manger right?
May need to pay attention to dropped frames more closely. Interestingly, the frames involving the OT-2 being removed from the office were missing (suddenly, the OT-2 disappears, missing the frames where it was being handled/moved). It's possible the power to the camera was removed and then replaced, but it may have also been that the frames were dropped or duplicated, and it would have been difficult to tell otherwise.
I'll probably try to move this to the proper OT-2 monitoring issue or another one (scheduling this as an email reply so it doesn't bother on the weekend).
Get Outlook for Android<https://aka.ms/AAb9ysg>
Activity
[-]Equipment monitoring camera for A1 mini (standalone, separate from toolhead camera)[/-][+]Equipment monitoring camera for A1 mini livestream (standalone, separate from toolhead camera)[/+]sgbaird commentedon Feb 21, 2025
Thanks for all the effort getting the OT-2 livestream set up (and especially all the ground work leading up to it). What's the status on setting up this one?
Jonathan-Woo commentedon Feb 22, 2025
I was busy with the toolhead camera but this should be doable. The only concern is the upload bandwidth if we have to use the Nokia. @Neil-YL any luck with using utoronto wifi?
Neil-YL commentedon Feb 24, 2025
Not yet. Last week the students from Jae's course were using the system actively. I will have a try tomorrow.
sgbaird commentedon Feb 24, 2025
I think it should be straightforward using network manager. Could you remind me - are we running this in headless mode or with a GUI-based OS? If GUI-based, I think the WiFi icon at the top-right will let you do it. If in headless, see https://openflexure.discourse.group/t/connecting-to-wpa2-enterprise-networks-e-g-eduroam-university-settings/1659/2 and https://www.google.com/search?q=connect+to+eduroam+on+raspberry+pi+network+manager (EDIT: latter may not work)
Neil-YL commentedon Feb 24, 2025
Do you think it is possible to SSH to the device once it is connected to UofT/Eduroam network?
sgbaird commentedon Feb 24, 2025
Oh, good point. I'm not sure. In the meantime, if we have trouble with eduroam / UoT, could we reduce the resolution to the lowest reasonable/allowed setting for YouTube, which we could increase later on? (I.e., just to get more pieces connected). Thanks so much for working on all these pieces☺️
Neil-YL commentedon Feb 25, 2025
My plan is to set the streaming python file as auto-started and leave it with UofT network to test the stability. I will test it today.
---Update---
Kinda surprised that I can SSH to Zero2 with the UofT network. I used my UTORAUTH account to log in. Now the OT-2 streaming is via UofT network.
sgbaird commentedon Feb 25, 2025
That's great news! We can try to get a non-personal account set up with it. I need to explore that - there may be someone else at the AC who's done that. Is the one you're talking about the OT-2 stream or the A1 mini stream? If the latter, could you add a link to the stream?
Neil-YL commentedon Feb 25, 2025
I just updated the stream for the OT-2. Do we have another mount for the Picam? (one is used for the OT-2 streaming and one is used for the toolhead cam of the Bambu)
BTW today we had a meeting with Jae and I believe we will move forwards with the Bambu A1 mini for the MO practical.
I am thinking if the printer(I mean the one prints paper) in the AC office is set up with a non-personal network connection info and if so, could we use it for the streaming Pi zero2.
sgbaird commentedon Feb 25, 2025
Looks like we have 3, though I'm not sure where the 3rd would be.
Thanks for the update about the meeting! I think the office (paper) printer is connected over Ethernet. The office building has a lot of restrictions about enabling Ethernet ports. What I'm pretty sure about is that the AC can get additional UToronto emails that aren't tied to an individual. Just not sure if those emails can be used to sign into the network..
Neil-YL commentedon Feb 26, 2025
I will look it up.
I recall giving one Picam assembly to Matthias so he could test image capturing on the battery slurry sample. I’m not sure if the assembly is still at NRC. I think I can 3D print a mount and duplicate the code onto a new Pi Zero 2.
sgbaird commentedon Feb 26, 2025
Ah, got it. If you gave one of the mounts to him, then I don't think there are more. Maybe at NRC, I'd need to check with him once he's back from travel.
If you could get the livestream set up, even without the mount yet, that would be great to keep getting more pieces connected. You can cover it with a box or something if needed since it won't be mounted yet.
You could also give it a try with the camera case shown above. Pretty sure that hasn't been used yet, though I don't think it was designed to be attached to a tripod.
Printing something simple sounds find. The main issue is with the nuts and bolts. I'm not sure what we have on hand. Ideally, we'd use the same nuts and bolts as what's from the "Pro Mini Camera Mount".
88 remaining items
sgbaird commentedon Apr 16, 2025
Thanks for the details! Hmm.. do you want to stick with the old script? Lmk what you think
(Aside, maybe the watchdog timer and other features were overkill for the newer script - may have done more harm than good)
Neil-YL commentedon Apr 16, 2025
Yes, it seems to be more promising, but before we make the decision, I would love to deploy the old script on the A1mini again. (Previously it repeatedly has the frozen frame issue.
sgbaird commentedon Apr 16, 2025
Sounds good!
Neil-YL commentedon Apr 17, 2025
So far so good except for several broken pipe issues that the script can handle.
Neil-YL commentedon Apr 17, 2025
(copy comment from the OT2 Prefect issue)
@sgbaird Do you have any ideas on the direction that we should work on, regarding the centralized stream monitor or each stream zero2w has its own code to (re)start a new stream every 8 hours.
sgbaird commentedon Apr 17, 2025
Ah, right. I forgot that was one of the hang-ups. I hesitantly lean towards the central manager, hosted on an oracle free-tier virtual machine, running 24/7
You could also set that up as an additional Python script / service file that's running on the Zero 2W. Just not sure if that will cause performance issues.
Neil-YL commentedon Apr 17, 2025
If the computing power were an issue, could we set it up within the same device.py code, adding a YouTube API ending current stream and starting a new one (before starting the libcamera and the ffmpeg), and use the crontab to reboot the zero2w every 8 hours.
Neil-YL commentedon Apr 21, 2025
The stream for A1mini, with the old script went down during the long weekend, probably last night?
I will check the logs later.
sgbaird commentedon Apr 22, 2025
Thanks! I think we can probably move to having all streams running the old script, and set up a separate device (e.g., RPi 5, cloud virtual machine) to monitor and keep a set of streams alive. Taking the central manager approach may lead to fewer unrecoverable streams like this.
81 hrs is pretty good, considering we'll be restarting every 8 hours, and that other streams running the old script have had a fairly good track record, too.
Neil-YL commentedon Apr 22, 2025
The API start script will also run on the central manger right?
sgbaird commentedon Apr 22, 2025
I think so? What do you mean by API start script?
Neil-YL commentedon Apr 23, 2025
The 8 hours restart script using the YouTube API. I’ll pivot to this later today.
sgbaird commentedon Apr 23, 2025
Ah, yes. Thanks!
sgbaird commentedon Apr 28, 2025