I want to be able turn all the downstairs lights and TV off at night with one command to Echo. Lights are easy enough, but the problem with the TV is that the Harmony hub can only toggle the TV on or off simulating the power button on the remote - there is no power off command. TV is usually turned on/off with TV remote so Harmony has no idea of state of TV.
I came up with the idea of using an energy monitoring plug (got a TPLink HS110). 0.5W is TV on standby and 100W TV is on - all sorted I thought. Unfortunately though the power is only being reported to Smartthings every 5 mins or so. Is there a way to get it update quicker? Or get Webcore to request an update? Or do I need to use a different plug? Any suggestions?
I know this isn’t answering the question, but is this a Smart TV? If so a different option might involve looking for signs of it on the local network. For example a quick scan of my tele showed three HTTP servers are running. So it is clearly detectable. You just need something to do said detecting.
Why do you have a harmony hub if you do not use the remote that goes with it? Also if you have it set up in Smartthings, you can have any of the setups turn off by just treating it as a switch and set to turn off based on whatever you are doing. For example, even though I might be watching my Tivo, if I leave I can have my Watch Apple TV turn off and the tv still turns off.
I think you can do this without detecting the state of the TV, from either SmartThings using some automation like detecting no motion and triggering a scene that turns all devices off. Or by asking Alexa to turn your downstairs off. You mention the Harmony hub, so assuming you have this, I have the Harmony Elite though not sure if it makes a difference.
Setup two or three integrations dependant on the devices you have and what SmartHome device they connect to.
Alexa and Harmony from the following https://support.myharmony.com/en-gb/harmony-experience-with-amazon-alexa#whatsnew
Ensure that all the Harmony Activities are discovered and selected in Alexa, along with any lights or other devices it finds
Once you have run Alexa discovery after all of those integrations, create a Smart Home Group giving it an easy Name to remember in the Alexa App. Select the Devices (Direct Alexa ones or Smart Things Integrated ones) and Harmony Activities that you want to turn off.
You can then ask Alexa to turn the Living Room off and it will turn off all the devices, using either Harmony, SmarThings or Alexa integrated. It doesnt care whether the device or activity is off or not it just issues the off command.
You can also Create a Scene in the SmartThings App select all Activities/Devices and have them power off. Though for this to be able to turn your TV off you need to have switched it on with a Harmony Activity from either SmartThings, Harony or Alexa telling Harmony.
You do have to be careful on what you Synch as you can end up with the same device visible multiple times via the different activities.
Why not just use the harmony hub to turn your tv on and off (with the remote, SmartThings, Harmony app, etc)? Nothing to get out of sync if you do it that way. And no need for any workarounds like what you’re proposing.
I do this using a self written smart app with oAuth and a VBscript on my server which pings the IP address of either the TV or Google chromecast and sends a HTTPS oAuth post each time to say if its on or off.
The one thing I have noticed is that the samrt TV and goole chromecast (getting power from TV usb port) can take some time to turn its network port off once the TV has switched off.