paukstelis / octoprint_deploy

Bash script for rapid deployment of multiple octoprint instance on a single machine
MIT License
389 stars 39 forks source link

Second Camera #114

Open dillario opened 10 months ago

dillario commented 10 months ago

Hello,

Bildschirmfoto 2023-08-13 um 10 56 23

I made 2 instances for my two printers. But I can't get the second camera to work. Can someone tell me what to enter here? Thanks.

paukstelis commented 10 months ago

octoprint_deploy will automatically fill that, depending on if you used haproxy for cameras.

Please provide the diagnostic output from the Utilities menu.

dillario commented 10 months ago

Thanks. Don't quite understand what I have to do. Can you explain it to me in more Details?

paukstelis commented 10 months ago

sudo octoprint_deploy/octoprint_deploy.sh Select Utilities Select Diagnostic Output Copy and paste the output here.

dillario commented 10 months ago

octoprint_deploy diagnostic information. Please provide ALL output for support h elp


/etc/octoprint_deploy


octoexec: /home/pi/oprint/bin/octoprint octopip: /home/pi/oprint/bin/pip haproxy: true octopi: true streamer: camera-streamer


/etc/octoprint_instances


instance:octoprint port:5000 udev:true instance:MegaS port:5001 udev:true instance:KobraMax port:5002 udev:true


/etc/octoprint_cameras


camera:cam_MegaS port:8001 udev:true camera:cam_KobraMax port:8002 udev:true


/etc/udev/rules.d/99-octoprint.rules


SUBSYSTEM=="tty", ATTRS{serial}=="0001", SYMLINK+="octo_octoprint" SUBSYSTEM=="tty", ATTRS{serial}=="0001", SYMLINK+="octo_MegaS" SUBSYSTEM=="video4linux", ATTRS{serial}=="9A42DA90", ATTR{index}=="0", SYMLINK+= "cam_MegaS" KERNELS=="1-1.1:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_KobraMax" SUBSYSTEM=="video4linux", ATTRS{serial}=="69C4E050", ATTR{index}=="0", SYMLINK+= "cam_KobraMax" lrwxrwxrwx 1 root root 7 Aug 13 09:21 /dev/octo_KobraMax -> ttyUSB1 lrwxrwxrwx 1 root root 7 Aug 13 09:21 /dev/octo_MegaS -> ttyUSB0 lrwxrwxrwx 1 root root 7 Aug 13 09:21 /dev/octo_octoprint -> ttyUSB0 lrwxrwxrwx 1 root root 6 Aug 13 09:21 /dev/cam2_KobraMax -> video2 lrwxrwxrwx 1 root root 6 Aug 13 09:21 /dev/cam_KobraMax -> video2 lrwxrwxrwx 1 root root 6 Aug 13 09:21 /dev/cam_MegaS -> video0


● octoprint.service - The snappy web interface for your 3D printer Loaded: loaded (/etc/systemd/system/octoprint.service; enabled; vendor pres et: enabled) Active: active (running) since Sun 2023-08-13 08:59:27 BST; 4h 44min ago Main PID: 2632 (octoprint) Tasks: 14 (limit: 3135) CPU: 3min 29.772s CGroup: /system.slice/octoprint.service └─2632 /home/pi/oprint/bin/python /home/pi/oprint/bin/octoprint ser ve --host=127.0.0.1 --port=5000

Aug 13 11:14:30 octopi octoprint[2632]: 2023-08-13 11:14:30,789 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 Aug 13 11:29:30 octopi octoprint[2632]: 2023-08-13 11:29:30,790 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 Aug 13 11:44:30 octopi octoprint[2632]: 2023-08-13 11:44:30,791 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 Aug 13 11:59:30 octopi octoprint[2632]: 2023-08-13 11:59:30,792 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 Aug 13 12:14:30 octopi octoprint[2632]: 2023-08-13 12:14:30,793 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 Aug 13 12:29:30 octopi octoprint[2632]: 2023-08-13 12:29:30,795 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 Aug 13 12:44:30 octopi octoprint[2632]: 2023-08-13 12:44:30,796 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 Aug 13 12:59:30 octopi octoprint[2632]: 2023-08-13 12:59:30,797 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 Aug 13 13:14:30 octopi octoprint[2632]: 2023-08-13 13:14:30,798 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 Aug 13 13:29:30 octopi octoprint[2632]: 2023-08-13 13:29:30,800 - octoprint.serv er.heartbeat - INFO - Server heartbeat <3 None None {'bitrate': '10000k', 'cleanTmpAfterDays': 7, 'defaultWebcam': 'classic', 'ffmpeg': None, 'ffmpegCommandline': '{ffmpeg} -framerate {fps} -i "{input}" -vcodec ' '{videocodec} -threads {threads} -b:v {bitrate} -f ' '{containerformat} -y {filters} "{output}"', 'ffmpegThreads': 1, 'ffmpegThumbnailCommandline': '{ffmpeg} -sseof -1 -i "{input}" -update 1 -q:v ' '0.7 "{output}"', 'ffmpegVideoCodec': 'libx264', 'snapshotWebcam': 'classic', 'timelapse': {'fps': 25, 'options': {'capturePostRoll': None, 'interval': None, 'retractionZHop': None}, 'postRoll': 0, 'type': 'off'}, 'timelapseEnabled': True, 'watermark': True, 'webcamEnabled': True}


