RetroFlag / retroflag-picase

RetroFlag Pi-Case Safe Shutdown
MIT License
704 stars 224 forks source link

OSMC Compatible Script Request? #7

Open seamonkey420 opened 6 years ago

seamonkey420 commented 6 years ago

Issues getting this to work on OSMC. Errors i notice when running script in SSH as root "E: Unable to locate package python3-gpiozero"

After some digging found issues w/build that osmc is based on and getting gpiozero packages. used suggestion of user over here and used PIP:

sudo apt install python-pip python3-pip
sudo pip install gpiozero
sudo pip3 install gpiozero

https://github.com/RPi-Distro/python-gpiozero/issues/538

this did get those packages installed but switch does not do anything after this even. i plan to look into other OSMC service scripts that have been used w/other power pcb add-ons.

thanks!

seamonkey420 commented 6 years ago

Here is a method to get this working OSMC. Verified working on my OSMC setup! :) Per rern' post here: https://discourse.osmc.tv/t/trying-to-add-off-button-with-script-at-startup-not-working/18975/6

Just change the button value to 5 for power button or 3 for reset button.

button = 5 or button = 3 in the shutdown.py

seamonkey420 commented 6 years ago

https://seamonkey420x.blogspot.com/2018/04/osmc-and-new-nespi-case-with-safe.html

seamonkey420 commented 6 years ago

leaving open to see if this can get added by author.

seamonkey420 commented 6 years ago

script updated to enable led while in safeshutdown mode. this is 100% verified working now on over 6+ setups or redo setups. led = serial port gpio.

Denisuu commented 5 years ago

https://seamonkey420x.blogspot.com/2018/04/osmc-and-new-nespi-case-with-safe.html

When I use these scripts in OSMC and Raspbian the Pi goes to sleep and the fan keeps spinning, when I boot into Retropie and shutdown the Pi shutsdown completely and so does the fan!

Denisuu commented 5 years ago

script updated to enable led while in safeshutdown mode. this is 100% verified working now on over 6+ setups or redo setups. led = serial port gpio.

Does your standy light go off? If you have a fan does it stop spinning?

seamonkey420 commented 5 years ago

yes my light does go off. i do not have a fan installed though so cannot report on that however i believe you figure out what gpio port it’s on and shut it down too. i’m on mobile atm but look into later this week.

On Thu, Nov 29, 2018 at 9:54 AM Denisuu notifications@github.com wrote:

script updated to enable led while in safeshutdown mode. this is 100% verified working now on over 6+ setups or redo setups. led = serial port gpio.

Does your standy light go off? If you have a fan does it stop spinning?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/RetroFlag/retroflag-picase/issues/7#issuecomment-442885275, or mute the thread https://github.com/notifications/unsubscribe-auth/AF255AkrEsGzg6d58VMTAPdssytE9d7hks5u0AMxgaJpZM4TpmmK .

-- "knowledge is power, spread the power" http://blogs.tech-recipes.com/seamonkey420

Denisuu commented 5 years ago

yes my light does go off. i do not have a fan installed though so cannot report on that however i believe you figure out what gpio port it’s on and shut it down too. i’m on mobile atm but look into later this week.

This script works perfectly in Retropie, I don't know how the 'shutdown_fan' script works and how I get it to work in OSMC/Raspbian.

https://github.com/crcerror/ES-generic-shutdown

Denisuu commented 5 years ago

Have you had any chance to look into it? Or should I ask for help on the Raspbian/OSMC forums?

seamonkey420 commented 5 years ago

sorry buddy, i have not had a chance recently. i would prbo ask in the Raspbian and OSMC forums.

On Wed, Dec 12, 2018 at 6:12 PM Denisuu notifications@github.com wrote:

Have you had any chance to look into it? Or should I ask for help on the Raspbian/OSMC forums?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/RetroFlag/retroflag-picase/issues/7#issuecomment-446793215, or mute the thread https://github.com/notifications/unsubscribe-auth/AF255M_yzvZpSvhDi-c_mWdnKRt4SFwwks5u4ZtugaJpZM4TpmmK .

-- "knowledge is power, spread the power" http://blogs.tech-recipes.com/seamonkey420

kerosyn commented 5 years ago

Here is my guide for getting my SUPERPi working with OSMC, fan stops on shutdown too. https://discourse.osmc.tv/t/howto-install-safe-shutdown-script-for-retroflag-cases-raspberry-pi-3-b/78572

Denisuu commented 5 years ago

Yea I have one too: https://github.com/Denisuu/OSMC_NesPi-SuperPi_Safe-Shutdown

Steuv1871 commented 10 months ago

Adding a solution for 2023 (and beyond I hope) installers tumbling upon this thread: OSMC lock the /boot/config.txt file, GPIO overlays must be added to /boot/config-user.txt I've edited the installation script from crcerror to make it work on a fresh OSMC install: https://github.com/Steuv1871/retroflag-picase-osmc Hope it'll help others.