external command send to Raspberry Pi before printer on? (Raspberry Pi
I know you inject the start external commands via gcode scripts but is there any way to run one before the printer is on to the pi? I have one (@printeron) which is a script to bring a gpio pin high. It works fine via CLI but I'd love to inject this right after slicing or perhaps right before sending the print to the printer. This would work very nicely w/ my script to turn printer off after the print job ends effectively automating all power functionality. Since this is sending the command to a pi which is already on I don't see why this isn't physically possible, maybe just not software possible yet.
Thanks
Dave
Thanks
Dave
Comments
So this is the flow:
1. slice print
2. After completion of slice send gpio command to pi to turn printer on via my script (Cannot be via gcode as printer is off). I already have a power on button setup in host/server which works to power on/off the printer, perhaps those can be utilized and called?
3. Click print to send gcode to pi and start printing sliced file.
4. After print done, power off printer. (Already set up and working thanks to you)
Dave
You need the external command solution that adds commands to frontend menu, but these do not appear in host only in server frontend.
Only solution I see is a postprocessor script so after slicing that script does not change gcode but call the command on the pi, e.g. using the server web api.
Dave
When you can do it already, what is the problem? I though on is not working because printer is off and you could net send the command.
BTW this is what I get when trying that:
[quote]
Thanks
Dave
I do have a bit of a ghetto way I'm doing it now but then I noticed it doesn't print the print jobs when clicking print after slice. I have to go to the server tab and manually click print rather than just clicking print from print preview tab. What I did was running a putty command to run a txt file upon login that executes the sh file but perhaps there is a better way? With my way I have to have my ssh password exposed and it also temp opens a dos window and putty before it closes. I'd like to do this a way where it doesn't rely on files on my local pc just to run an sh command on the pi. Primarily because I slice from multiple computers.
Dave