diff --git a/yamahactrl.sh b/yamahactrl.sh
index e0a5de4..ac81720 100755
--- a/yamahactrl.sh
+++ b/yamahactrl.sh
@@ -37,12 +37,18 @@ power_off() {
curl -X POST -d 'Standby' http://$YAMAHA_IP/YamahaRemoteControl/ctrl
}
+set_input() {
+echo "dsfsd $1"
+ curl -s -X POST -d "HDMI$1" 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 \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