● MegaS.service - The snappy web interface for your 3D printer Loaded: loaded (/etc/systemd/system/MegaS.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2023-08-13 09:14:21 BST; 4h 30min ago Main PID: 4454 (octoprint) Tasks: 20 (limit: 3135) CPU: 3min 52.079s CGroup: /system.slice/MegaS.service └─4454 /home/pi/oprint/bin/python /home/pi/oprint/bin/octoprint serve --config=/home/pi/.MegaS/config.yaml --basedir=/home/pi/.MegaS --port=5001

Aug 13 12:40:10 octopi octoprint[4454]: 2023-08-13 12:40:10,894 - octoprint.access.users - INFO - Logged in user: dillario Aug 13 12:40:10 octopi octoprint[4454]: 2023-08-13 12:40:10,935 - octoprint.server.util.flask - INFO - Passively logging in user dillario from 78.42.115.215 Aug 13 12:40:10 octopi octoprint[4454]: 2023-08-13 12:40:10,935 - octoprint.access.users - INFO - Logged in user: dillario Aug 13 12:40:10 octopi octoprint[4454]: 2023-08-13 12:40:10,972 - octoprint.server.util.flask - INFO - Passively logging in user dillario from 78.42.115.215 Aug 13 12:40:10 octopi octoprint[4454]: 2023-08-13 12:40:10,972 - octoprint.access.users - INFO - Logged in user: dillario Aug 13 12:44:24 octopi octoprint[4454]: 2023-08-13 12:44:24,818 - octoprint.server.heartbeat - INFO - Server heartbeat <3 Aug 13 12:59:24 octopi octoprint[4454]: 2023-08-13 12:59:24,819 - octoprint.server.heartbeat - INFO - Server heartbeat <3 Aug 13 13:14:24 octopi octoprint[4454]: 2023-08-13 13:14:24,820 - octoprint.server.heartbeat - INFO - Server heartbeat <3 Aug 13 13:29:24 octopi octoprint[4454]: 2023-08-13 13:29:24,821 - octoprint.server.heartbeat - INFO - Server heartbeat <3 Aug 13 13:44:24 octopi octoprint[4454]: 2023-08-13 13:44:24,823 - octoprint.server.heartbeat - INFO - Server heartbeat <3 None None {'bitrate': '10000k', 'cleanTmpAfterDays': 7, 'defaultWebcam': 'classic', 'ffmpeg': None, 'ffmpegCommandline': '{ffmpeg} -framerate {fps} -i "{input}" -vcodec ' '{videocodec} -threads {threads} -b:v {bitrate} -f ' '{containerformat} -y {filters} "{output}"', 'ffmpegThreads': 1, 'ffmpegThumbnailCommandline': '{ffmpeg} -sseof -1 -i "{input}" -update 1 -q:v ' '0.7 "{output}"', 'ffmpegVideoCodec': 'libx264', 'snapshotWebcam': 'classic', 'timelapse': {'fps': 25, 'options': {'capturePostRoll': None, 'interval': None, 'retractionZHop': None}, 'postRoll': 0, 'type': 'off'}, 'timelapseEnabled': True, 'watermark': True, 'webcamEnabled': True}


● KobraMax.service - The snappy web interface for your 3D printer Loaded: loaded (/etc/systemd/system/KobraMax.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2023-08-13 09:18:58 BST; 4h 25min ago Main PID: 4869 (octoprint) Tasks: 20 (limit: 3135) CPU: 9min 11.368s CGroup: /system.slice/KobraMax.service └─4869 /home/pi/oprint/bin/python /home/pi/oprint/bin/octoprint serve --config=/home/pi/.KobraMax/config.yaml --basedir=/home/pi/.KobraMax --port=5002

Aug 13 12:40:19 octopi octoprint[4869]: 2023-08-13 12:40:19,099 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid Aug 13 12:49:02 octopi octoprint[4869]: 2023-08-13 12:49:02,464 - octoprint.server.heartbeat - INFO - Server heartbeat <3 Aug 13 12:57:07 octopi octoprint[4869]: 2023-08-13 12:57:07,452 - octoprint.server.util.sockjs - INFO - Client connection closed: ::ffff:78.42.115.215 Aug 13 13:04:02 octopi octoprint[4869]: 2023-08-13 13:04:02,465 - octoprint.server.heartbeat - INFO - Server heartbeat <3 Aug 13 13:19:02 octopi octoprint[4869]: 2023-08-13 13:19:02,466 - octoprint.server.heartbeat - INFO - Server heartbeat <3 Aug 13 13:34:02 octopi octoprint[4869]: 2023-08-13 13:34:02,467 - octoprint.server.heartbeat - INFO - Server heartbeat <3 Aug 13 13:34:56 octopi octoprint[4869]: 2023-08-13 13:34:56,750 - octoprint.util.comm - INFO - Finished in 3278.808 s. Aug 13 13:34:56 octopi octoprint[4869]: 2023-08-13 13:34:56,751 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Finishing" Aug 13 13:34:56 octopi octoprint[4869]: 2023-08-13 13:34:56,762 - octoprint.printer.standard.job - INFO - Print job done - origin: local, path: AC_xyzCalibration_cube.gcode, owner: dillario Aug 13 13:34:56 octopi octoprint[4869]: 2023-08-13 13:34:56,810 - octoprint.util.comm - INFO - Changing monitoring state from "Finishing" to "Operational" None None {'bitrate': '10000k', 'cleanTmpAfterDays': 7, 'defaultWebcam': 'classic', 'ffmpeg': None, 'ffmpegCommandline': '{ffmpeg} -framerate {fps} -i "{input}" -vcodec ' '{videocodec} -threads {threads} -b:v {bitrate} -f ' '{containerformat} -y {filters} "{output}"', 'ffmpegThreads': 1, 'ffmpegThumbnailCommandline': '{ffmpeg} -sseof -1 -i "{input}" -update 1 -q:v ' '0.7 "{output}"', 'ffmpegVideoCodec': 'libx264', 'snapshotWebcam': 'classic', 'timelapse': {'fps': 25, 'options': {'capturePostRoll': None, 'interval': None, 'retractionZHop': None}, 'postRoll': 0, 'type': 'off'}, 'timelapseEnabled': True, 'watermark': True, 'webcamEnabled': True}


Unit cam_MegaS.service could not be found.


Unit cam_KobraMax.service could not be found.


● haproxy.service - HAProxy Load Balancer Loaded: loaded (/lib/systemd/system/haproxy.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2023-08-13 09:25:29 BST; 4h 19min ago Docs: man:haproxy(1) file:/usr/share/doc/haproxy/configuration.txt.gz Process: 5504 ExecStartPre=/usr/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS (code=exited, status=0/SUCCESS) Main PID: 5506 (haproxy) Tasks: 5 (limit: 3135) CPU: 46.690s CGroup: /system.slice/haproxy.service ├─5506 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -S /run/haproxy-master.sock └─5508 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -S /run/haproxy-master.sock

Aug 13 12:40:11 octopi haproxy[5508]: ::ffff:78.42.115.215:52464 [13/Aug/2023:12:40:11.411] public KobraMax/octoprint1 0/0/0/83/94 200 274965 - - ---- 7/7/2/2/0 0/0 "GET /KobraMax/plugin/gcodeviewer/static/js/lib/pako.js HTTP/1.1" Aug 13 12:40:11 octopi haproxy[5508]: ::ffff:78.42.115.215:52463 [13/Aug/2023:12:40:11.453] public KobraMax/octoprint1 0/0/0/64/64 200 28611 - - ---- 7/7/1/1/0 0/0 "GET /KobraMax/static/img/graph-background.png HTTP/1.1" Aug 13 12:40:18 octopi haproxy[5508]: ::ffff:78.42.115.215:52459 [13/Aug/2023:12:40:17.915] public KobraMax/octoprint1 0/0/0/131/131 204 883 - - ---- 7/7/1/1/0 0/0 "POST /KobraMax/api/job HTTP/1.1" Aug 13 12:45:41 octopi haproxy[5508]: ::ffff:192.168.178.25:44668 [13/Aug/2023:12:45:41.737] public octoprint/octoprint1 0/0/0/29/29 200 937 - - ---- 2/2/0/0/0 0/0 "GET /plugin/discovery/discovery.xml HTTP/1.1" Aug 13 12:52:04 octopi haproxy[5508]: ::ffff:51.15.252.227:40344 [13/Aug/2023:12:52:04.974] public octoprint/octoprint1 0/0/0/7/7 405 324 - - ---- 2/2/0/0/0 0/0 "CONNECT google.com:443 HTTP/1.1" Aug 13 12:57:07 octopi haproxy[5508]: ::ffff:78.42.115.215:52462 [13/Aug/2023:12:40:10.082] public KobraMax/octoprint1 0/0/0/3/1017363 101 116226 - - CD-- 1/1/0/0/0 0/0 "GET /KobraMax/sockjs/873/hcbkkwyd/websocket HTTP/1.1" Aug 13 13:05:54 octopi haproxy[5508]: ::ffff:85.72.70.3:57929 [13/Aug/2023:13:05:52.703] public octoprint/octoprint1 0/0/1/1063/1320 200 31512 - - CD-- 1/1/0/0/0 0/0 "GET / HTTP/1.0" Aug 13 13:14:44 octopi haproxy[5508]: ::ffff:192.168.178.39:45358 [13/Aug/2023:13:14:44.125] public octoprint/octoprint1 0/0/0/26/26 200 937 - - ---- 1/1/0/0/0 0/0 "GET /plugin/discovery/discovery.xml HTTP/1.1" Aug 13 13:35:26 octopi haproxy[5508]: ::ffff:192.168.178.30:36490 [13/Aug/2023:13:35:26.318] public octoprint/octoprint1 0/0/0/28/28 200 937 - - ---- 1/1/0/0/0 0/0 "GET /plugin/discovery/discovery.xml HTTP/1.1" Aug 13 13:36:21 octopi haproxy[5508]: ::ffff:192.168.178.42:42627 [13/Aug/2023:13:36:21.204] public octoprint/octoprint1 0/0/1/16/17 200 937 - - ---- 1/1/0/0/0 0/0 "GET /plugin/discovery/discovery.xml HTTP/1.1"

paukstelis commented 10 months ago

You are using OctoPi, so setting up cameras must be done manually, not with octoprint_deploy (unless you change the streamer to ustreamer). You can do this from the utility menu. I would remove all cameras, change to ustreamer, then go through the camera setup process again.

dillario commented 10 months ago

OK. Thanks. And how do I enter the link then? Can you send me an example link how to enter the link?

paukstelis commented 10 months ago

octoprint_deploy will do it for you

dillario commented 10 months ago

Thank you so much.

dillario commented 10 months ago

One more question. Can I change the resolution of the camera afterwards?

paukstelis commented 10 months ago

One more question. Can I change the resolution of the camera afterwards?

Yes. You must modify the service files (/etc/systemd/system/cam_instancename.service)