Remote Surveillance of 3d printers

I would like to initiate structured discussions on the remote Surveillance of 3d printers.

The purpose of this post is not evaluate the feasibility or merits of setting up a streaming process for print surveillance, but rather to gain technical knowledge about how something like this is set up.

To ensure that this post effectively and efficiently communicates such processes , I would encourage everyone to refrain from referencing,addressing, or criticizing the ideas of others. Instead, this thread welcomes standalone self contained solutions.

Feel free to evolve and develop your ideas or to develop detailed alternative solutions to those that you see. Ask questions, post solutions not problems.

Lets try to keep this thread positive and productive.

3 Likes

Take a beaglebone black and a USB webcam, plug them in, install mjpeg-streamer, and distribute the link to the stream. Itā€™s extremely easy, requires only a minimal understanding of basic Linux administration, and is decently cheap.

The only problem is getting people to actually _do_ it. That said, Iā€™ll step up to the plate. If the committee can supply me with the USB webcams, beaglebone blacks, 5v power supplies, and an ethernet switch, Iā€™ll set the whole thing up. Of course, if any of these things are already there, even better (itā€™s my understanding that there are already cameras of some sort inside (some of?) the printers).

1 Like

Set up a streaming channel on a streaming service like twitch. One for each printer. Lefty, righty, far Lefty, far Righty. Users would log onto each channel to either check on their prints or to learn about the state of the printers in general. The solution requires a machine to drive the streaming process. The laptops that print can also be laptops that stream.

Iā€™ve been working on this, and there is already a PC dedicated to be the host. Iā€™m having problems with it recognizing more than two webcams at any given time, so Iā€™ve been thinking of going a different route. Currently, the webcams should be plugged into each laptop (instead of all connected to the host PC, how they had been) for testing.

Ultimately, I plan on having a webpage that can be checked remotely that will have 320x240 ā€œstreamā€ for each webcam, plus the scheduling page, all embedded on the one page.

Iā€™m almost considering going with OctoPi to be able to not only monitor the webcams, but also the progress of the print job (which would have the added bonus of not having to deal with the laptops anymoreā€¦ smiles).

I will probably set up Far Righty on OctoPi one evening this coming week - using their ā€˜out of the boxā€™ configuration. If it works well, I would like to try extending the capabilities to log the jobs for troubleshooting and usage/statistical purposesā€¦

Donā€™t forget the meeting next weekend! We can discuss it further at that time. Note regarding the meetingā€¦ it will be held via Google Hangoutsā€¦ Anyone can ask to be added to the hangout to participate in the discussion during the meeting; but only active DMS members who have joined the 3D Fab Committee will be able to vote for the committee Chairā€¦ Please see the post regarding the meeting for more details, and post any questions you have about the meeting on that thread. :wink: THANKS! :slight_smile:

1 Like

Please noteā€¦ This will not change the fact that we prefer anyone using the printers remain on site at the 'Space so you can quickly intervene if your print fails for any reason. The wiki is out of date, but will be updated before the meeting next weekend to help new members be able to locate current information easier. Thanks! :slight_smile:

I dont think the laptops can handle live streaming and printing at the same time. if they can it may be at the cost of print quality

1 Like

Agreed. I do have them plugged into the laptops right now to test something a few days ago; but it didnā€™t work the way I wantedā€¦ Iā€™ll pick up a raspberry pi and test the OctoPi in a day or so. Itā€™s a pre-config version of OctoPrint that already has webcam support configured to just work. Iā€™ve got some concerns about using OctoPrint in general based on what happened when William tried once upon a time at the old Space (members kept unhooking the RasPi last time - not even giving it a chance; but I believe it should go smoother this time - since the laptops wonā€™t be nearby to use insteadā€¦)

1 Like

Find the pronterface text log file. Build an elk stack or install Splunk (free version, we will not have gigs of logs) Install log monitoring agents on the print PC. Setup alerts and an alerting method (text, email, klaxon) for all stop messages. Ask Ed and team to re-enable some debug messages that indicate under reported problems.

Video is an interesting option, but as a form of data and monitoring method, it would be immeasurably enhanced by text. Collecting all the log data would allow for analytics, such as ā€œwhich printer gets used most?ā€, ā€œhow many hours/meters of filament are on this printer, and when does it need preventive maintenance next?ā€, ā€œwhich printer is glitching most often, and what are the error messages?ā€ And so forth.

1 Like

Octoprint would be great. Re-training will be required just like ninjaflex. I think the raspberry piā€™s could be mounted to the back of the printers so that people wont be randomly unplugging cables.

Octoprint also has permissions so you can log in to print something or just observe as guest. It might be a good way to have access logs. But I know a few members probably wonā€™t agree with this process.

I have two raspberry pis that richard Bauman gave me specifically for this purpose I can setup with octoprint to test this as well.

1 Like

I would suggest avoiding a solution that requires retraining everyone using the printers. That would add up to rather a LOT of time for everyone involved, and as noted above, the webcam side of the problem can be a stand alone function without changing basic operations.

1 Like

There is a great little Linux webcam program called MOTION. Not only will it record motion from webcams if you set it that way, it also has a built in web server so that you can view the cameras remotely.

1 Like

This is a fundamental limitation of USB. One or two cameras will saturate the bus, and thereā€™s no remaining bandwidth for any other peripherals. Thatā€™s why I suggested using beaglebones for the streaming.

1 Like

Sean (@zootboy)ā€¦ I had read that and have tried various ā€œwork-aroundsā€ others reported to have working (including making sure the images are 320x240 to minimize the effect on the USB bandwidth)ā€¦ Unfortunately, none have worked so far.

Paul (@paulstaf)ā€¦ Thanks for the info. I believe thatā€™s what we (the 'Space) used to use for the laser camera image. I donā€™t remember the reasons for not setting it up like that again; but, yeahā€¦ it seemed to work for what it was configured to do before.

Todd (@tmc4242)ā€¦ I would not ā€œrequireā€ everyone go through training again; but, rather encourage anyone who is not confident in what to do to ask. Thereā€™s almost always someone around who knows how to use the printers, plus we have this TALK forum, as well as the unofficial 3D Fab Google Hangout that is always openā€¦ (If you - or anyone else - wants to join the unofficial chat / hangout - just lemme know which Google account to add 'n Iā€™ll get 'er doneā€¦ smiles).
Not to mention, I will try it on ONE printer to start with - just to see how it goesā€¦ The basics of the GUI (graphical user interface) are similar enough, I wouldnā€™t expect too much trouble figuring out how to use Octoprint - if we do end up going that route. My primary focus is getting the darned webcams up and running; however, if we are going to spend time and money on a solution - it might as well be able to include other functions, too. :wink: :slight_smile:

Mitch (@themitch22)ā€¦ Thanks for the offer! I ā€œmayā€ take you up on setting up OctoPi using one of the RaspberryPis that Richard (@RichardPB) donated. Hold off a bit if you would though, as Iā€™m almost tempted to go with a BeagleBone Black solution - now that Sean has mentioned itā€¦

Michael (@MichaelPursifull)ā€¦ Thanks for the response; and, I agree that data would be nice! However, Svejk (@Svejk) created this thread specifically to discuss remote surveillance of the 3D printers - which is something Iā€™ve been trying to work on for a while now myself. That being said, if we can get a BBB or RasPi configured to work with the webcams we have and logging - then we can certainly look into that.
First things first thoughā€¦ and, thatā€™s working on getting the cameras up and streaming! :smile:
Iā€™m sure everyone has their own reasons to have the webcams enabled. My reasons include the following:

  1. Allow members to be able to view their prints from other rooms at the 'Space - so they donā€™t have to physically walk over to them to check on them as often.
  2. Allow members to be able to view current activity on the printers remotely, so they can have an idea of which printers are currently being used, etcā€¦ to check on current availability - AT THAT MOMENT (since prints can fail, be cancelled, etcā€¦ at any time, there is no way to guarantee the status of the print would not change quickly; but, it can still help get an idea of how busy the printers are at the momentā€¦)
  3. Share the streams on social media to let others who have never seen (and may not even be familiar with the concept of) 3D printers - to see them in ā€˜actionā€™; and, possibly encourage visitors to come check them out in person.

All that being saidā€¦ I had mentioned considering using the OctoPi on a Raspberry Pi - because it was preconfigured, reported to work well, and seemed to be the easiest way to get 'em going! I hadnā€™t specifically looked into using BeagleBone Blacks - basically because Iā€™ve never used one! :wink:
However, after reading Seanā€™s comments where heā€™s mentioned it a couple times, I did some research and it seems that while the Raspberry Pi solution would likely work, that the BBB may prove to be better - being a more powerful microcomputerā€¦ My research (NOT experience - so be gentle if Iā€™m wrong) seems to show that on almost most fronts the BBB is a more robust system - with the exception of the RasPi - which seems to do better with Graphicsā€¦ Since I plan on running the images as such a low resolution anyway, the benefit of better graphics in a RasPi would be lost, over the more powerful system in the BBBā€¦ I realize there is a new version of RasPi; but, Iā€™d still like to look into BBB at this pointā€¦ What do yā€™all think? Raspberry Pi or BeagleBone Black? If you have a strong opinion on one over the other, please give us an idea of your experience with both, and why you prefer one strongly over the other. [NOTE: The price of both is so similar, letā€™s not bring that into it, pleaseā€¦ Thx! :slight_smile: ]

I think the new RPi2 is most powerful of the lot. It has a quad core ARM of some flavor and perhaps a 5th processor for graphics. ( from memory - verify. ) And itā€™s $35 ( plus card, case, and powerā€¦ ). BBB is considerably more, especially if we eventually want several.

1 Like

BTW, the simple solution for not being able to get more than two webcams to work is to use such a cheap computer you go one webcam per computer. ā€œThrow more processors at itā€ has really gotten a LOT easier in the last few years. It would even be pretty reasonable to have 2 Rpi2ā€™s per machine. One for the webcam and a separate one for Octoprint if we need that.

Also, BBB, while it is VERY slick, has had some production problems. Not sure if theyā€™ve bounced back from that yet. RPi2 is being cranked out at 80,000 units per month last I heard.

I guess I failed to communicate the core concept that I was trying to share. Remote surveillance != streaming video. Near-real time central text log/event processing is about as high fidelity as you can get for remote surveillance. The printer will usually tell you in reasonably plain terms that it has a problem - for several major issues that are very difficult to see in typical webcam video. And it can tell you a lot faster with an exception-based alerting than with the random seek nature of video stream end-user spot checks.

Lisa - The Rasberry Pi 2 will only handle one of the RPi cameras. If the current cameras are USB cameras it might handle more but you would lose a lot of the benefit of the onboard graphics processor. The onboard graphic processor allows on the fly compression that might make a higher resolution picture possible. I have a RPi with a camera that transmits video on a web page if you would like to look at that option.

Russell Ward

Speaking of the simple solution, if itā€™s an IP camera we want, why add the expense and support issues of adding a host and cobbled software? Surely there are many semi-decent ip cams already out there for a similar cost to what is required to drive then via Raspi? Of course science experiments are fun, but only if that is expressly part of the goal and spirit.

1 Like

Todd (@tmc4242)ā€¦
Currently of the two, the new RasPi 2 is the more powerfulā€¦
Hereā€™s BeagleBoardā€™s take on people comparing it: http://beagleboard.org/blog/2015-02-05-raspberry-pi-2 :wink:

The price - even though the BBB revC cost more than the previous versions - is still not a huge factor, when you take into consideration of buying the card 'n whatnot. Iā€™ll do more research to see if there are charts actually comparing the RasPi2 and BBBrevCā€¦

As far as more computers or doubling up on microcomputers per printer, we have a very real limitation when it comes to available power outlets in the office areas at the 'Space. Iā€™ve requested more power be provided; but, until itā€™s been approved and I see shiny new outlets, Iā€™m going to say we really shouldnā€™t be adding more things to plug in.

Very good point on production. Thanks!

Iā€™d like to get more opinions, examples, etc from yā€™all, pleaseā€¦ Iā€™d like to make the best informed decision possible. :wink: :slight_smile:

Michael (@MichaelPursifull)ā€¦ You didnā€™t fail in communicating what you were saying. Svejk (@Svejk), the OP of this thread, actually mentioned ā€œstreamingā€ in the original message; but, one of my goals has been to get the webcams configured and streaming - as I mentioned above. As I mentioned, I would like to look into logging data for review/analytics at some point; but, itā€™s not the primary focus of this thread. After we get the webcams running, you will be more than welcome to write up some scripts to gather the data and form it into information the rest of us can easily understand. Thanks! :smile:

Russell (@Gimli)ā€¦ Iā€™m not sure if Iā€™m mis-understanding you and/or you are mis-understanding meā€¦ (perhaps a little bit of both?). I would not try to put more than one webcam on a single Raspberry Pi. I would set one webcam up (with RasPi / BBB / etcā€¦) and test it. If the solution works, I would purchase an additional microcomputer for each webcam. It would be a ā€œbonusā€ if the hardware we use can also handle Octoprint and/or data-collection, etcā€¦ :slight_smile:

As far as the resolution, the lower resolution is preferable for what weā€™d be doing anywayā€¦ Even if the image is only updated by motion activation (most likely - because why have duplicates of the same image when a printer is not being usedā€¦), we will still be ā€˜streamingā€™ from at least four webcams in the immediate future, so thereā€™s bandwidth (and server space) to considerā€¦
Itā€™d be kewl to see what you have set up! I was originally going to go with YawCam for various reasons; but, since Iā€™m having a hard time getting that to work (lol?), I may need to look at alternates to how I end up getting the streams configured for the World Wide Web! :wink: :slight_smile: :slight_smile:

Michaelā€¦ We already have webcams attached to each PolyPrinter (they come with the printers), so we will be using those. I am open to suggestions on what type of host we use though (the two options Iā€™ve tried wonā€™t work, so I really do appreciate ALL input regarding this! :slight_smile: )

There were two other systems that came up in my searches earlierā€¦ Iā€™ll check my history in a few. :wink:
Iā€™m not at all familiar with them, so I didnā€™t mention them. I guess it doesnā€™t hurt to mention them though, huh? :wink: :slight_smile:

Here is a page that popped up several times (using various keywords):


I donā€™t believe Iā€™ve ever heard of the Intel Edison; but, the benchmarks are impressive! :wink: (of course, over twice the price of the RasPi; but, looks good on the charts! :slight_smile: )

Hereā€™s another one that popped up twiceā€¦ Itā€™s an older article (almost a year old); but, brings the pcDuino into the mix:
http://www.onemansanthology.com/blog/pcduino-vs-beaglebone-black-vs-raspberry-pi

I really know nothing about this - other than it was mentioned on a previous TALK thread and itā€™s got a (OOOOH SHINY!!!) Touch Screen option! Neat! (but againā€¦ thatā€™s all I know, I havenā€™t popped it into a search to find comparisons specifically - as I was focused more on hardware Iā€™ve heard of beforeā€¦):

Here is a much older comparison page (from 2013)ā€¦ Just adding it because it has a lot of things on it - that might strike a memory to prompt other potential solutions. :wink:
http://www.cooking-hacks.com/blog/new-linux-embedded-devices-comparison-arduino-beagleboard-rascal-raspberry-pi-cubieboard-and-pcduino

Thanks again, yā€™all!
:smile: