Skip to content

Commit

Permalink
Added port variable
Browse files Browse the repository at this point in the history
Same goes for port, forgot that too!
  • Loading branch information
domwrap committed Nov 3, 2014
1 parent 5ebbbee commit cf3da96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hyperion-config-switch.pioneer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#
# IP address or hostname of AVR
avr_ip="10.0.0.119"
avr_port="23"
#
#OpenElec/RasPlex
#path_remote="/storage/hyperion/bin/hyperion-remote.sh"
Expand Down Expand Up @@ -49,11 +50,11 @@ log="/var/log/hyperion-config-switch.log"


# Query current power state of AVR
avr_power=`printf "?P\r" | nc -w 1 $avr_ip 23 | head -c4`
avr_power=`printf "?P\r" | nc -w 1 $avr_ip $avr_port | head -c4`
# Pioneer states minimum 100ms between power on and subsequent requests
sleep 0.2
# Query current input for AVR
avr_input=`printf "?F\r" | nc -w 1 $avr_ip 23 | head -c4`
avr_input=`printf "?F\r" | nc -w 1 $avr_ip $avr_port | head -c4`
# Pull in config-saved previous state of AVR. Supress output in case doesn't already exist
if [ -e $config ]
then
Expand Down

0 comments on commit cf3da96

Please sign in to comment.