After the helpful answers to my last question I got myself a Harmony Hub and it works as I want it to. Basically, it remembers the state of the devices and uses infrared signals to fake the remotes and change to the configured settings when I activate a setup like Watch Fire TV or Watch Blu-Ray. Those two require different input settings for the TV (Toshiba 42SL863G).

However, my second home automation stage is screwing things up a bit. As it turns out my TV defaults to a different base setting when it is shut off compared to losing mains power. Since I want to shut down the whole media circus via smart plug I have two starting points.

  1. Powering up
    • The TV starts automatically
    • The Fire TV starts automatically and makes the TV switch to the HDMI it's connected to.
    • Surround System doesn't start.
  2. Just off after being in a known state (TV input either HDMI 1 or 2)
    • I start everything by Harmony and the devices go to the desired states


The Harmony Hub doesn't know if the power was off and cannot properly set the input channel. The remote or Harmony does not have a button that just says HDMI 1 or 2. Keeping all the equipment on is not a desired solution. Furthermore I triggering the whole setup via voice command, so I don't have a display that would allow me to see what mode I had been in before.


How do I detect the state of the equipment to switch to the correct input channel automatically?

  • Does the TV have a menu setting to change the behavior after power failure? Some do. You could configure it to stay off?
    – jterrace
    Commented Jan 3, 2017 at 1:51

6 Answers 6


I know you want to use the plug to shut off the entire media center to eliminate the expense (and waste) of the standby power draw, but I would strongly recommend the simpler solution of leaving the TV plugged in 24/7, and triggering your TV's power setting using the same event that activates your smart plug.


Modern LCD or OLED TVs sip about half a watt of current in standby, or less. According to your TV's manual (on page 100), your TV draws 0.2W of power in standby. Using your figure of 0.28€/kW as a cost of electricity, the standby power drawn by your TV will add no more than 0.49€ per year to your electric bill. Given the life of a TV may be 20 years, that means your workaround would have to cost less than 10.00€ to ever pay for itself. Furthermore, your TV will consume electricity at the full-power rate of 131/kWh during the entire system's cold boot sequence, which probably takes more time than a warm boot. (The longer it takes your whole system to boot up to "watchable TV", the more useless electricity it draws; similarly, I've found that family members are typically less pleased the longer it takes for the TV to power up.)

Financially, there is little reason to pursue this. Environmentally, it is probably not as advantageous as you think.


Smart plugs are not rated to isolate their plugged-in devices from lightning strikes, so merely shutting off the smart plug won't protect the TV from surges or spikes.


If you're concerned about privacy and network activity while your smart TV is supposed to be "powered off", go into your TV's settings and disable the phone home capabilities. If you're still worried, powering it off won't help because they leak personal data when they're on (and you're watching it), not when they're in standby. In that case you should instead fix the leak by shielding the TV behind a network firewall that prevents it from ever reporting back to the factory.

  • 2
    That cost aspect would be true if it was just the TV. However having a TV, the homecinema system, a powerLAN endpoint, a switch, and a Fire TV, the standby watts do start to pile up and we are at an average of more like 0.28€/kWh in Germany. Privacy is not the motivating factor for this question. The safety aspect you bring up is interesting though.
    – Helmar
    Commented Dec 26, 2016 at 10:31
  • 1
    If you are wondering why the electricity is so much more expensive, it's—of course—taxes and financing renewable energies. (German: de.wikipedia.org/wiki/Strompreis)
    – Helmar
    Commented Dec 26, 2016 at 10:36
  • 2
    You can still power down the rest of your gear and just leave the TV connected to the mains. That would be an interim fix while you seek a long-term solution. Commented Jan 3, 2017 at 1:28
  • 1
    That might be an avenue worth pursuing.
    – Helmar
    Commented Jan 3, 2017 at 12:04
  • 1
    According to your TV's manual at manualscat.com/en/toshiba-42sl863g-manual on page 100, your TV draws 0,2W on standby. Even at 0.28€/kW, you're still looking at spending no more than 0.49€ per year on powering your TV set in standby mode. You should spend no more than 10€ on a solution. Commented Jan 3, 2017 at 17:11

Unfortunately, there is no way to detect the state on "dumb" devices. Your only choice is to force them to synchronize.

I found this link to a discussion on asking Logitech to add support for discrete input selection codes. Having these codes added will let you set up your Harmony to switch directly to the correct input without worrying about the prior state.


Look at the "Advanced setup" for the Harmony, which lets you specify a sequence of keys after powering it on. Have it send the Input HDMI every time it turns on.

