OctoPi and SecuritySpy
  • I have read though a few Raspberry Pi related threads but am not having any luck with my issue so here goes....

    I have a 3D Printer (Creality Ender 3 - get one, they are brilliant!) and control it via Octoprint on a Raspberry Pi. I would like to add the camera feed to my SS setup so I can view everything in one place, SS sees the Pi as 'Octoprint Instance on Octopi' under Bonjour but I cannot work out how to get a feed from it, is this even possible? Threads I have seen here state that the Pi does not send a suitable feed but then there is also mention that the feed can be viewed in VLC so therefore there should be some way for SS to interpret it, also the feed from the Pi can be viewed in a web browser.

    So, any way of getting it to work - I saw mention of a program called Motion but I guess that is for standalone camera setups on the Pi, and wouldn't be able to be running in my Octoprint image.
  • Yes, this is possible and others have got this to work in various ways. A good place to start is our blog post on the subject: Raspberry Pi Camera to SecuritySpy.
  • I did try to make sense of that before posting but as far as I can work out that relates to making a camera feed from a pi as a standalone unit, I am not sure how I would be able to integrate what is being described there with the instance of octoprint that is running - is this possible?
  • I'm interested in doing the same on a Prusa MK3. It looks like one must install and activate a streaming daemon on the Pi.

    See https://github.com/ntoff/mjpeg-streamer-octoprint-daemon

    Possibly a streamer is already in Octoprint (or at least a distro can be built with it)
    see https://github.com/guysoft/OctoPi/
    where a distro of Octoprint including the video streaming daemon is maintained. I think one could use that Octoprint distro to make this work. The author there says....

    If a USB webcam or the Raspberry Pi camera is detected, MJPG-streamer will be started automatically as webcam server. OctoPrint on OctoPi ships with correctly configured stream and snapshot URLs pointing at it. If necessary, you can reach it under http://octopi.local/webcam/?action=stream and SSL respectively, or directly on its configured port 8080: http://octopi.local:8080/?action=stream.
  • On the other hand, is it really THAT great to have a Pi handling the video CPU load? I could just use one of my "retired" IP cams to do the job.

    The Prusa MK3 has an integrated mount on its EINSY board for a Pi Zero W. It's meant strictly for Octoprint and the Pi Zero W doesn't have enough oomph to do both Octoprint and stream video. To do both Octoprint and stream a Pi camera means I would need to use an external Pi 3 via USB.

    Once I get to the point of an external PI 3 install instead of an integrated Pi Zero W, I might as well just grab one of my old IP cams and have easy Security Spy integration.
    No time lapse in Octoprint going down that route though.
  • I tried using the http://octopi.local:8080/?action=stream in SS to no avail but I am pretty crap at getting cameras set up so that isn't surprising!

    I currently use a 3B+ for octoprint, and of course the ideal is to get everything running as simply as possible so that would be the best solution, to have SS communicate with that, but I do have a Zero W lying around spare so I could rig that up as a dedicated camera I think given the info in the blog post - however, I don't have a camera lead for the zero and since marlins has shut have no way of getting one that doesn't involve postage and a wait...

    Currently I have one of my old IP cams sitting in front of the printer which isn't ideal but at least it lets me see when the spaghetti monster strikes and decides to print a birds nest again...
  • http://octopi.local:8080/?action=stream
    (with your octopi's IP address in place of octopi.local)

    Does that give you a stream in a web browser?
    If yes, then your distro has MJPG-streamer.

    If no, then I think you need to switch to a distro that has the streamer, or add the MJPG-streamer.

    That distro at guysoft has the streamer already built in. At least that should avoid the need to mess about with installing packages.

    I'm hesitant because I'm on the PrusaPrint fork of Octoprint and would need to figure out how to add the MJPG-streamer. I guess I could migrate the PrusaPrint presets into a generic OctoPrint.
  • something pretty odd seems to be happening - I have tried with two different cameras and different distress of octopi, including the one linked to, and even though I check and it says the camera is enabled it throws an error, firmware has been updated, m all libraries are updated, everything is set up right in config.txt but it still doesn't work!
  • Got it working in Security Spy and a fresh Octopi distro.

    The missing element was specifying the port in Security Spy for the video stream.

    Let's assume your Pi is running the Octopi distro and is at IP address
    (obviously replace with your pi's actual IP address when actually testing)

    First, verify that your pi is currently streaming mjpeg video by pointing a browser at

    You will see your video in your browser window.

    In your SS Cameras pane, add a network camera with the following settings and you should see the video in SS ...

    HTTP port: 8080
    Profile: Manual configuration
    Format: HTTP (video only)
    Request: ?action=stream

    CAUTION: the mjpeg streamer in Octopi distro has NO security. Anyone with access to your network can view the stream.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!