Posts by jleppa

    Purpose of this script is to make shutdown & reboot (+LED) buttons on RetroFlag NesPi Plus case to work on Raspberry Pi LibreELEC.

    Here's script for RetroFlag NesPi+ case which I modified for my needs from recalbox_SafeShutdown.py. No need to download or install anything from linked github page. Save the code I shared for example as "nespi_shutdown.py" and copy it to your LibreELEC sd card.

    On LibreELEC install following add-ons:

    • LibreELEC repository: rpi-tools (I'm not sure about exact addon name, might have been also RPi.GPIO or something)
    • KODI add-on repository: Kodi Callbacks

    From "Kodi Callbacks" settings set "nespi_shutdown.py" to run on KODI start. There's also other ways to run scripts on Kodi start but I have used this add-on because of my limited skills :)

    Also "Safe ShutDown" switch inside NesPi+ case needs to be turned ON.

    I don't have knowledge to say if my modified script is 100% correct but power button, reset button & LED seem to work correct. Although LED doesn't blink correctly for a short time after reboot button is pushed (maybe because LibreELEC reboots much faster than Recalbox). If there's any improvements to be done please share :)