SmartThings Community

Detecting if TV is on with energy monitoring plug


(James Ridley) #1

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?


#2

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.


(fightingmajor) #3

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.


(Jim) #4

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

SmartThings and Harmony from the following https://support.smartthings.com/hc/en-gb/articles/205653834-Logitech-Harmony-Home-Hub
This will only pull through your Harmony Activities but it allows you to turn on and off those activities from within SmartThings

SmartThings to Alexa from the following https://support.smartthings.com/hc/en-gb/articles/205275404-How-to-connect-Amazon-Alexa-with-SmartThings
You can be selective and oly select to synch those things/devices that are not natively supported to connect to Alexa

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.


#5

You can use Host Pinger to do this (you can search the forum for it).


#6

You can set the device to update more frequently in the DTH most likely. I have my two Iris plugs reporting back power usage every 20 seconds.


(Mark) #7

This.

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.


(Steve) #8

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.