Apple TV or Samsung TV trigger for automation?

I have a Samsung TV and Apple TV. I use the first generation of Govee TV lights with a camera to mirror the colors with the backlight. When I was using SmartThings I was able to use the “Power On” function as a trigger to turn on the lights, and vice versa when I turn the TV off. That stopped working at some point and I’ve switched to HE now. I can’t for the life of me figure out how to trigger on the TV action. It’s a recent model TV (2021?) and it’s connected to Wi-Fi. Obviously the AppleTV is connected to Wi-Fi.

Is there any way to trigger on either device to turn on the lights when the TV is on?

I just got the (in)famous Aqara FP2 running in homekit, and I’m really close to automating the light just when anyone is in the room. I’m not sure what’s more annoying; having the Tv on without the light, or the lights on without the TV.

You can use homekit to trigger a virtual switch on hubitat...

1 Like

Please elaborate. I have no way to trigger anything in HomeKit when I turn on the TV.

Thanks, but this is only control of the TV via HE. I can’t find a way to triggered a rule with the device.

Triggering a rule is exactly what I do with it.

You install the "Samsung TV Remote" and then that becomes a device in HE. Then you write rules that can trigger actions based on the device (Samsung TV) being turned on or off.

Check out HubiThing Replica. You should be able to bring in the status from a Samsung TV via the Smart Things cloud (no hub required). I use it for my fridge and it works awesome to get the info from the door sensors and internal temps.

In Homekit you should have an option for when the apple tv comes on, do something (turn on light etc). Correct?

You’d think so but no. You can add Apple TV to a scene but only play/pause. Can’t use the status as a device trigger like you can with a light or plug.

It does have the button attrubute so you could use button controller to set off a rule. But yeah a separate motion sensor would be needed.

@user5583

  1. Add the Samsung TV integration. Follow the directions for both getting it installed on HE and having it show up on HE as a device, and connecting the HE to your TV via the integration.

  2. Write a rule in which the trigger is you turning your Samsung TV on or off. In HE, the device will be the device you created in step 1. In real life, this trigger will work when you turn the TV on or off via your Samsung TV remote control. Have the resulting action be whatever you want it to be.

  3. Done.

Thanks! I didn’t think HE was aware of the TV changes since I didn’t see it on the device page. I setup a rule as you said with an existing light and was about to write a post saying it didn’t work when the light came on. Seems like it’s a polled response and the default polling interval was 60s. I adjusted to 10s and got it to run much quicker, 10-15 seconds. Not ideal but better than nothing. Thanks!

If you use HubiThings Replica as I suggested above, you will get instant status updates without polling.

Not sure what you mean.
On the devices page, I have a device that is my TV
If I go into the detail for the TV, on the upper right it tells me if the TV is on or off.

Hi this might have been mentioned sorry if I missed it but I seem to be getting this error An error occurred while installing the package: Failed to upgrade driver https://raw.githubusercontent.com/DaveGut/HubitatActive/master/SamsungTvRemote/SamsungTVRemote.groovy. when trying to do an update in HU package Manager. I did do a repair on manager and manually install the updated the latest Samsung TV code not sure what the cause might be.

Be sure the package is not in use with devices.

As I understand (happy to be corrected) one big difference between Hubithings Replica and the Samsung Hubitat TV Integration is that Hubithings Replica relies on the SmartThings Cloud, so your TV needs to be connected to the internet.

If you are in a location without internet access, or just prefer to not connect your TV to the internet, the Hubithings Replica would thus not work. The Samsung Hubitat TV Integration works great locally over local wifi, without the TV connected to the internet.

You are correct about the delay - the guy who wrote it intentionally put in the delay so you don't get false results. It has something to do with the way the Samsung software works.

Did not know that, I assumed it also used the cloud. I had only used the older Fridge and Range drivers which used the cloud so I thought the TV one was the same.