Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
harmony_send_code() {
ACTION=$1
CMD=$2
IP=10.255.0.217
PORT=9090
URL="http://${IP}:${PORT}/CMD?${ACTION}=${CMD}"
curl -s $URL
}
alias tv_poweroff='harmony_send_code HarmonyHubPowerOff OFF'
alias tv_mute='harmony_send_code HarmonyHubMute ON'
alias tv_appletv='harmony_send_code HarmonyHubWatchTV ON'
alias tv_chromecast='harmony_send_code HarmonyHubWatchChromecast ON'
alias tv_firestick='harmony_send_code HarmonyHubWatchFireStick ON'
alias tv_dashboard='harmony_send_code HarmonyHubWatchDashboard ON'
alias tv_ps3='harmony_send_code HarmonyHubWatchPS3 ON'
alias tv_xbone='harmony_send_code HarmonyHubWatchXBoxOne ON'
alias onscreen='tv_appletv'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.