@differentcomputers
You’re right. That would need a combination of an IR blaster and EventGhost, which is what @impliciter guided me through setting up. When I switch to my Movie Mode scene, my TV turns on, receiver turns to the appropriate input, and lights in the family room turn off. If you have an IR blaster like this, the setup is relatively easy.
Here is the Device Type layout
Here is the device type code with my external IP address replaced with Enter.IP.Address.Here
/**
* Home Theater Control
*
*
* Enable the following capabilities for the Device Type - button, switch, refresh
*
* Add the following custom commands - volUp, volDown, Input4, Input5, Input6, mute, unmute
*
* Date: 2014-02-24
*/
// for the UI
metadata {
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"])
}
}
// handle commands
def on() {
log.debug "Executing 'on'"
def url = "http://Enter.IP.Address.Here:80/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://Enter.IP.Address.Here:80/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://Enter.IP.Address.Here:80/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://Enter.IP.Address.Here:80/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://Enter.IP.Address.Here:80/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://Enter.IP.Address.Here:80/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://Enter.IP.Address.Here:80/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://Enter.IP.Address.Here:80/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://Enter.IP.Address.Here:80/index.html?Input6"
httpGet(url) {
response ->
if (response.status != 200 ) {
log.debug "Eventghost webserver failed, status = ${response.status}"
}
}
}
I just hardcoded my IP into the device type.
You can replace Input4, Input5, and Input6 with whatever you would like to accomplish, unsure on how to enable airplay speakers though, but if they take IR commands it should be a breeze.
Then EventGhost is where the real magic happens. You have to enable the webserver EventGhost plugin, I used port 80 as the port assignment by default. You have to enable port forwarding in your router for port 80 to your HTPC, and then SmartThings will send httpget requests to the EventGhost webserver which will be seen as triggers in EventGhost. Those triggers can then be mapped to actions. So in your case you could map an EventGhost trigger that fires off the “Start Application” action and have it start Plex. The IR blasts to your AV equipment can be recorded as Pronto codes by EventGhost, and can be triggered as actions.
I do not see a Plex plugin available for EventGhost, but you could always send keypresses as well.