homebridge-appletv-enhanced: Unable to pair Apple TV: Too many attempts. Waiting for x seconds before retrying
Analysis
The plugin is unable to display codes on any Apple TV.
Expected Behavior
A code should appear on the Apple TV.
Steps To Reproduce
Install v1.2.3 of the plugin on a child bridge, attempt to pair Apple TV.
Logs
[18/02/2024, 14:21:09] [Apple TV Enhanced] Child bridge process ended
[18/02/2024, 14:21:09] [Apple TV Enhanced] Process Ended. Code: 1, Signal: null
[18/02/2024, 14:21:16] [Apple TV Enhanced] Restarting Process...
[18/02/2024, 14:21:17] [Apple TV Enhanced] Launched child bridge with PID 1316160
[18/02/2024, 14:21:18] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced'
[18/02/2024, 14:21:18] [Apple TV Enhanced] Loaded homebridge-appletv-enhanced v1.2.3 child bridge successfully
[18/02/2024, 14:21:18] Loaded 0 cached accessories from cachedAccessories.0EF24693A1CA.
[18/02/2024, 14:21:18] [Apple TV Enhanced] [I] Platform: Finished initializing platform: Apple TV Enhanced
[18/02/2024, 14:21:18] [Apple TV Enhanced] [I] Python check: Starting python check.
[18/02/2024, 14:21:18] [Apple TV Enhanced] [I] Python check: plugin dir exists.
[18/02/2024, 14:21:18] Homebridge v1.7.0 (HAP v0.11.1) (Apple TV Enhanced) is running on port 56224.
[18/02/2024, 14:21:18] [Apple TV Enhanced] [I] Python check: Python 3.9.2 is installed and supported by the plugin.
[18/02/2024, 14:21:18] [Apple TV Enhanced] [I] Python check: Virtual environment already exists.
[18/02/2024, 14:21:18] [Apple TV Enhanced] [I] Python check: Venv is using current system python version (3.9.2).
[18/02/2024, 14:21:19] [Apple TV Enhanced] [I] Python check: Venv pip version: 24.0
[18/02/2024, 14:21:19] [Apple TV Enhanced] [I] Python check: Checking if there is an update for venv pip ...
[18/02/2024, 14:21:20] [Apple TV Enhanced] [I] Python check: Venv pip is up-to-date
[18/02/2024, 14:21:21] [Apple TV Enhanced] [I] Python check: Python requirements are satisfied.
[18/02/2024, 14:21:21] [Apple TV Enhanced] [I] Python check: Finished
[18/02/2024, 14:21:21] [Apple TV Enhanced] [I] Platform: Starting device discovery ...
[18/02/2024, 14:21:28] [Apple TV Enhanced] [I] Platform: Adding Apple TV Living Room Apple TV
[18/02/2024, 14:21:28] [Apple TV Enhanced] [I] Platform: Adding Apple TV Garage Apple TV
[18/02/2024, 14:21:28] [Apple TV Enhanced] [I] Platform: Adding Apple TV Family Room AppleTV
[18/02/2024, 14:21:28] [Apple TV Enhanced] [W] Living Room Apple TV: Credentials are no longer valid. Need to repair ...
[18/02/2024, 14:21:28] [Apple TV Enhanced] [W] Garage Apple TV: Credentials are no longer valid. Need to repair ...
[18/02/2024, 14:21:28] [Apple TV Enhanced] [W] Family Room AppleTV: Credentials are no longer valid. Need to repair ...
[18/02/2024, 14:21:28] [Apple TV Enhanced] [W] Living Room Apple TV: You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42050/
[18/02/2024, 14:21:28] [Apple TV Enhanced] [W] Garage Apple TV : You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42108/
[18/02/2024, 14:21:28] [Apple TV Enhanced] [W] Family Room AppleTV : You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42188/
[18/02/2024, 14:21:30] [Apple TV Enhanced] [W] Living Room Apple TV : Apple TV Living Room Apple TV: Too many attempts. Waiting for 243 seconds before retrying.
[18/02/2024, 14:21:30] [Apple TV Enhanced] [W] Family Room AppleTV : Apple TV Family Room AppleTV: Too many attempts. Waiting for 243 seconds before retrying.
[18/02/2024, 14:21:55] [Apple TV Enhanced] Restarting child bridge...
[18/02/2024, 14:21:55] Got SIGTERM, shutting down child bridge process...
[18/02/2024, 14:22:00] [Apple TV Enhanced] [W] Garage Apple TV : Pairing request timed out, retrying ...
[18/02/2024, 14:22:00] [Apple TV Enhanced] [W] Garage Apple TV : You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42108/
[18/02/2024, 14:22:00] [Apple TV Enhanced] Child bridge process ended
[18/02/2024, 14:22:00] [Apple TV Enhanced] Process Ended. Code: 143, Signal: null
[18/02/2024, 14:22:07] [Apple TV Enhanced] Restarting Process...
[18/02/2024, 14:22:08] [Apple TV Enhanced] Launched child bridge with PID 1316786
[18/02/2024, 14:22:08] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced'
[18/02/2024, 14:22:09] [Apple TV Enhanced] Loaded homebridge-appletv-enhanced v1.2.3 child bridge successfully
[18/02/2024, 14:22:09] Loaded 0 cached accessories from cachedAccessories.0EF24693A1CA.
[18/02/2024, 14:22:09] [Apple TV Enhanced] [I] Platform: Finished initializing platform: Apple TV Enhanced
[18/02/2024, 14:22:09] [Apple TV Enhanced] [I] Python check: Starting python check.
[18/02/2024, 14:22:09] [Apple TV Enhanced] [I] Python check: plugin dir exists.
[18/02/2024, 14:22:09] Homebridge v1.7.0 (HAP v0.11.1) (Apple TV Enhanced) is running on port 56224.
[18/02/2024, 14:22:09] [Apple TV Enhanced] [I] Python check: Python 3.9.2 is installed and supported by the plugin.
[18/02/2024, 14:22:09] [Apple TV Enhanced] [I] Python check: Virtual environment already exists.
[18/02/2024, 14:22:09] [Apple TV Enhanced] [I] Python check: Venv is using current system python version (3.9.2).
[18/02/2024, 14:22:10] [Apple TV Enhanced] [I] Python check: Venv pip version: 24.0
[18/02/2024, 14:22:10] [Apple TV Enhanced] [I] Python check: Checking if there is an update for venv pip ...
[18/02/2024, 14:22:10] [Apple TV Enhanced] [I] Python check: Venv pip is up-to-date
[18/02/2024, 14:22:12] [Apple TV Enhanced] [I] Python check: Python requirements are satisfied.
[18/02/2024, 14:22:12] [Apple TV Enhanced] [I] Python check: Finished
[18/02/2024, 14:22:12] [Apple TV Enhanced] [I] Platform: Starting device discovery ...
[18/02/2024, 14:22:18] [Apple TV Enhanced] [I] Platform: Adding Apple TV Living Room Apple TV
[18/02/2024, 14:22:18] [Apple TV Enhanced] [I] Platform: Adding Apple TV Family Room AppleTV
[18/02/2024, 14:22:18] [Apple TV Enhanced] [I] Platform: Adding Apple TV Garage Apple TV
[18/02/2024, 14:22:18] [Apple TV Enhanced] [W] Living Room Apple TV : Credentials are no longer valid. Need to repair ...
[18/02/2024, 14:22:18] [Apple TV Enhanced] [W] Family Room AppleTV : Credentials are no longer valid. Need to repair ...
[18/02/2024, 14:22:18] [Apple TV Enhanced] [W] Garage Apple TV : Credentials are no longer valid. Need to repair ...
[18/02/2024, 14:22:18] [Apple TV Enhanced] [W] Living Room Apple TV : You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42050/
[18/02/2024, 14:22:18] [Apple TV Enhanced] [W] Family Room AppleTV : You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42188/
[18/02/2024, 14:22:18] [Apple TV Enhanced] [W] Garage Apple TV : You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42108/
[18/02/2024, 14:22:21] [Apple TV Enhanced] [W] Living Room Apple TV : Apple TV Living Room Apple TV: Too many attempts. Waiting for 193 seconds before retrying.
[18/02/2024, 14:22:21] [Apple TV Enhanced] [W] Family Room AppleTV : Apple TV Family Room AppleTV: Too many attempts. Waiting for 193 seconds before retrying.
[18/02/2024, 14:22:21] [Apple TV Enhanced] [W] Garage Apple TV : Apple TV Garage Apple TV: Too many attempts. Waiting for 212 seconds before retrying.
[18/02/2024, 14:22:24] [Homebridge UI] Changes to config.json saved.
[18/02/2024, 14:25:18] [Apple TV Enhanced] [I] Platform: Adding Apple TV Family Room AppleTV
[18/02/2024, 14:25:18] [Apple TV Enhanced] [W] Family Room AppleTV : Credentials are no longer valid. Need to repair ...
[18/02/2024, 14:25:18] [Apple TV Enhanced] [W] Family Room AppleTV : You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42188/
[18/02/2024, 14:25:20] [Apple TV Enhanced] [W] Family Room AppleTV : Apple TV Family Room AppleTV: Too many attempts. Waiting for 13 seconds before retrying.
[18/02/2024, 14:25:33] [Apple TV Enhanced] [W] Family Room AppleTV : You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42188/
[18/02/2024, 14:25:34] [Apple TV Enhanced] [W] Living Room Apple TV : You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.4.2:42050/
Error: listen EADDRINUSE: address already in use 0.0.0.0:42188
at Server.setupListenHandle [as _listen2] (node:net:1872:16)
at listenInCluster (node:net:1920:12)
at doListen (node:net:2075:7)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at runNextTicks (node:internal/process/task_queues:64:3)
at processTimers (node:internal/timers:511:9)
Configuration
{
"name": "Apple TV Enhanced",
"mediaTypes": [
"tv",
"video"
],
"deviceStates": [
"paused",
"playing",
"stopped"
],
"deviceStateDelay": 0,
"avadaKedavraAppAmount": 15,
"disableVolumeControlRemote": false,
"setTopBox": false,
"discover": {
"multicast": true
},
"forceVenvRecreate": false,
"logLevel": 3,
"deviceSpecificOverrides": [
{
"overrideMediaTypes": false,
"overrideDeviceStates": false,
"overrideDeviceStateDelay": false,
"deviceStateDelay": 0,
"overrideRemoteKeysAsSwitch": false,
"overrideAvadaKedavraAppAmount": false,
"avadaKedavraAppAmount": 15,
"overrideCustomInputURIs": false,
"overrideDisableVolumeControlRemote": false,
"disableVolumeControlRemote": false,
"overrideSetTopBox": false,
"setTopBox": false
}
],
"_bridge": {
"username": "0E:F2:46:93:A1:CA",
"port": 56224
},
"platform": "AppleTVEnhanced"
}
Environment
- OS: Debian GNU/Linux 11 (bullseye)
- Docker: false
- Image Version:
- Homebridge: 1.7.0
- Homebridge Config UI: 4.55.1
- Storage Path: /var/lib/homebridge
- Apple TV Enhanced: 1.2.3
- Node: 20.11.0
- npm: 10.1.0
- Python: 3.9.2
- pip: 20.3.4
- HDMI hops: none
- HomePod as default speaker: true for ‘Family Room Apple TV’ only
Additional Context
No response
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Comments: 20 (8 by maintainers)
Could you guys check wether or not the pairing works with the following command
/var/lib/homebridge/appletv-enhanced/.venv/bin/atvremote -s <ipv4> --protocol companion pair