[How to do instruction] Power management for Audiophonics I-Sabre ES9023 V3 - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How to do instruction] Power management for Audiophonics I-Sabre ES9023 V3 (/showthread.php?tid=148) |
Power management for Audiophonics I-Sabre ES9023 V3 - rikardo1979 - 05-01-2018 [Note: This excellent write-up by @rikardo1979 was first posted in 2018 for moOde 4.x. As moOde has evolved, so have the instructions. For moOde 6.5.1, see @maartin's summary in his followup post downthread.] 1 / Installation of WiringPi: You’ll need WiringPi to communicate withe the GPIO pins on the Pi. To do so you’ll need to install gcc: Code: sudo apt-get install gcc now on to wiringPi: Code: cd /home/pi If all goes well you can now get an overview of the GPIO pins by typing Code: gpio readall 2 / Creating the script for the command from the power button: First we need to go back to /home/pi Code: cd /home/pi Then we can get the script Code: wget https://raw.githubusercontent.com/audiophonics/Raspberry-pwr-management/master/sds.sh 3 / Add the script button at startup: Editing the startup file: Now edit rc.local. This will make the script run at startup. Code: sudo nano /etc/rc.local Add this line before "exit 0”. Don’t delete or change anything else in this file, just add the extra line. Code: sudo bash /home/pi/sds.sh & 4 / Creating command scripts for moOde restart and shutdown: softshutdown recovery script: Code: sudo wget https://raw.githubusercontent.com/audiophonics/Raspberry-pwr-management/master/softshutdown.sh softreboot recovery script: Code: sudo wget https://raw.githubusercontent.com/audiophonics/Raspberry-pwr-management/master/softreboot.sh I don’t know if the scripts need to be executable, but I don’t think it can hurt to do so: Code: sudo chmod +x sds.sh 5 / Make moOde work with the scripts. First make a backup of the original worker.php file in case you mess things up: Code: cd /var/www/command We can now edit the original: Code: sudo nano worker.php Search for ‘reboot’ until you find the part that reads this: Code: case 'reboot': Here we will replace the reboot and poweroff commands with the scripts that now reside in /home/pi. Change the text so it reads: Code: case 'reboot': Reboot the Pi and if all goes well your LED should stop blinking and you should be able to power down with the button as well as through the moOde web UI. [video]https://youtu.be/HsJU91o_yHw[/video] RE: Power management for Audiophonics I-Sabre ES9023 V3 - hjheins - 05-25-2018 Hi rikardo1979, I followed your howto, thank you very much for this clear document. a couple of points: Bash files (if you open then, you see they start with #!/bin/bash or similar, indeed need to be executable, so the chmod +x is indeed mandatory. As for the worker.php file: i started with a clean Moode 4.1 setup. Since Moode 4.0 it seems these reboot/poweroff script parts are in: /var/local/commandw/restart.sh should be even easier. ;-) Code is now: Code: case 'reboot': RE: Power management for Audiophonics I-Sabre ES9023 V3 - hifix - 06-08-2018 Would this script be for Ver 4.x only ? Or would it be backward compatible ? Thanks. RE: Power management for Audiophonics I-Sabre ES9023 V3 - JST1963 - 06-13-2018 Hi moOde fans, RE: Power management for Audiophonics I-Sabre ES9023 V3 - rikardo1979 - 06-14-2018 (06-08-2018, 08:12 PM)hifix Wrote: Would this script be for Ver 4.x only ? As far as I remember it was a bit different on previous versions RE: Power management for Audiophonics I-Sabre ES9023 V3 - rikardo1979 - 06-14-2018 (06-13-2018, 07:59 PM)JST1963 Wrote:(05-01-2018, 08:41 PM)rikardo1979 Wrote: Reboot the Pi and if all goes well your LED should stop blinking and you should be able to power down with the button as well as through the moOde web UI. To be honest I do not know answer for this as I have not tried any updates :very time I do a fresh install of system when testing new releases to be sure there is no 'mess' left behind Regarding the automated install script, I am pretty sure it would be possible. Unfortunately this is beyond my knowledge. Maybe somebody clever with coding skills can do it RE: Power management for Audiophonics I-Sabre ES9023 V3 - JST1963 - 06-24-2018 Hi moOde fans, RE: Power management for Audiophonics I-Sabre ES9023 V3 - hifix - 10-03-2018 I just tried the code on 4.3 and got stuck with the: case 'reboot': case 'poweroff': sections. If anyone has figured this one out, please chime in. I'd love to get 4.3 running on my main rig. RE: Power management for Audiophonics I-Sabre ES9023 V3 - rikardo1979 - 10-04-2018 (10-03-2018, 05:41 PM)hifix Wrote: I just tried the code on 4.3 and got stuck with the: So where exactly is the problem? There should be no change and you should be able proceed as stated. I just did my update few days ago and reinstall the power management with no problem RE: Power management for Audiophonics I-Sabre ES9023 V3 - hifix - 10-04-2018 (10-04-2018, 02:53 AM)slartibartfast Wrote: hifix: Thank you. |