Activity Groups: Testing

I’ve been playing with this a bit and have found a couple of issues:

My use case is three activities - all in the same group.

  • watch Apple TV (LG on, delay, LG input HDMI4)
  • watch Fire TV (LG on, delay, LG input HDMI1)
  • watch Blu-ray (LG on, delay, , Blu-ray on, delay, HDMI switch box on, LG input HDMI2, HDMI switch box input 1)

The Apple TV and Fire TV;s each have their own HDMI input on my LG TV. The Blu-ray goes to HDMI2 but via an AwakeLion HDMI switch.

When I move from Fire TV to Blu-ray things work well. The delays are removed and it works perfectly. However when I leave the watch blu-ray activity to go to either other activity then both the blu-ray player and the HDMI switch box are left powered on. Looking at the logs I see

2023-12-17 09:43:57.623033 +00:00 core NOTICE [Living Room] entities to power off: []
2023-12-17 09:43:57.612115 +00:00 core NOTICE [Living Room] found running activity ‘Watch Blu-ray’ (uc.main.c218c8e4-b8b8-4d6f-bc25-e68b2e9a0b19) in the same activity group
2023-12-17 09:43:57.610921 +00:00 core NOTICE Starting activity ‘Watch Apple TV’ (uc.main.2a944d49-6112-41d7-8684-3281670f23ab) in activity group: ‘Living Room’ (193d129e-c077-4ab0-8e1a-244f84472fbe)

My second problem is that when ever I leave the watch Apple TV activity, the log shows

[Living Room] entities to power off: [“Apple TV Living Room uc_appletv_driver.main.C0:95:6D:7C:DF:1B) PAUSED”]

and some kind of off command is sent to the Apple TV, which then turns off the LG TV via CEC! The power off instructions in the “Watch Apple TV” activity setup is simply to turn off the LG TV.

Unfortunately I can’t turn off the CEC control on the LG TV because it has to be on to send audio over HDMI to my SONOS Arc sound bar.

Conclusion: I think that the concept of an “always on” definition for devices is needed and needs to be added to the activity groups logic.

OK - I’ve found the support article on activity groups. There is also a bug submitted on GitHub. In essence this bug says that the “Turn off unused entities Always” doesn’t work, but “turn off unused entities In off sequence” does work.

I realised that I can turn off CEC on my Apple TV and leave it on on my LG TV (for the SONOS Arc). Hopefully this will sort most if not all of the issues. I’ll test it when I can.