Cannot get shutdown button to work

rasplex

#1

I have tried to follow [forums.plex.tv/discussion/250861/gpio-power-button-and-led-indicator-addon-v0-1] to get the shutdown button to work in Rasplex, but end up gettin te following failure when i run the script for shutdown any idea much appreciated:

`File "./shutdownbutton.py", line 7, in
import RPi.GPIO as GPIO
ImportError: No module named RPi.GPIO'


#2

Hi @alanfryer

I guess you are trying my script by running it from ssh

Make sure that the lib folder its inside /storage/.plexht/addons/packages/gpio/
and that you are loading the correct path so shutdownbutton.py can find it

You can run from SSH this commands
PYTHONPATH="${PYTHONPATH}:/storage/.plexht/addons/packages/gpio/lib"; export PYTHONPATH
and then you can try the script manually

that´s one of the things that the autostart.sh script you need to create does before executing the shutdown script

I also see that you are changing some of the scripts names, so double check everything its pointing to the correct paths and names


#3

Thanks for that got it working now. :)