added switching input source feature

master
czoczo 6 years ago
parent 10790a6fe7
commit ef3264ed45
  1. 9
      yamahactrl.sh

@ -37,12 +37,18 @@ power_off() {
curl -X POST -d '<YAMAHA_AV cmd="PUT"><Main_Zone><Power_Control><Power>Standby</Power></Power_Control></Main_Zone></YAMAHA_AV>' http://$YAMAHA_IP/YamahaRemoteControl/ctrl
}
set_input() {
echo "dsfsd $1"
curl -s -X POST -d "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Input><Input_Sel>HDMI$1</Input_Sel></Input></Main_Zone></YAMAHA_AV>" http://$YAMAHA_IP/YamahaRemoteControl/ctrl
}
print_help() {
echo -e "Bash script to control Yamaha Amplituner RX-V series."
echo -e "Usage: $0 command\n"
echo -e "Possible commands:"
echo -e " -volup\t\t Set volume up by 1"
echo -e " -voldown\t Set volume down by 1"
echo -e " -input <i>\t Set input source 1-4"
echo -e " -on\t\t Set power on"
echo -e " -off\t\t Set power off"
exit 0
@ -62,6 +68,9 @@ case "$1" in
-voldown)
volume_down
;;
-input)
set_input "$2"
;;
*)
print_help
esac

Loading…
Cancel
Save