The plugin that actually works with the GPIO's is PSU control in Octoprint.The Yaml Patcher plugin also works because the buttons show up on the top of Octoprint after I paste the code into theconfig.yaml folder but the gpio's don't work with anything but the PSU control plugin.Here is the code that I manually paste into the folder
Code: Select all
system:
actions:
- action: lights on
command: gpio -g write 32 1
name: Turn on the lights
- action: lights off
command: gpio -g write 32 0
confirm: You are about to turn off the lights.
name: Turn off the lights
The Yaml patcher code is
Code: Select all
[["append", "system.actions", {"action": "lights on", "command": "gpio -g write 32 1", "name": "Turn on the lights"}], ["append", "system.actions", {"action": "lights off", "command": "gpio -g write 32 0", "name": "Turn off the lights", "confirm": "You are about to turn off the lights."}]]
I didn't come up with the code myself they were two examples listed on each of the plugin pages as examples that work.I just changed the GPIO number and the name of what I was turning on and off.I even tried with and without the -g.I know the GPIO numbering I am using is the right pin number because when I change the pin number in the PSU control settings page the pin I switch to activates the relay no problem.They just don't seem to work any other way besides with the plugin.
This is the link to the Octoprint relay control page
https://github.com/foosel/OctoPrint/wik ... m-your-RPi
This is the link to the psu control plugin page
https://github.com/kantlivelong/OctoPrint-PSUControl
And this is the link to the Yaml Patcher plugin page
https://github.com/OctoPrint/OctoPrint-Yamlpatcher
I have had a few problems setting up my first Raspberry but with the help I got on here and just trying stuff I have researched online has seemed to work up until this point.I am overwhelmed with this issue at the moment.I can't seem to figure it out.Any help would be greatly appreciated.