11-21-2022, 07:46 PM
I bought this HAT: https://wiki.52pi.com/index.php?title=EP-0077
I used this script:
Remote on and off works. Unfortunately, when I use the power off button in the moode interface, the system shuts down, but hat does not turn off the raspberry's power. The LEDs are on. I then have to press the button on the remote control again and only then everything goes out. After that, turning on the remote is OK. What to do to make the effect the same when:
- I press the button on the remote control
- press power off in moode
?
I used this script:
Code:
#!/bin/bash
echo -e "\e[32;40mInstall package's for script. \e[0m"
sudo apt-get install -y -qq wiringpi
sudo sh -c " curl -sSL https://raw.githubusercontent.com/geeekpi/RPB-HAT/master/remoteswitch > /bin/remoteswitch "
sudo chmod a+x /bin/remoteswitch
sudo sed -i '$i sudo remoteswitch &' /etc/rc.local
echo -e '"\e[32:40m Reboot your raspberry and try to press the power button, reboot button and test it.\e[0m"'
for i in 5 4 3 2 1
do
echo -e "\e[32;40m $i second...\e[0m"
sleep 1
done
sudo sync
sudo shutdown -r now
Remote on and off works. Unfortunately, when I use the power off button in the moode interface, the system shuts down, but hat does not turn off the raspberry's power. The LEDs are on. I then have to press the button on the remote control again and only then everything goes out. After that, turning on the remote is OK. What to do to make the effect the same when:
- I press the button on the remote control
- press power off in moode
?