homebridge-appletv-enhanced: Inconsistent Automation Trigger: Accessory Fails to Turn On with Plugin Remote When Apple TV Powers On, While Turning Off Works Reliably
Preconditions
- Requirements fulfilled
- The known issues did not answer my question
- The question has not been asked in the past or the answer does not satisfy me
- There is currently no other opened issue that matches my question
- I cannot find any answer to my question in GitHub discussions
Current Situation
I have automation set to turn on the kitchen light when the Apple TV turns on, and another to turn it off when the Apple TV turns off (added for testing purposes to identify the issue). The automation to turn off the kitchen light when the Apple TV turns off works perfectly with the plugin remote. However, the automation to turn on the light when the Apple TV turns on is inconsistent—out of 20 tries, it only works 1-2 times, while turning it off works every time. Logs are attached for reference.
Logs
[15/10/2024, 14:34:16] [Apple TV Enhanced] [I] Platform: Finished initializing platform: Apple TV Enhanced
[15/10/2024, 14:34:16] [Apple TV Enhanced] [I] Living Room Apple TV (): Rocket Remote: turn_on
[15/10/2024, 14:34:17] [Apple TV Enhanced] [D] Living Room Apple TV (): event powerState: on
[15/10/2024, 14:34:17] [Apple TV Enhanced] [I] Living Room Apple TV (): New Active State: on
[15/10/2024, 14:34:20] [Apple TV Enhanced] [D] Living Room Apple TV (): event powerState: off
[15/10/2024, 14:34:22] [Apple TV Enhanced] [D] Living Room Apple TV (): event powerState: on
[15/10/2024, 14:34:22] [Apple TV Enhanced] [I] Living Room Apple TV (): New Active State: on
[15/10/2024, 14:34:35] [Apple TV Enhanced] [I] Living Room Apple TV (): Rocket Remote: turn_off
[15/10/2024, 14:34:35] [Apple TV Enhanced] [D] Living Room Apple TV (): Rocket Remote: New power state: On
New power state: Off
New power state: On
[15/10/2024, 14:34:35] [TplinkSmarthome] [Kitchen Top Center] Setting On to: false
[15/10/2024, 14:34:36] [Apple TV Enhanced] [D] Living Room Apple TV (): event powerState: off
[15/10/2024, 14:34:36] [Apple TV Enhanced] [I] Living Room Apple TV (): New Active State: off
[15/10/2024, 14:34:36] [Apple TV Enhanced] [D] Living Room Apple TV (): Reset all motion sensors.
[15/10/2024, 14:34:47] [Apple TV Enhanced] [I] Living Room Apple TV (): Rocket Remote: turn_on
[15/10/2024, 14:34:47] [Apple TV Enhanced] [D] Living Room Apple TV (): Rocket Remote: New power state: Off
[15/10/2024, 14:34:47] [Apple TV Enhanced] [D] Living Room Apple TV (): event powerState: on
[15/10/2024, 14:34:47] [Apple TV Enhanced] [I] Living Room Apple TV (): New Active State: on
[15/10/2024, 14:34:50] [Apple TV Enhanced] [D] Living Room Apple TV (): event powerState: off
[15/10/2024, 14:34:52] [Apple TV Enhanced] [D] Living Room Apple TV (): event powerState: on
[15/10/2024, 14:34:52] [Apple TV Enhanced] [I] Living Room Apple TV (): New Active State: on
[15/10/2024, 14:34:56] [Apple TV Enhanced] [D] Platform: Starting device discovery ...
[15/10/2024, 14:35:00] [Apple TV Enhanced] [I] Living Room Apple TV (): Rocket Remote: turn_off
[15/10/2024, 14:35:00] [Apple TV Enhanced] [D] Living Room Apple TV (): Rocket Remote: New power state: On
New power state: Off
New power state: On
[15/10/2024, 14:35:00] [TplinkSmarthome] [Kitchen Top Center] Setting On to: false
[15/10/2024, 14:35:01] [Apple TV Enhanced] [D] Living Room Apple TV (): event powerState: off
[15/10/2024, 14:35:01] [Apple TV Enhanced] [I] Living Room Apple TV (): New Active State: off
[15/10/2024, 14:35:01] [Apple TV Enhanced] [D] Living Room Apple TV (): Reset all motion sensors.
[15/10/2024, 14:35:03] [Apple TV Enhanced] [D] Platform: finished multicast device discovery
Configuration
{
"name": "Apple TV Enhanced",
"deviceStateDelay": 0,
"avadaKedavraAppAmount": 15,
"disableVolumeControlRemote": false,
"absoluteVolumeControl": false,
"discover": {
"multicast": true
},
"forceVenvRecreate": false,
"logLevel": 4,
"updateCheckLevel": "stable",
"updateCheckTime": 3,
"deviceSpecificOverrides": [
{
"overrideMediaTypes": false,
"overrideDeviceStates": false,
"overrideDeviceStateDelay": false,
"deviceStateDelay": 0,
"overrideRemoteKeysAsSwitch": false,
"overrideAvadaKedavraAppAmount": false,
"avadaKedavraAppAmount": 15,
"overrideCustomInputURIs": false,
"overrideDisableVolumeControlRemote": false,
"disableVolumeControlRemote": false,
"overrideAbsoluteVolumeControl": false,
"absoluteVolumeControl": false
}
],
"platform": "AppleTVEnhanced",
"_bridge": {
"username": "0E:90:D0:9E:3C:99",
"port": 33233
}
}
Operating System
Linux
Operating System: Bits
64-bit
Operating System: Distribution
Raspberry Pi OS
Operating System: Distribution Version
12 (bookworm)
Docker
no
Docker Image
None
Docker Image Tag
No response
Homebridge Version
1.8.4
Homebridge Config UI Version
v4.61.0
Homebridge Storage Path
/var/lib/homebridge
Homebridge Apple TV Enhanced Version
v1.9.1-0
Node Version
v20.18.0
NPM Version
10.5.0
Python Version
3.11.2
PIP Version
23.0.1
HDMI Hops
No response
Audio Output
no
Same Subnet
yes
Additional Context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (8 by maintainers)
Okay thank you. I think you have provided enough information for me to debug the problem. Once I find the time I will dig into it. I’ll keep you updated here.
Thanks for the clarification. Just wanted to ask because the plugin also exposes a remote in the iOS control center.
@maxileith updated the logs to level 4 see if you see any issue in the power state…