@scottinpollock Yup, here it is. I have my WAN IP, username/password, and port all hard-coded
metadata {
definition (name: "Home Theater Control", author: "nelemansc@gmail.com") {
capability "Polling"
capability "Button"
capability "Switch"
capability "Refresh"
command "volUp"
command "volDown"
command "Input4"
command "Input5"
command "Input6"
command "mute"
command "unmute"
}
tiles {
standardTile("power", "device.switch", width: 2, height: 2) {
state "off", label: 'Off', action: "switch.on", icon: "st.Electronics.electronics18", backgroundColor: "#ffffff", nextState: "on"
state "on", label: 'On', action: "switch.off", icon: "st.Electronics.electronics18", backgroundColor: "#79b821", nextState: "off"
}
standardTile("muteSwitch", "device.switch", canChangeIcon: true) {
state "mute", label: 'Mute', action: "mute", icon: "st.alarm.beep.beep", backgroundColor: "#ffffff", nextState: "unmute"
state "unmute", label: '', action: "unmute", icon: "st.secondary.off", backgroundColor: "#79b821", nextState: "mute"
}
standardTile("lUp", "device.button", inactiveLabel: false,decoration: "flat", canChangeIcon: false) {
state "up", label:'Volume Up', action:"volUp",icon:"st.thermostat.thermostat-up"
}
standardTile("lDown", "device.button", inactiveLabel: false,decoration: "flat", canChangeIcon: false) {
state "down", label:'Volume Down', action:"volDown",icon:"st.thermostat.thermostat-down"
}
standardTile("Input4", "device.button", inactiveLabel: false,decoration: "flat", canChangeIcon: false) {
state "Input4", label:'Xbox One', action:"Input4",icon:"st.Electronics.electronics5"
}
standardTile("Input5", "device.button", inactiveLabel: false,decoration: "flat", canChangeIcon: false) {
state "Input5", label:'XBMC', action:"Input5",icon:"st.Entertainment.entertainment1"
}
standardTile("Input6", "device.button", inactiveLabel: false,decoration: "flat", canChangeIcon: false) {
state "Input6", label:'TV', action:"Input6",icon:"st.Electronics.electronics15"
}
main(["power"])
details(["power", "lUp", "lDown", "Input6", "Input5", "Input4", "muteSwitch"])
}
}
// parse events into attributes
// handle commands
def on() {
log.debug "Executing 'on'"
def url = "http://username:password@Enter.WAN.IP.Here:Port/index.html?pwrOn"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
def off() {
log.debug "Executing 'off'"
def url = "http://username:password@Enter.WAN.IP.Here:Port/index.html?pwrOff"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
def mute() {
log.debug "Muting the audio"
def url = "http://username:password@Enter.WAN.IP.Here:Port/index.html?muteOn"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
def unmute() {
log.debug "Unmuting the audio"
def url = "http://username:password@Enter.WAN.IP.Here:Port/index.html?muteOff"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
def volUp() {
log.debug "Turning up volume"
def url = "http://username:password@Enter.WAN.IP.Here:Port/index.html?volup"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
def volDown() {
log.debug "Turning down volume"
def url = "http://username:password@Enter.WAN.IP.Here:Port/index.html?voldown"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
def Input4() {
log.debug "Changing input to 'Input 4'"
def url = "http://username:password@Enter.WAN.IP.Here:Port/index.html?Input4"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
def Input5() {
log.debug "Changing input to 'Input 5'"
def url = "http://username:password@Enter.WAN.IP.Here:Port/index.html?Input5"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
def Input6() {
log.debug "Changing input to 'Input 6'"
def url = "http://username:password@Enter.WAN.IP.Here:Port/index.html?Input6"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
What are you using to emit the IR signal from your Mac?