-C option on the squeezelite page was active.
After deactivating it, the script does as expected:
"Power on/off" the player in LMS does reliably lead to my speakers being powerd on/off.
Results 11 to 20 of 75
-
2020-08-16, 11:24 #11
- Join Date
- Aug 2020
- Posts
- 8
-
2020-08-16, 13:28 #12
-C explained here.
https://forums.slimdevices.com/showt...l=1#post985333piCorePlayer a small player for the Raspberry Pi in RAM.
Homepage: https://www.picoreplayer.org
Please donate if you like the piCorePlayer
-
2020-11-12, 17:11 #13
- Join Date
- Jan 2010
- Location
- Hertfordshire
- Posts
- 6,246
-
2020-11-12, 19:35 #14
I’ll get it on the todo list. Should get it this weekend.
piCorePlayer a small player for the Raspberry Pi in RAM.
Homepage: https://www.picoreplayer.org
Please donate if you like the piCorePlayer
-
2020-11-13, 00:24 #15
- Join Date
- Jan 2010
- Location
- Hertfordshire
- Posts
- 6,246
-
2020-11-14, 10:13 #16
uhubctl posted.
piCorePlayer a small player for the Raspberry Pi in RAM.
Homepage: https://www.picoreplayer.org
Please donate if you like the piCorePlayer
-
2020-11-14, 13:27 #17
- Join Date
- Jan 2010
- Location
- Hertfordshire
- Posts
- 6,246
Thanks for posting it Paul. I was about to post that I couldn't get it working on my Pi 3B but it turns out that the info posted here
https://github.com/mvp/uhubctl#raspberry-pi-b2b3b
is incorrect. It states that all the USB ports on the Pi3B are linked together and controlled by Port 2. In fact they are controlled separately and turning off port 2 does not turn off ports 2-5. Turning off port 4 works for me.
-
2020-11-14, 13:49 #18
- Join Date
- Jan 2010
- Location
- Hertfordshire
- Posts
- 6,246
Hmm my commands work when I ssh into the pCP but not from the script. I am putting
-S /home/tc/usb-power-on-off.sh
in Various Options on the Squeezelite settings page. My script file is
Code:#!/bin/sh #---------------------------------------------------------------------------------------- # Script for turning RPi3 USB output on/off when Squeezelite player is turned on/off. # This script requires that extension uhubctl.tcz is installed. # Enter the path to this "Power On/Off Script" on the pCP Squeezelite Settings page. # https://github.com/mvp/uhubctl#raspberry-pi-b2b3b #---------------------------------------------------------------------------------------- # squeezelite -S /home/tc/usb-power-on-off.sh # # squeezelite sets $1 to: # 0: off # 1: on #---------------------------------------------------------------------------------------- case $1 in 0) uhubctl -l 1-1 -p 4 -a 0 >/dev/null 2>&1 ;; 1) uhubctl -l 1-1 -p 4 -a 1 >/dev/null 2>&1 ;; esac
-
2020-11-14, 14:33 #19
Likely need to reference the full path to the binary.
/usr/local/sbin/uhubctlpiCorePlayer a small player for the Raspberry Pi in RAM.
Homepage: https://www.picoreplayer.org
Please donate if you like the piCorePlayer
-
2020-11-14, 14:35 #20
- Join Date
- Jan 2010
- Location
- Hertfordshire
- Posts
- 6,246