That was what I had before. The fan runs allways ...
Posts by satfan
-
-
The LED works fine, but I only get 3.3V . That's ok for the LED, but the Fan needs 5 V.
Any idea ?
-
It works ...! I `m so stupid... I shouldn't be counting pins at 2am at night ... Since I connected a fan to pin 4 and pin 6, I didn't see that I didn't connect pin1 and pin2. So I tried to make the connection between pins 7-8 instead of 5-6
Thx for your help !
By the way ... is it possible to reconnect the fan to a other Pin which is shut down if I´m in the shutdown mode ? Maybe I have to add something in that script.
-
I made the following things ...
The script should work ... but I don´t get any reaction if I shorten Pin5 Pin6.
I get a strange answer if I start the script manually ..
/storage/hyperion/bin/listen-for-shutdown.py:10: RuntimeWarning:
A physical pull up resistor is fitted on this channel!
GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)
###################
autostart.sh :
listen-for-shutdown.sh :
Code
Display More#! /bin/sh ### BEGIN INIT INFO # Provides: listen-for-shutdown.py # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO # If you want a command to always run, put it here # Carry out specific functions when asked to by the system case "$1" in start) echo "Starting listen-for-shutdown.py" /storage/hyperion/bin/listen-for-shutdown.py & ;; stop) echo "Stopping listen-for-shutdown.py" pkill -f /storage/hyperion/bin/listen-for-shutdown.py ;; *) echo "Usage: /storage/hyperion/bin/listen-for-shutdown.sh {start|stop}" exit 1 ;; esac exit 0
listen-for-shutdown.py :
Code
Display More#!/usr/bin/env python import sys sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib') import RPi.GPIO as GPIO import subprocess GPIO.setmode(GPIO.BCM) GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.wait_for_edge(3, GPIO.FALLING) subprocess.call(['shutdown', '-h', 'now'], shell=False)
-
That doesnt work.
I install the rpi tools, and it can be found at:
/storage/.kodi/addons/virtual.rpi-tools/lib
i get the following:
-
thank you ... but now I have the problem to implent the script.
See the thread:
"listen for shutdown"
the script looks like that it is working, but I did not get any reaction if I shorten Pin5-Pin6
I get that strange message if I start in manually:
CodeLibreELEC:~/hyperion/bin # ./listen-for-shutdown.sh stop Stopping listen-for-shutdown.py LibreELEC:~/hyperion/bin # ./listen-for-shutdown.sh start Starting listen-for-shutdown.py LibreELEC:~/hyperion/bin # /storage/hyperion/bin/listen-for-shutdown.py:10: RuntimeWarning: A physical pull up resistor is fitted on this channel! GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)
-
Hi,
I wood like to ad a script which enables the posibility of a power button usage.
I found manauls to do that, but non of them worked at libreelec.
this are the script which should run:
As well the intallation script is not working.
Hope there is a way to add this simple funktionality to shutdown an restart the Pi with a shorting pin 5 and 6 (GPIO3 and GND)
Thx in advance
install:
Code
Display More#! /bin/sh set -e cd "$(dirname "$0")/.." echo "=> Installing shutdown listener...\n" sudo cp listen-for-shutdown.py /usr/local/bin/ sudo chmod +x /usr/local/bin/listen-for-shutdown.py echo "=> Starting shutdown listener...\n" sudo cp listen-for-shutdown.sh /etc/init.d/ sudo chmod +x /etc/init.d/listen-for-shutdown.sh sudo update-rc.d listen-for-shutdown.sh defaults sudo /etc/init.d/listen-for-shutdown.sh start
listen-for-shutdown.sh
Code
Display More#! /bin/sh ### BEGIN INIT INFO # Provides: listen-for-shutdown.py # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO # If you want a command to always run, put it here # Carry out specific functions when asked to by the system case "$1" in start) echo "Starting listen-for-shutdown.py" /usr/local/bin/listen-for-shutdown.py & ;; stop) echo "Stopping listen-for-shutdown.py" pkill -f /usr/local/bin/listen-for-shutdown.py ;; *) echo "Usage: /etc/init.d/listen-for-shutdown.sh {start|stop}" exit 1 ;; esac exit 0
listen-for-shutdown.py
-
Thankyou ..
Code
Display MoreLibreELEC:/tmp # rpi-eeprom-update BCM2711 detected VL805 firmware in bootloader EEPROM BOOTLOADER: up-to-date CURRENT: Thu Sep 3 12:11:43 UTC 2020 (1599135103) LATEST: Thu Sep 3 12:11:43 UTC 2020 (1599135103) FW DIR: /usr/lib/kernel-overlays/base/lib/firmware/raspberrypi/bootloader/critical VL805: up-to-date CURRENT: 000138a1 LATEST: 000138a1 LibreELEC:/tmp # vcgencmd bootloader_version Sep 3 2020 13:11:43 version c305221a6d7e532693cc7ff57fddfc8649def167 (release) timestamp 1599135103 LibreELEC:/tmp # vcgencmd bootloader_config [all] BOOT_UART=0 WAKE_ON_GPIO=1 POWER_OFF_ON_HALT=0 DHCP_TIMEOUT=45000 DHCP_REQ_TIMEOUT=4000 TFTP_FILE_TIMEOUT=30000 TFTP_IP= TFTP_PREFIX=0 BOOT_ORDER=0x1 SD_BOOT_MAX_RETRIES=3 NET_BOOT_MAX_RETRIES=5 [none] FREEZE_VERSION=0
As far as I understand that there is a chance, that I have the new, working version of the bootloader which supports a work_on_GPIO as I need it per default. I think somebody of you guys see that in a second .
Thx for help !
-
Thanks for your support! But I have no idea where to find a bootloader with the right behavior or what to change about the existing one.
I just find the following:
Raspberry Pi 4 bootloader configuration - Raspberry Pi Documentation
Is that the right thing. And is the only thing what I have change is in the parts: I need a helping hand here. Thx !
WAKE_ON_GPIO
If
1
thensudo halt
will run in a lower power mode until either GPIO3 or GLOBAL_EN are shorted to ground.Default:
1
(0
in original version of bootloader 2019-05-10)Version: All
POWER_OFF_ON_HALT
If
1
andWAKE_ON_GPIO=0
thensudo halt
will switch off all PMIC outputs. This is lowest possible power state for halt but may cause problems with some HATs because 5V will still be on. GLOBAL_EN must be shorted to ground to boot.Pi 400 has a dedicated power button which operates even if the processor is switched off. This behaviour is enabled by default, however,
WAKE_ON_GPIO=2
may be set to use an external GPIO power button instead of the dedicated power button.Default:
0
Version: 2019-07-15
#####################
-
Thanks ... Sorry, but I'm not familiar with Linux.
Do you have any idea where I can find the necessary bootloader I need? I found links, but I can't take them
thx for help
-
Hi, I am using the latest version on LibreElec. Due to the changes to the Raspberry PI4,
I need the function so that the behavior corresponds to earlier models, where both 3V3 and 5V pins remain switched on after the "Sudo halt".
As far as I could find out so far, I have to change the bootloader. A working one should be found somewhere on the net (but I haven't found it yet)
I have no idea if it is possible to change the bootloader. It would be great if there was some way to implement this feature to pause and run Kodi via an external signal.
Thanks for your support