Notifications
Clear all

OctoPi, OctoPrint and MK2  

Page 4 / 5
  RSS
david.b14
(@david-b14)
Honorable Member
Re: OctoPi, OctoPrint and MK2

That is cool. Thanks for the clarification! 😀

Posted : 15/11/2016 9:40 pm
Carsten
(@carsten-2)
Estimable Member
Re: OctoPi, OctoPrint and MK2

Hi,

I am using Octoprint with my two (soon three, guess which) printers. Running multiple instances on different ports.

I now want again to monitor the printers with a camera, I have a IP cam here and that works in Octopi, HOWEVER, I have a problem, when I enter a local IP like 192.168.0.23/stream.cgi or such than I will not have an image when I connect from outside. But if I use a DynDNS provider and enter xyz.dyndns.org/stream.cgi I can't see it from inside my network... Any ideas how to solve this?

Cheers,
Carsten

My Prints: https://www.prusaprinters.org/social/15695-carsten/prints
My Employer: https://make-magazin.de

Posted : 21/11/2016 7:49 pm
david.b14
(@david-b14)
Honorable Member
Re: OctoPi, OctoPrint and MK2

This is one of the pros of AstroPrint and cons of Octoprint ( I am running them both).

I think you have 3 options for remote viewing:

a ) The no hassle way is to setup up a VPN.

b ) Configure your router so that it forwards 2 ports.
- Port for the webapp
- Port for the video feed
See https://github.com/foosel/OctoPrint/wiki/FAQ#i-want-to-access-my-octoprint-installation-from-the-internet-how-do-i-do-that

c ) Put OctoPi in the DMZ zone so it does not need port forwarding

If you have an extra SD card you may want to flash it with the AstroPrint. Doing this you can use the OctoPrint SD card for local printing and viewing. If you need to monitor the print job when off your home network, pop in the AstroPrint SD card.

Posted : 21/11/2016 8:04 pm
Carsten
(@carsten-2)
Estimable Member
Re: OctoPi, OctoPrint and MK2

Thanks @david.b14!

Guess I could have found it in the octoprint docs when knowing what I want/search 🙂

Considering now VPN or maybe haproxy.

Cheers,
Carsten

My Prints: https://www.prusaprinters.org/social/15695-carsten/prints
My Employer: https://make-magazin.de

Posted : 22/11/2016 10:16 am
Carsten
(@carsten-2)
Estimable Member
Re: OctoPi, OctoPrint and MK2

Wow. Struggle...

I use the haproxy route now. That was a quick one, but then I got into the problem that I wanted a dyndns service back after dyndns.org stopped. As one of the working ones no-ip.org was an option because my router supported it. However, this also needs a update all 30 days. But I own a domain at strato.com, so they also provide a dyndns service for subdomains. Easy. But then configure ddclient on my Raspi which hosts my Octoprint... Grmbl... But now it works as it seems...

Carsten

My Prints: https://www.prusaprinters.org/social/15695-carsten/prints
My Employer: https://make-magazin.de

Posted : 22/11/2016 2:36 pm
david.b14
(@david-b14)
Honorable Member
Re: OctoPi, OctoPrint and MK2

Regarding dynamic DNS, a while back ago I was using https://freedns.afraid.org/ .

I liked that it was free and I could update the IP by running a simple curl command which was on a cron job.

Posted : 22/11/2016 9:38 pm
Bomber
(@bomber)
Active Member
Re: OctoPi, OctoPrint and MK2

Hi guys.

Not sure where to go with this, so I thought I'd try this.

I have a freshly built MK2 with a Raspberry Pi 3 running the latest Octopi on a 16gb sd card attached. Everything works great, except the webcam, a Microsoft LifeCam VX-5000, which is listed as a working model. I assumed it would "just work". I get no picture, at all.

I can connect to the Pi at 192.168.0.62 and it connects to my printer. I am assuming there is an issue in "Settings", "Webcam & Timelapse" where I have "Stream URL" as /192.168.0.62/?action=stream and the default "Snapshot URL" populated as http://127.0.0.1:8080/?action=snapshot .

I have scoured the net looking for some code to get it working, to no avail. I know the camera works, as I connected it to a computer to check.

I am not afraid of using Terminal via putty, I just don't know WHAT to do there. If anyone can offer some troubleshooting ideas, I would really appreciate it.