You could try something like that today using a series of Input Nexts, but without the discrete codes this would only work once after a cold start. It would confuse the TV and Harmony if it was powered on without first being unplugged from the mains.


The hard way

It is a lot of work but you could design a hall effect sensor to determine whether your equipment is off or on.

A hall effect sensor measures the current passing through a cable without requiring the cable to be broken. There is one available here.

Next you must now design an IR section to complement the hall effect sensor and also incorporate a simple microcontroller to your design in order to monitor the hall effect sensor and communicate its status on request.

If the current is greater than say 50mA then you know the system is on.

Now you must design an infrared transceiver to communicate with you board and finally you can program the harmony hub to identify your new current monitor product. Once complete, you will know the status of your equipment.

The easy way

Use a smart plug that monitors power consumption, example.

  • 2
    Interesting options. I'd still have to figure out a way to get the smart plug information automatically, seems like picking one with an accessible API would be key then.
    – Helmar
    Commented Jan 3, 2017 at 22:09
  • 1
    Also it is likely that you would have to split the phase and neutral wires in the cable passing near the hall-sensor (and reverse the current flow in one of them) as otherwise the electro-magnetic flux from the current in the conductors will cancel each other out (unless there is a leakage current through a separate conductor - e.g. an earth lead or a human touching a live part!) - indeed it is that cancelling out under normal conditions that enables a RCCB (a.k.a. GFCI in the USofA) to detect and trip under fault conditions!
    – SlySven
    Commented Jan 4, 2017 at 0:42
  • 1
    @SlySven Good point, however they should already be split at the socket source.
    – SeanJ
    Commented Jan 4, 2017 at 8:58
  • 1
    I mentioned it because I recently got a clamp-on current transformer for use with a DMM with a 200A maximum capability - and a (UK) Mains appliance has a maximum 13A rating. Obviously it normally needs to be fitted around only one of phase or neutral but by rigging up a short cable to a 5-way chocolate-block with a plug on a second lead and a socket on third I was able to cross wire the first cable so the live feed went in one end and the neutral the other and the other ends of the cable going to the socket. After looping the cable 5 times in the clamp I get a safe x10 amplification...!
    – SlySven
    Commented Jan 4, 2017 at 20:11
  • 1
    Also many hall effect sensor chips are not really safe for use at Mains Voltages without very careful mounting/isolation provisions. Over on EESE I saw this question and one commenter mentioned the Broadcomm ACPL-K370 "Isolated Voltage/Current Detector" which, in the -600, option will probably be suitable
    – SlySven
    Commented Jan 4, 2017 at 21:07

I'm struggling to completely formalise the problem (i.e. what fails and how without this function), but wonder if you are able to build a device to shadow the 'dumb' equipment, and report it's state. I think the problem is having to cycle through channels with only an 'advance' command (and invisible commands from other actors)?

So in the case of wanting to know what the TV is doing, you can monitor power and the various IR stimulus. Ideally this allows you to track the switch states by dead recconing. It might be possible to take in other stimulus too (my TV pops up a source identifier, only when it is triggered by FireTV - its plausible that a cheap image recognition could identify this, particularly if you know when to expect it).

Assuming switching source twice gives a reliable known state, you could potentially walk the system to a known state periodically (but I assume you would use power-off here) or on detection of a fault (user mashing the IR buttons, or inconsistent info from various sources).


Are you using a central home automation controller like SmartThings or Home-Assistant? I think you'll need one in order to accomplish what you are after. i.e. The controller would be aware of the harmony state and the smart switch state and can take appropriate actions based on if the smart switch is on or off (or has just been turned on).

  • 1
    The Harmony Hub is more than just a remote. However questions for clarification are better off in comments than in answers. Since we are still in private beta your reputation is enough to comment on my question directly rather than answering.
    – Helmar
    Commented Dec 21, 2016 at 12:59
  • 1
    @IanBennett it's typically best to avoid asking questions inside of an answer. It's recommended to keep questions in the comments.
    – tbm0115
    Commented Dec 21, 2016 at 15:10

You cant know the state, but you can often coax them into a known state.

For example, my TV does not have speaker off, it only has Mute Toggle. So, when I am directing the TV sound to the overhead speakers,

  • I turn the volume up one notch (this turns on TV speakers),
  • then I turn it down by one notch (to return it to the last state)
  • and then send Mute Toggle (The TV speakers turn off).

Similarly, changing the order of powering, you can make the TV go to the device you want.

  • If the TV is already on, turn it off first,
  • then turn on/off the other devices,
  • then turn the TV on, it will auto-switch to the active device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.