Streaming camera, gcode, more requests

I have not seen the source, but I do understand Astroprint is built on Octoprint’s foundation.
Octoprint uses mjpeg-streamer for its camera, and it is very simple to install. I have it installed on my astrobox now, but I have to shut down mjpeg-streamer in order to use the functions built into the astroprint page due to them both trying to use the same device. Octoprint has a very nice ability to start stop a stream and this seems very easy to implement. Having a stream (with start stop function) and a timelapse would be a very nice feature. We are halfway there.

I would like to see a gcode terminal in astrobox. I don’t care if its a javascript alert and a redirect to elephant porn, as long as my gcode gets executed. This is huge. This would almost remove any necessity to need to plug into the printer with a cord.

I would also like to see an option for adding your own buttons that can execute custom GCODE. Having a customizable almost macro like functionality would allow for quicker calibrations. Example: make buttons for x, y, z, o at custom heights then only need to step down a mm to complete the paper test. Or a button to enable quick restoring of EEPROM. Endless possibilities.

I would like to see a reboot option added to the power off button.

I would also like to see the ability to select multiple prints and delete them all faster.

I would also like to have the ability to view the camera when I am connected to the printer locally. Not all of us can have our printer laying on the kitchen table where we can always see it. Well I did but after 2 months of nagging from the other half about filament strings and not being able to eat at the table and such, I had to move it. It really doesn’t look as good anywhere else.

As I have already requested, the ability to save advanced cura/slic3r settings (preferably with each quality selections -> draft/normal/fine.

I will stop there. Thank you.

P.S. buy Astoprint.com so I can get redirected every time I fail at typing.

1 Like

I think you could upload custom gcode and save it in your print file list. Like it is a print object, but only contains the command to move your printer as you are describing. I believe Daniel mentioned a while back that they would be setting up the custom user scripts/buttons in the future. But it cod use a termknal mode to manually control movements or change eprom setting in the printer.
I use a remote ssh client & shell account on the astrobox. I can run maintenance like apt-get update, apt-get upgrade and sudo reboot. Really no trouble running the astroprint gui in a browser while tooling around in a remote shell account at the same time.(same address) It will be nice to have user scripts/buttons, make astroprint really configurable, but I do prefer the control the command line gives you. (we could customize it ourselves instead of requesting features added… :slight_smile: )
The shutdown option doesn’t help much if you are printing remotely and need to reboot to start fresh. A reboot button could help clear up problems for a remote print problem.
Since we are suggesting features… How about multiple sessions of astroprint/printers on a single pcduino? So many resources going to waste.
Ed

I just tried that… It works ok, and then it doesn’t. As in, it moved my hotend to where I wanted it, and then it triggered the “After Print” gcode, which just moved my hotend back to X0 Y0 (my gcode was to move the hotend to X95 Y95 Z5)

So unless you have a blank post-print gcode section, it sadly won’t work.

EDIT: I stand corrected! I just went to the post-printing gcode, and it is not the code that executes! I’ll start a new topic about that though.

Not too familiar with gcode, but I would assume you could issue a stop command (or pause) M0 or M1 After you finished this specific move. If that did not do it, you could issue an Emergency Stop M112 that would terminate any further gcode commands In the current file.
Is the final command a home X and y command? If that is the case, I am sure there is a way to change your home position to the coordinates you want. Look into how the delta printers home it’s extruder to the center of the bed if that is similar to what you are trying to do.
ED.

I ofc use ssh a lot. I am just one of those people who live in the command window. My debian server has two windows open at all times spanning across 2 monitors, my phone has 2 or more juicessh windows always open (which sucks when you leave wifi to switch to cell bands) my windows tablet has putty going, my debian laptop has nothing but shell windows open, and my fish tank always has a window open on its monitor of current stats along with its gui. However, being well versed in the linux world means most of my day to day things are automated so not many reasons to connect to a 3d printer, i have it taking care of itself.
However I was at work today and wanted to check the camera on my printer after the print was done. My camera was failing to appear. I fought with my vpn for a while trying to figure it out and it wouldnt reconnect to astroprint.com for viewing. My ssh connection wouldnt stick. I connected to my router and threw the printer offline. It reconnected and i had web access. Still no ssh. Couldnt restart the server only power down. I ofc just killed the relay that the outlet runs through remotely. Long story short is, had there been a restart and not just a shutdown button, it would have saved me a lot of cuss words.

I used to run a 5 line (2400-9600 baud dialup) WildCat BBS on a Single msDOS 5.0 based i386sx-16mhz pc back in late 80 - early 90s. DesqView for time-slicing multiple Dos sessions. Also grew up with a timex-sinclair 1000, ti-99/4a and eventually a commodore 64 before the xt’s. So I absolutely prefer command line computing.

I saw that you are using an RPI for your astrobox. I played with astrobox on it for a couple days, but absolutely prefer the PCduino2 running astroprint. One thing I did on the rpi was install a copy of pronterface/printrun. I had it running via the graphic destop using tightvnc for remote access. (also started it local while configuring). I used astroprint for my print server. But because I had just built that printer, I needed printrun/pronterface for a down and dirty terminal to issue config commands and to save my settings into the eprom. It did work, but had a noticable lag on the rpi. That’s one of the reasons I switched back to the pcduino2. Much faster response/resources on the pcduino2.
Maybe that would be a useful tool for your purposes until astrobox has the features you need? Definitely useful for the terminal. Fully functional on the rpi.
Ed

No. Pronterface and printrun have soo many issues with stability in any package I have used it. I have wasted soo much time with it i dont care to anymore. Rpi b+2 is awesome, but I dont care for resource intensive vnc. The pi already has its limits and vnc is just pouring gas on the fire. I have enough devices that I could just go plug into and hold one handed. I prefer to not have to touch it.

Fair enough, exactly why I dislike graphic OS’. I’ll can issue gcode commands from the command line. Your printers controller is an emulated serial come port that can be controlled by sending commands direct to the community port. The same way you could issue commands to the serial port of modems using a terminal emulator, you could do on the rpi. Instead of At commands, you would send gcode commands.
I would have to look up the exact procedure, but you could open the serial port using minicom or something similar, lock the baud rate, verify the connection and control, save your configuration. Then you could use the command line (minicom commands) to send gcode directly out the serial port (/dev/ttyUSB# of the the rpi?).
You could set up all type of commands that can be executed as system scripts or remote/shell commands.
Would be good for forced resets, emergency heater shutdowns and bed leveling… Astroprint would probably conflict or be unaware of changes, so it would need to be suspended and reloaded to allow correct control of the port by both controllers.
The best solution would still be custom system scripts/commands (os) a day custom gcode scripts to be activated from within Astroprint.

I am already ahead of you. I started studying the procedure yesterday to send gcode via the serial port.
install minicom and tap into the port on the device at the baud. Done. I will explain it for others who could be reading this. Again, this is my current setup – YMMV.
sudo apt-get update && sudo apt-get install minicom
sudo minicom -D /dev/ttyACM0 -b 115200
Done, you are now tapped in. You should be seeing M105’s in the window.

Glad you could understand my sentence structures after my tablet’s predictive spell correct toasted it. :slight_smile: Wouldn’t happen from the command line!
Please share, would love to see your instruction.
Ed

I’ve hacked around Astroprints camera code to get the RPI camera working, and unfortunately, it doesn’t use OctoPrint’s camera system (which is why the RPI camera works on one and not the other). I imagine they used a different library to make it easier to stream and store the images to the cloud, but that is just conjecture.

@Austin you are right, we use v4l2 for our camera code. That gives us the widest support for USB cameras. However the support for raspicam is spotty :frowning:

The latest release recognizes the camera ( when activated using raspi-config ) but will only produce black images.

The next release is going to include an updated firmware and kernel so maybe this will be fixed.

I would appreciate some help if you guys know how to get the raspicam working with within the V4L2 framework.

Isnt v4l2 userspace? I specifically bought my usb webcam because astroprint didnt support The picamera. Maybe ill buy one and tinker for a bit.

@cameron v4l2 is not userspace but there’s a similarly named package that made add user space. More info here: http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14

There is an official V4L2 driver but I haven’t had luck getting non black images from it: https://www.raspberrypi.org/forums/viewtopic.php?t=62364