Closed RickB17 closed 8 years ago
To enable a GPIO, write to the export file with the number you want to enable. For example, if you want to enable gpio117, use the command "echo 117 > /sys/class/gpio/export". This will create the directory "/sys/class/gpio/gpio117". Alternately, on the GarageCape, if you run the command door_open.sh or door_close.sh, those scripts setup the GPIOs for you and leave them setup.
I'll give that a shot. The reason I noticed this is because the /usr/sbin/door_open.sh and door_close.sh weren't working. I'll confirm.
The reason it was failing for me was because my instance of Home-Assistant wasn't running due to my server restarting :-)
Confirmed :+1:
root@zen-garage:/sys/class/gpio# pwd /sys/class/gpio root@zen-garage:/sys/class/gpio# ls -la drwxr-xr-x 2 root root 0 Nov 14 05:49 . drwxr-xr-x 42 root root 0 Nov 14 05:49 .. --w------- 1 root root 4096 Nov 14 05:49 export lrwxrwxrwx 1 root root 0 Nov 14 05:49 gpiochip0 -> ../../devices/virtual/gpio/gpiochip0 lrwxrwxrwx 1 root root 0 Nov 14 05:49 gpiochip32 -> ../../devices/virtual/gpio/gpiochip32 lrwxrwxrwx 1 root root 0 Nov 14 05:49 gpiochip64 -> ../../devices/virtual/gpio/gpiochip64 lrwxrwxrwx 1 root root 0 Nov 14 05:49 gpiochip96 -> ../../devices/virtual/gpio/gpiochip96 --w------- 1 root root 4096 Nov 14 05:49 unexport