slartibartfast wrote: 
> 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.

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
--------------------


Any idea what I am doing wrong?


------------------------------------------------------------------------
slartibartfast's Profile: http://forums.slimdevices.com/member.php?userid=35609
View this thread: http://forums.slimdevices.com/showthread.php?t=112760

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to