This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rc.local not loading script
#1
Hello all, my first post here Smile

Im trying to make my RPI3 turn ON/OFF on button push. But i cant make OpenPlotter run a python script on boot.

Everything i tried nothing, rc.local, bash, crontab. I added permissions so anybody can run script, but it wont run on boot.

Anyone had similiar problem? Thanks Smile
Reply
#2
here is what i was thinking of doing in node red untested but you get the idea..i haven't figured out the ON part yet but i got reboot power down.
welcome to the forum..

Code:
[{"id":"20000d95.1907a2","type":"exec","z":"7546b9b.db0b448","command":"sudo shutdown -h now","addpay":true,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"Shutdown Pi","x":630,"y":760,"wires":[[],[],[]]},{"id":"1c00de2f.060cb2","type":"exec","z":"7546b9b.db0b448","command":"sudo reboot","addpay":true,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"Reboot Pi","x":620,"y":700,"wires":[[],[],[]]},{"id":"f097e51f.98a528","type":"rpi-gpio in","z":"7546b9b.db0b448","name":"","pin":"13","intype":"down","debounce":"25","read":false,"x":340,"y":700,"wires":[["db885066.03cf4"]]},{"id":"db885066.03cf4","type":"switch","z":"7546b9b.db0b448","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":2,"x":470,"y":700,"wires":[[],["1c00de2f.060cb2"]]}]

a little googling and seems simple enough change to pin 5
"There's nothing to build here, but we need to understand how to wake up the Pi from a halt state before we build the shutdown functionality. Simply put, shorting pins 5 and 6 (GPIO3 and GND) together will wake the Pi up from a halt state."
Reply
#3
There are actions "shutdown" and "reset" on actions tab. Just connect your swith to GPIO pins, set the signal k key on GPIO tab and set a trigger/action for that signal k key.

If you set that anybody can run script included owner, the script will never run usin "myscript.py".
On that case you have to run it with: "python myscript.py"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)