Page 1 sur 1

LibreELEC power off with SPC II

Publié : lun. 07 mai 2018 11:29
par AlleyCat
I am having a problem with LibreELEC (LE) and SPC II module. When I turn off the LE from the software on the TV Screen, the LED power button stays lit, and the SPC power module looks like it still having power. I am looking for a script to run at the script to send a signal to the SPC II to shut off / cut power. I suspect that I have to send signals to the GPIOs.

Beside this issue, I have a python script that works great to handle turn on and off using the power button.



Re: LibreELEC power off with SPC II

Publié : lun. 07 mai 2018 12:16
par AlleyCat
Problem solved:

I created the following softshutdown1 script, and add one line to the script:


#! / Usr / bin / python
# "Audiophonics softshutdown script"
# " Openelec Version"
# "softShutdown: GPIO4 = out, low to high"
import sys
import RPi.GPIO as GPIO
import time
import subprocess
GPIO.setmode (GPIO.BCM)
GPIO.setwarnings (False)

GPIO.setup (4, GPIO.OUT)
GPIO.output (4, GPIO.HIGH)
time.sleep (1)
GPIO.output (4, GPIO.LOW)

GPIO.cleanup ()

case "$1" in
# your commands here
# your commands here
python /storage/.config/softshutdown1
# your commands here
# your commands here