Script for Raspberry Nespi case+??? (SafeShutdown, SafeReset, and LED)

  • NisteR

    Changed the title of the thread from “Script for Nespi case+ (SafeShutdown, SafeReset, and LED)” to “Script for Raspberry Nespi case+??? (SafeShutdown, SafeReset, and LED)”.
  • Insufficient information : What are you asking? What are you trying to do.Please provide more information. Hardware, version of LE etc

  • 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 No need to download or install anything from linked github page. Save the code I shared for example as "" 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 "" 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 :)

    Edited 3 times, last by jleppa ().

  • Looks really clear to me : Nespicase+ comes with secure power+reset button and need script

    Your solution is working for me but not the led