Control my TV with Alexa or Apple TV Remote


#1

1) Give a description of the problem
I am trying to design a piston that will allow me to keep my bedroom TV (Harmony) and Apple TV in sync regardless of whether I use Alexa or the actual AppleTV remote (not the harmony remote) to turn on/off the TV. The setup has an AppleTV with HDMI/CEC enable to on/sleep commands to the Apple TV turn off the TV and the A/V receiver (just like the harmony). The challenge is (as with all Harmony remotes) is that when you start a harmony activity, the presumption is the activity continues until turned off.

The setup from the piston below uses 2 devices to keep things in sync, a Samsung TV and the harmony activity). So if 1 turns on, the other should follow. . .

2) What is the expected behavior?
Hypothetically: I say “Alexa, turn on the bedroom TV” and the bedroom TV turns on. When I turn off the TV using the AppleTV remote, the harmony activity also turns off.

OR

I turn on the Apple TV using the remote (which would trigger the Harmony activity) and then later say “Alexa, turn off the bedroom TV” and the Harmony Activity turns off.

3) What is happening/not happening?
The piston (below)… sporadically does not keep the activities in sync. When this occurs (randomly), the TV will begin a somewhat endless loop of turning on/off until both Harmony and the Bedroom TV set are in sync.

Truth be told, I think I severely overthought the logic of this and there should be a simpler way.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach any logs (From ST IDE and by turning logging level to Full)


#2

I know its a bit delayed, but I have a few thoughts…
First, I assume you have the harmony hub linked to both ST and Alexa.

  1. Does your TV use the same IR command for turning on and turning off? Is it required? If so, I don’t think there is a solution, because I don’t think Harmony supports ‘soft’ status changes. I.E. every time a status is changed, whether it is via the phone app, the harmony remote, or alexa, it runs through the entire sequence. So if it uses the same command, it will create the infinite loop mismatch until one IR signal ‘overlaps’ another and gets missed.
  2. Assuming they do or can use different IR commands, then perhaps an IFTTT sequence would be simpler? If bedroom tv is on and harmony off, turn harmony on. If bedroom TV is off, and harmony is on, turn harmony off?

Also, FWIW, I feel your pain about the integrations. Between my roommate and I, we have 2 Xbox’s, a Super-Nintendo, a Cable Box, a Chromecast Audio, Bluetooth or airplay music, and the occasional computer all running through a pioneer receiver to two seperate 55" TV’s hanging next to each other on a wall. Needles to say, we use the ‘help me’ button (or now ‘fix it for me’) constantly…


#3

Thanks for the reply. I actually had a similar problem where my pool heater and spa could not be on at the same time. This weekend I am going to try that logic to determine whether I can somehow re-work this piston to simply keep the Harmony activity in check.