Can't view webcam remotely


#1

Hi,
I have octopi setup and everything works well locally, but when I am away and I login, I can't view my webcam.

I have setup a noip account and it's been working great. So the way I have it setup is, I have 2 instances on the one pi. I have my Tarantula on port 80, and my Tronxy on port 81, eg, http://sollystevo.hopto.org:81 That gets me to the Tronxy, but like I said I can't see the webcam on either printers.

I have tried http://sollystevo.hopto.org:81/webcam//?action=stream and just /webcam//?action=stream, but nothing seems to work for me.

Any help greatly appeciated


#2

What's with the double / there?

Default should be /webcam/?action=stream as also documented here.


#3

That was a typo on my behalf, sorry. I know what the default is, but it doesn't work for me. The default only works when I access it locally, and only the original instance. So my SD has 3 instances, the first insnace works with the default webcam url, but the other 2 don't. I have the port 5001 and 5002 for instances 2 and 3 respectively. To get the cam to work on these 2 locally I had to use "http://192.168.1.88:8080/?action=stream" and that works for local. Remotely, I use the ports 80 and 81 for instances 2 and 3.


#4

You need to provide some more details on how you've setup your port forwarding, because it sounds like something is off here.

If you just forward from your router to port 80 on your OctoPi instance, the default should work just fine, and it also should work fine locally.

Something's off in your setup there, but to determine what you'll need to share more infos on it.


#5

I'm thinking the same.

I have uploaded a screenshot of my port forwarding setup


#6

I don't know this particular router UI I think, but from the looks of it, I'd guess that you are forwarding from router:80 to 192.168.1.88:5001 and from router:81 to 192.168.1.88:5002. Which doesn't sounds like you are forwarding to individual haproxy instances in front of both OctoPrint and your webcam server(s) but rather individual OctoPrint instances.

What I'd rather suggest is either configuring haproxy with prefix URLs so that you can do something like /tevo to reach the Tevo and /tronxy to reach the TronXY and their individual webcams (via a forward router:80 to 192.168.1.88:80). Or alternatively configure a second haproxy instance on the machine running both OctoPrint instances, listening on e.g. port 81 instead of 80 and having your router forwards be of the form router:80 -> 192.168.1.88:80 and router:81 -> 192.168.1.88:81.

In any case, you won't be able to get remote webcam viewing to run at all unless you put a reverse proxy in front of both OctoPrint and the webcam server which is why OctoPi comes configured this way (btw, for two OctoPi instances, router:80 -> 192.168.1.88:80 and router:81 -> 192.168.1.89:80 would work out of the box).


#7

You calling this issue resolved? because I am watching you print a X end stop right now. :slight_smile:


#8

I got this to work: - http://(ip):8080/?action=stream

The ip is a static ip so that's all good, just not sure why 8080 works, but not the ports I have forwarded. This setup means that if I want both cams on at the same time (for both printers), what port do I choose. I think foosel is right. My port forwarding setup has to be wrong, or not the best at the moment.


#9

Because that's the port the web cam server is running on. OctoPrint does not serve the web cam images, it merely embeds them from mjpeg streamer. OctoPrint runs on port 5000 by default, and mjpeg streamer on port 8080.


#10

That makes sense, thanks


#11

My port forwarding setup is forwarded to port 80, and my phone's IP set to remote manage (access).
I then changed the webcam feed to: my.rout.er.IP/webcam/?action=stream
works great for me