Networking
Re: Networking
Are you running the master branch or the devel branch of Octoprint?
Re: Networking
I am running master this is what I installed. 2014-01-07-wheezy-octopi-0.8.0.imgsprior wrote:Are you running the master branch or the devel branch of Octoprint?
I added these lines in my config.yaml right after my webcam at the bottom of the file I used nano -w to edit it.
events:
systemCommandTrigger:
enabled: True
subscriptions:
- event: PrintDone
command: curl -o /tmp/printDone.jpg "http://127.0.0.1:8080/?action=snapshot"
&& mpack -s "Print of %(filename)s finished" /tmp/printDone.jpg myemailAddress
But when I reboot I get
“503 Service Unavailable
No server is available to handle this request.”
Edit out my new entries and it is very happy again.
I am close can you point me in the right direction.
Last edited by markb on Mon May 19, 2014 1:14 pm, edited 1 time in total.
Re: Networking
I don't know anything about Octopi, but just double checking here: you don't have an actual line break before && do you? Because that won't work.
Re: Networking
I do and I just changed it but I am getting the same resultsjsc wrote:I don't know anything about Octopi, but just double checking here: you don't have an actual line break before && do you? Because that won't work.
“503 Service Unavailable
No server is available to handle this request”
At least when I take out my changes everything works. Thanks for the tip.
I know I am close because I can send email from the command line.
I am editing the file through putty ssh session using nano. If that helps.
Re: Networking
Where are you getting that error message? When you try to connect to the RaspPi with your browser? Or is it showing up as the output in a log somewhere?
503 means the server is unavailable. If you are seeing the former case, that means OctoPi isn't starting up correctly, and you should probably double check the syntax of your config file. If the latter case, it means it is running, but it can't run your command, and the 503 is probably coming from curl. In that case, you have to make sure the server is listening on 127.0.0.1 as well as whatever external IP address it has. And make sure the port is correct.
503 means the server is unavailable. If you are seeing the former case, that means OctoPi isn't starting up correctly, and you should probably double check the syntax of your config file. If the latter case, it means it is running, but it can't run your command, and the 503 is probably coming from curl. In that case, you have to make sure the server is listening on 127.0.0.1 as well as whatever external IP address it has. And make sure the port is correct.
Re: Networking
After I reboot the server I try to login OctoPrint web page and I get the error.
At the command line I can copy the line right out of my config.yaml file and run it. it sends a email with a file attachment printDone.jpg.
curl -o /tmp/printDone.jpg http://127.0.0.1:8080/?action=snapshot && mpack -s "Print of %(filename)s finished" /tmp/printDone.jpg myemailAddress
curl -o /tmp/printDone.jpg http://localhost:8080/?action=snapshot && mpack -s "Print of %(filename)s finished" /tmp/printDone.jpg myemailAddress
Either one will sent a email at the command line.
At the command line I can copy the line right out of my config.yaml file and run it. it sends a email with a file attachment printDone.jpg.
curl -o /tmp/printDone.jpg http://127.0.0.1:8080/?action=snapshot && mpack -s "Print of %(filename)s finished" /tmp/printDone.jpg myemailAddress
curl -o /tmp/printDone.jpg http://localhost:8080/?action=snapshot && mpack -s "Print of %(filename)s finished" /tmp/printDone.jpg myemailAddress
Either one will sent a email at the command line.
Re: Networking
Okay, that indicates OctoPrint is not getting started properly, which means you have syntax errors in your changes to config.yaml.
YAML is indentation sensitive. Are you properly indenting all the lines?
YAML is indentation sensitive. Are you properly indenting all the lines?
Re: Networking
Thanks! That was it. In windows white space is usually ignored. I am running a short print right now to test it.
Yes my lack of Linux experience shows through. I kept thinking I had a syntax error. Or my editor was putting in bad charters.
Well it worked fine but the picture is very funny. You cant see the print the way I have the camera setup. Getting a email when the print is done is priceless.
Here is the Timelapse video this is a nice feature.
http://www.youtube.com/watch?v=fYLvdnbc ... e=youtu.be
I just created an image of my SD card just in case.
Yes my lack of Linux experience shows through. I kept thinking I had a syntax error. Or my editor was putting in bad charters.
Well it worked fine but the picture is very funny. You cant see the print the way I have the camera setup. Getting a email when the print is done is priceless.
Here is the Timelapse video this is a nice feature.
http://www.youtube.com/watch?v=fYLvdnbc ... e=youtu.be
I just created an image of my SD card just in case.
- Attachments
-
- printDone.jpg (40.37 KiB) Viewed 15759 times
Last edited by markb on Mon May 19, 2014 3:15 pm, edited 1 time in total.
Re: Networking
Glad you got past this. The devel branch of OctoPrint has an option that lets you add a still shot at the end of the timelapse - makes it more satisfying.
Note that moving to the devel branch requires you to change your event config because the placeholder variables changed.
Note that moving to the devel branch requires you to change your event config because the placeholder variables changed.
Re: Networking
Ok what do I have to do to move to the devel branch? I must have that option.
Thanks for your help through this process.
Thanks for your help through this process.