Difference between revisions of "3D Printer Cameras"

From Asmbly Wiki
Line 16: Line 16:
 
  sudo service docker start
 
  sudo service docker start
 
  sudo usermod -a -G docker ec2-user
 
  sudo usermod -a -G docker ec2-user
  docker run -d --restart always \
+
  docker run -d --restart=always \
  --name restreamer \
+
  --name restreamer \
  -e "RS_USERNAME=admin" \
+
  -v /home/ec2-user/restreamer/config:/core/config \
  -e "RS_PASSWORD=[REDACTED]" \
+
  -v /home/ec2-user/restreamer/data:/core/data \
  -p 8080:8080 \
+
  -p 80:8080 -p 443:8181 \
  -v /home/ec2-userrestreamer/db:/restreamer/db \
+
  datarhei/restreamer:latest
  datarhei/restreamer:latest
 
  
Then configured the stream using the web interface.
+
Then configured the streams using the web interface. Also set up LetsEncrypt in the Settings.
  
 
To view the stream, you can hit http://restreamer.asmbly.org:8080/cd831f90-1b43-494b-92e2-1407d2779432.html with the appropriate UUID for the camera you want.
 
To view the stream, you can hit http://restreamer.asmbly.org:8080/cd831f90-1b43-494b-92e2-1407d2779432.html with the appropriate UUID for the camera you want.
Line 30: Line 29:
 
=== Todo ===
 
=== Todo ===
  
* Mount a camera for each Prusa printer
+
* ~~Mount a camera for each Prusa printer~~
* Hook up POE switch and run cables nicely
+
* ~~Hook up POE switch~~ and run cables nicely
* Figure out how to embed the restreamer video in wiki pages
+
* ~~Figure out how to embed the restreamer video in wiki pages~~
 
* Figure out what to do about the Bambu. Can we restream the built in camera? Link it directly?
 
* Figure out what to do about the Bambu. Can we restream the built in camera? Link it directly?
 
* Figure out how to overlay status/time remaining data from the printers on the video
 
* Figure out how to overlay status/time remaining data from the printers on the video
 
** Octoprint -> Home Assistant -> MQTT -> Amcrest API to set the watermark???
 
** Octoprint -> Home Assistant -> MQTT -> Amcrest API to set the watermark???

Revision as of 03:59, 2 February 2025


This page is intended for Stewards. To see the camera video, you should visit the Wiki page for the appropriate printer.


We are installing some old Amcrest IP cameras to allow remote monitoring of the 3D printers.

The IP cameras have static IPs on the Asmbly local network, eg. 192.168.0.244

We are making the RTSP stream (TCP and UDP port 554) available to the outside world at shop.asmbly.org:3NNN with NNN matching the IP of the camera, for example you should be able to view a stream using VLC by specifying rtsp://viewer:PASSWORD@shop.asmbly.org:3NNN

Because web browsers don't natively support RTSP streams, we have set up an installation of Restreamer on an AWS EC2 instance that pulls the RTSP streams and makes them available in a web player.

To set up Restreamer we did:

ssh ec2-user@ec2-18-117-124-192.us-east-2.compute.amazonaws.com
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
docker run -d --restart=always  \
  --name restreamer \
  -v /home/ec2-user/restreamer/config:/core/config \
  -v /home/ec2-user/restreamer/data:/core/data \
  -p 80:8080 -p 443:8181 \
  datarhei/restreamer:latest

Then configured the streams using the web interface. Also set up LetsEncrypt in the Settings.

To view the stream, you can hit http://restreamer.asmbly.org:8080/cd831f90-1b43-494b-92e2-1407d2779432.html with the appropriate UUID for the camera you want.

Todo

  • ~~Mount a camera for each Prusa printer~~
  • ~~Hook up POE switch~~ and run cables nicely
  • ~~Figure out how to embed the restreamer video in wiki pages~~
  • Figure out what to do about the Bambu. Can we restream the built in camera? Link it directly?
  • Figure out how to overlay status/time remaining data from the printers on the video
    • Octoprint -> Home Assistant -> MQTT -> Amcrest API to set the watermark???