Hey all,
Tried searching a bit, but I have everything running with a raspberry pi. The web cam works on the ocotprint side, but can get a picture on the cnc.js side. Its a basic EMEET SmartCam C950 that we had laying around.
I did trying following the setup instructions and have tried both options in cnc.js:
Mostly guessing since I don’t have an instance running right now, but the full URL (like Jeff said) will probably work.
As an example if the IP were 192.168.0.100 then you have port 4080 for OctoPrint
192.168.0.100:4080/
And port 5080 for CNCjs
192.168.0.100:5080/
(basing the above on screen shots in the docs).
That means from the OctoPrint UI, the “webcam/?action=stream” is actually
192.168.0.100:4080/webcam/?action=stream
But when the same address is loaded from within the CNCjs UI, it will resolve to
192.168.0.100:5080/webcam/?action=stream
which doesn’t exist.
If you put the full URL (including 4080) into the CNCjs configuration then it will probably work.
Also by the way nothing prevents you from pointing to another webcam that is hosted by another computer entirely, even an ESP32-cam (I haven’t done this yet but from everything I’ve seen I am pretty confident it should work).
I think the haproxy actually forwards the 192.168.0.100/webcam/ to the webcam port. You don’t want to use the 4080 or the 5080 (FWIW, the camera is on 8080, but skip that too).