Skip to content

Equipment monitoring camera for A1 mini livestream (standalone, separate from toolhead camera) #161

Open

Description

@sgbaird

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)

Activity

  1. 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
  2. sgbaird commented on Feb 21, 2025

    @sgbaird
    CollaboratorAuthor

    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?

  3. Jonathan-Woo commented on Feb 22, 2025

    @Jonathan-Woo
    Contributor

    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?

  4. Neil-YL commented on Feb 24, 2025

    @Neil-YL
    Contributor

    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.

  5. sgbaird commented on Feb 24, 2025

    @sgbaird
    CollaboratorAuthor

    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)

  6. Neil-YL commented on Feb 24, 2025

    @Neil-YL
    Contributor

    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)

    Do you think it is possible to SSH to the device once it is connected to UofT/Eduroam network?

  7. sgbaird commented on Feb 24, 2025

    @sgbaird
    CollaboratorAuthor

    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 ☺️

  8. Neil-YL commented on Feb 25, 2025

    @Neil-YL
    Contributor

    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.

  9. sgbaird commented on Feb 25, 2025

    @sgbaird
    CollaboratorAuthor

    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?

  10. Neil-YL commented on Feb 25, 2025

    @Neil-YL
    Contributor

    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.

  11. sgbaird commented on Feb 25, 2025

    @sgbaird
    CollaboratorAuthor

    Looks like we have 3, though I'm not sure where the 3rd would be.

    Image

    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..

  12. Neil-YL commented on Feb 26, 2025

    @Neil-YL
    Contributor

    Looks like we have 3, though I'm not sure where the 3rd would be.

    Image

    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.

  13. sgbaird commented on Feb 26, 2025

    @sgbaird
    CollaboratorAuthor

    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".

  14. 88 remaining items

  15. sgbaird commented on Apr 16, 2025

    @sgbaird
    CollaboratorAuthor

    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)

  16. Neil-YL commented on Apr 16, 2025

    @Neil-YL
    Contributor

    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.

  17. sgbaird commented on Apr 16, 2025

    @sgbaird
    CollaboratorAuthor

    Sounds good!

  18. Neil-YL commented on Apr 17, 2025

    @Neil-YL
    Contributor

    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.

  19. Neil-YL commented on Apr 17, 2025

    @Neil-YL
    Contributor

    YT Livestream restarts and auto download workflow

    (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.

  20. sgbaird commented on Apr 17, 2025

    @sgbaird
    CollaboratorAuthor

    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.

  21. Neil-YL commented on Apr 17, 2025

    @Neil-YL
    Contributor

    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.

  22. Neil-YL commented on Apr 21, 2025

    @Neil-YL
    Contributor
    Image Image

    The stream for A1mini, with the old script went down during the long weekend, probably last night?

    I will check the logs later.

  23. sgbaird commented on Apr 22, 2025

    @sgbaird
    CollaboratorAuthor

    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.

  24. Neil-YL commented on Apr 22, 2025

    @Neil-YL
    Contributor

    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?

  25. sgbaird commented on Apr 22, 2025

    @sgbaird
    CollaboratorAuthor

    I think so? What do you mean by API start script?

  26. Neil-YL commented on Apr 23, 2025

    @Neil-YL
    Contributor

    I think so? What do you mean by API start script?

    The 8 hours restart script using the YouTube API. I’ll pivot to this later today.

  27. sgbaird commented on Apr 23, 2025

    @sgbaird
    CollaboratorAuthor

    Ah, yes. Thanks!

  28. sgbaird commented on Apr 28, 2025

    @sgbaird
    CollaboratorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions