Cerealbot/Software
Github files for this project.
Contents
[hide]Cerealbot Code
Underneath the queue is a hodge podge of shell scripts and C programs.
Current System:
Shell script hooks bound to Octoprint's "printStart" and "printDone" events. These handle setting the flag which indicates a part is being printed/removed. Once a part is being removed, its corresponding gcode is deleted from the queue.
A cron job checks the printer status and queue for a match of "free printer + file to print" and then kicks off the print job.
A C program acts as a buffer to the arduino and allows the shell scripts to control hardware in a easy to use but complicated to setup manner.
API
Curl is great for testing around with both Octoprint and RedQueen's api, but I've switched the shell scripts to use resty for ease of maintenance.
Curl Examples To RedQueen: curl --data "{\"message\":\"${MSG}\", \"channel\":\"##rqtest\", \"isaction\":false, \"key\":\"${APIKEY}\"}" https://crump.space/rq/relay -H "Content-Type:application/json" To Octoprint: curl -H "X-Api-Key:$OCTO_API_KEY" http://bns-daedalus.256.makerslocal.org/api/printer -o /tmp/printr_status.json
Slic3r Config
I'm still working on a Slic3r config, its on github.
Octoprint Server - RPi
Raspbian - Debian
Archlinux
To run octoprint from port 80 as user 'octoprint', I adjusted the systemd unit file to launch with authbind.
[Unit] Description=Octoprint 3d Printing Web Server After=network.target [Service] User=octoprint Group=octoprint Type=simple ExecStart=/usr/bin/authbind --deep /usr/bin/octoprint --port 80 Restart=on-failure [Install] WantedBy=multi-user.target
Right now I'm streaming the webcam from v4l-mjpg-streamer, total pain, will look for something better.