lprhodes / homebridge-apple-tv

Apple TV 4th & 5th gen plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
105 stars 15 forks source link

Device discovered twice #52

Closed kennyjeffris closed 5 years ago

kennyjeffris commented 5 years ago

For some reason, the plugin is finding my Apple TV twice, and then causing an error that makes me unable to connect to homebridge

[2019-4-28 15:07:25] [Apple TV HB] [INFO] Discovered Apple TV (Living Room) at 192.168.0.10
[2019-4-28 15:07:25] [Apple TV HB] [INFO] Added pair switch for Apple TV (Living Room) at 192.168.0.10
[2019-4-28 15:07:25] [Apple TV HB] [INFO] Discovered Apple TV (Living Room) at 192.168.0.10
[2019-4-28 15:07:25] [Apple TV HB] [INFO] Added pair switch for Apple TV (Living Room) at 192.168.0.10
[2019-4-28 15:07:25] [Apple TV HB] No accessories have been added to the "Apple TV HB" platform config.
[2019-4-28 15:07:25] [Apple TV HB] Initializing platform accessory 'Pair Living Room'...
[2019-4-28 15:07:25] [Apple TV HB] Initializing platform accessory 'Pair Living Room'...
(node:26258) UnhandledPromiseRejectionWarning: Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: <UUID of my Apple TV>
    at Bridge.Accessory.addBridgedAccessory (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:268:13)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:416:24)
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19
    at AppleTVPlatform.accessories (/usr/lib/node_modules/homebridge-apple-tv/node_modules/homebridge-platform-helper/platform.js:42:14)
    at <anonymous>:null:null

(node:26258) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:26258) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

config.json platform setup:

{
     "platform": "AppleTV",
     "name": "Apple TV HB",
     "devices": [ ],
     "accessories": [
     ]
}
kennyjeffris commented 5 years ago

Just discovered this is a known issue