Posted : 29/12/2016 6:00 am
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: OctoPi, OctoPrint and MK2

There is a file on the SD card which may need some edits. It is most easily accessed by a PC from the root of the SD card: octopi.txt

This is where you have to define the camera, image size and framerate. Not all webcams will work with the default settings.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Posted : 29/12/2016 8:31 am
Bomber
(@bomber)
Active Member
Re: OctoPi, OctoPrint and MK2

Thanks, Peter. I have made some adjustments to the octopi.txt file. I used "sudo nano /boot/octopi.txt to edit the file in putty. I removed the # in front of the line "camera="auto" and the line with options (don't remember the line, exactly) camera_usb_options="-r VGA", per this reference: https://github.com/foosel/OctoPrint/wiki/Webcams-known-to-work

It also mentioned to remove the -f command for this camera, so that is the whole line.

Do you think I need to make other or additional changes, specific to this camera?

The camera is recognized when I run lsusb and I can see a bunch of info about it when I run v4l2-ctl --info and v4l2-ctl --list ctrls.

Do you have any additional thoughts in regards to required edits or the "Settings" tab within OctoPrint? I really appreciate any direction you can provide. Thanks!

Posted : 29/12/2016 2:55 pm
christophe.p
(@christophe-p)
Member Moderator
Re: OctoPi, OctoPrint and MK2

Thanks, Peter. I have made some adjustments to the octopi.txt file. I used "sudo nano /boot/octopi.txt to edit the file in putty. I removed the # in front of the line "camera="auto" and the line with options (don't remember the line, exactly) camera_usb_options="-r VGA", per this reference: https://github.com/foosel/OctoPrint/wiki/Webcams-known-to-work

It also mentioned to remove the -f command for this camera, so that is the whole line.

Do you think I need to make other or additional changes, specific to this camera?

The camera is recognized when I run lsusb and I can see a bunch of info about it when I run v4l2-ctl --info and v4l2-ctl --list ctrls.

Do you have any additional thoughts in regards to required edits or the "Settings" tab within OctoPrint? I really appreciate any direction you can provide. Thanks!

If you installed from OctoPi distribution, then haproxy should be configured.

Stream URL should be the relative path: "/webcam/?action=stream" and Snapshot url remains an absolute path as " http://127.0.0.1:8080/?action=snapshot ".

I'm like Jon Snow, I know nothing.

Posted : 29/12/2016 11:09 pm
Bomber
(@bomber)
Active Member
Re: OctoPi, OctoPrint and MK2

I think that's where I'm confused.

If you installed from OctoPi distribution, then haproxy should be configured.

Does haproxy run my camera? I have no knowledge of this program.

Stream URL should be the relative path: "/webcam/?action=stream"

What should I put in place of "webcam"? I have /192.168.0.62/?action=stream in there now, where 192.168.0.62 is the IP address I use to access Octopi. Does the camera have a different IP? If so, how do I identify it?

and Snapshot url remains an absolute path as " http://127.0.0.1:8080/?action=snapshot ".

So I should see the snapshot with that setting? (I get a black screen)

Posted : 30/12/2016 1:48 am
Chris Garrett
(@chris-garrett)
New Member
Re: OctoPi, OctoPrint and MK2

haproxy

haproxy is a reverse proxy - it pulls in webcam images to display on the Octoprint control pages

http://Makerhacks.com
Posted : 30/12/2016 9:50 pm
christophe.p
(@christophe-p)
Member Moderator
Re: OctoPi, OctoPrint and MK2

as told, haproxy is a reverse proxy.

On OctoPi the settings are:
Octoprint listen on port 5000.
webcam stream listen on port 8080
haproxy listen on port 80 and 443 for https

Haproxy redirect http traffic from local (127.0.0.1) port 5000 to port 80 (443 as well but let's that aside) on the RP ip address, and local streaming http traffic from port 8080 to the subfolder /webcam.

The snapshot can be seen on http://127.0.0.1:8080/?action=snapshot or http://127.0.0.1/webcam/?action=snapshot from OctoPrint (local traffic), or http://<IPaddress>:8080/?action=snapshot or http://<IPaddress>/webcam/?action=snapshot from your workstation,

By the way, it's a good practice to use only 127.0.0.1 on OctoPrint configuration, so that this setting remain correct if your DHCP provide another IP address.

I'm like Jon Snow, I know nothing.

Posted : 30/12/2016 11:44 pm
Bomber
(@bomber)
Active Member
Re: OctoPi, OctoPrint and MK2

Thanks for the replies! I am assuming that Octopi "just runs" haproxy at start up, right? How would one check to make sure it is running?

The snapshot can be seen on http://127.0.0.1:8080/?action=snapshot or http://127.0.0.1/webcam/?action=snapshot from OctoPrint (local traffic), or http://<IPaddress>:8080/?action=snapshot or http://<IPaddress>/webcam/?action=snapshot from your workstation,

Assuming this is what I have done, then I would guess that my issue is specific to the Microsoft LifeCam VX-5000, right?

At https://github.com/foosel/OctoPrint/wiki/Webcams-known-to-work the author mentions "Microsoft Lifecam VX-5000 045e: -r VGA Tested on RasPi2. Needed to remove -f parameter to get it working."

How do I check the parameters of my "camera_usb_options"?

Posted : 31/12/2016 3:18 pm
christophe.p
(@christophe-p)
Member Moderator
Re: OctoPi, OctoPrint and MK2

You can run manually mjpg_streamer to test parameters. Connect to your octopi box with putty, user pi password raspberry if you didn't change the default option, go to /home/pi/mjpg_streamer and run

./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so"

and check the output

For more reference, you can refer to https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian

I'm like Jon Snow, I know nothing.

Posted : 31/12/2016 5:20 pm
Bomber
(@bomber)
Active Member
Re: OctoPi, OctoPrint and MK2

Again, thank you so much for your patience! I am running the following and getting an error...This is what is driving me crazy! 😕

pi@octopi:~/mjpg-streamer $ ./mjpg_streamer -i "./input_uvc.so -r 640x480 -f 10 -d /dev/video0" -o "./output_http.so -w ./www"
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 10
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
libv4l2: error setting pixformat: Device or resource busy
Unable to set format: 1196444237 res: 640x480
Init v4L2 failed !! exit fatal
i: init_VideoIn failed

Posted : 01/01/2017 3:39 am
christophe.p
(@christophe-p)
Member Moderator
Re: OctoPi, OctoPrint and MK2

Did you stop octoprint and mjpg-streame first ?

I think it can be done by just stopping octoprint by the shell command:

sudo service octoprint stop

I'm like Jon Snow, I know nothing.

Posted : 01/01/2017 1:15 pm
Bomber
(@bomber)
Active Member
Re: OctoPi, OctoPrint and MK2

Thanks for the suggestion. I was not doing that in prior posts. However, I tried the commands, again, after shutting down the Octoprint service with the same results:


pi@octopi:~/mjpg-streamer $ ./mjpg_streamer -i "./input_uvc.so -r 640x480 -f 5 -d /dev/video0" -o "./output_http.so -w ./www"
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
libv4l2: error setting pixformat: Device or resource busy
Unable to set format: 1196444237 res: 640x480
Init v4L2 failed !! exit fatal
i: init_VideoIn failed

Posted : 02/01/2017 12:52 am
Bonesteel
(@bonesteel)
Active Member
Re: OctoPi, OctoPrint and MK2

Hi All,

I'm new to the forum and have just completed the assembly of my i3 mk2. All is working great, and I am printing out the case recommended for the RPi to support octopi. I am familiar with it from my use with a Printrbot. Once thing I can't seem to find is a really good camera mount for the case. It's possible I missed it in a search, but would appreciate it if someone could recommend the best one to mount the camera on the i3 mk2. TIA.

Posted : 06/01/2017 7:33 pm
Macbeth
(@macbeth)
Active Member
Re: OctoPi, OctoPrint and MK2

Howdi guys, I ordered my MK2 kit (my first 3d printer) a while ago and while I am waiting for it I am busy reading tons of guides and toying around with stuff I have already like my Raspberry.

I got Octoprint up and running, with webcam and all, now just out of curiosity. If I upload gcodes from Scli3r (prusa edition) or from simplify3d with the mk4 Prusa settings, do I have to create any Prusa MK2 settings within Octoprint at all? As far as I understood the gcode has all the information the printer will need.

Posted : 16/01/2017 9:40 pm
Page 4 / 5
Share: