OpenMarine

Full Version: rc.local not loading script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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."
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"