Loading

Report as inappropriate

If you're asking about how I got pushbullet to work, that's not my script, that's a plugin:
https://github.com/OctoPrint/OctoPrint-Pushbullet
If you have questions about that, I would ask in the google group for octoprint: https://groups.google.com/forum/?hl=en#!forum/octoprint

If you're talking about how I changed my light_off.sh script to work with it, I changed this:

gpio -g write 18 1

into this:

(sleep 5 && gpio -g write 18 1)&

"sleep 5" waits five seconds. "&&" means that the first command has to complete with success, and then the second command will be called, so "sleep 5 && command" will wait five seconds, and call "command".

Putting that thing in parenthesis, and adding a "&" at the end means the whole thing will get run in the background, so that octoprint can keep on doing whatever it was doing before calling that script (the octoprint developers said that I shouldn't have a long running script, because it will block octoprint, but I'm skeptical that's the case).

As an interesting side note, I first had this:

sleep 5
gpio -g write 18 1

And that worked just fine, so I'm not sure if it's really a problem, but foosel told me that it was, so I went with the slightly more complicated version.

Since I've written this up, I might as well put it in the main description...