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

Homebridge doesnt start #13

Open felix-mcfly opened 6 years ago

felix-mcfly commented 6 years ago

Hey,

if I install the homebridge-apple-tv plugin my homebridge will boot up but end with this message (homebridge devices dont work in the Home App on iPhone, having a " ! " on it):

[2018-4-5 20:04:22] [Wohnzimmer] [INFO] Discovered Apple TV (Wohnzimmer) at 192.168.188.29
[2018-4-5 20:04:22] [Wohnzimmer] [INFO] Added pair switch for Apple TV (Wohnzimmer) at 192.168.188.29
[2018-4-5 20:04:22] [Wohnzimmer] [INFO] Discovered Apple TV (Wohnzimmer) at 192.168.188.29
[2018-4-5 20:04:22] [Wohnzimmer] [INFO] Added pair switch for Apple TV (Wohnzimmer) at 192.168.188.29
[2018-4-5 20:04:22] [Wohnzimmer] [CONFIG ERROR] Up; No connected device could be found with a deviceID of "lounge".
[2018-4-5 20:04:22] [Wohnzimmer] Initializing platform accessory 'Pair Wohnzimmer'...
[2018-4-5 20:04:22] [Wohnzimmer] Initializing platform accessory 'Pair Wohnzimmer'...
(node:27116) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 1c130b23-dd19-4ce4-b60f-e7da10fd9d61
(node:27116) [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.

Theres also no HomeKit QR Code in the Terminal window. Like something wont let homebridge start the right way.

My config for homebridge-apple-tv looks like your sample:

   "platforms": [
{
      "platform":"AppleTV",
      "name":"Wohnzimmer",
      "devices": [ ],
      "accessories": [
        {
          "deviceID":"lounge",
          "name":"Up",
          "command": "up"
        }
      ]
}
]

If I delete this from config.json everything works. I dont need to reinstall the plugin to get homebridge back to work.

Would love to use this plugin, please help!

epheterson commented 6 years ago

Try backing up / moving your cachedAccessories file and relaunching it.

This is the giveaway: (node:27116) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 1c130b23-dd19-4ce4-b60f-e7da10fd9d61

felix-mcfly commented 6 years ago

Where do I find this file?

Am 05.04.2018 um 20:16 schrieb Eric Pheterson notifications@github.com:

Try backing up / moving your cachedAccessories file and relaunching it.

This is the giveaway: (node:27116) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 1c130b23-dd19-4ce4-b60f-e7da10fd9d61

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lprhodes/homebridge-apple-tv/issues/13#issuecomment-379029425, or mute the thread https://github.com/notifications/unsubscribe-auth/AkAW5vqs9deuKnFLVswK5PJAyp2u7ELIks5tll93gaJpZM4TI6ZD.

felix-mcfly commented 6 years ago

Where do I find this file?

Am 05.04.2018 um 20:16 schrieb Eric Pheterson <notifications@github.com mailto:notifications@github.com>:

Try backing up / moving your cachedAccessories file and relaunching it.

This is the giveaway: (node:27116) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 1c130b23-dd19-4ce4-b60f-e7da10fd9d61

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lprhodes/homebridge-apple-tv/issues/13#issuecomment-379029425, or mute the thread https://github.com/notifications/unsubscribe-auth/AkAW5vqs9deuKnFLVswK5PJAyp2u7ELIks5tll93gaJpZM4TI6ZD.

epheterson commented 6 years ago

Within your homebridge directory

MrDrache333 commented 6 years ago

Normally its located in ./homebridge/accessories/cachedAccessories

But don’t try to get into ;) Its a File...not a Directory ;)

felix-mcfly commented 6 years ago

it doesnt change something..

this is the full homebridge output:

pi@raspberrypi:~/.homebridge/accessories $ homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
[2018-4-5 21:51:45] Loaded plugin: homebridge-apple-tv
[2018-4-5 21:51:45] Registering platform 'homebridge-apple-tv.AppleTV'
[2018-4-5 21:51:45] ---
[2018-4-5 21:51:45] Loaded plugin: homebridge-broadband
[2018-4-5 21:51:46] Registering accessory 'homebridge-broadband.Broadband'
[2018-4-5 21:51:46] ---
[2018-4-5 21:51:46] Loaded plugin: homebridge-callmonitor
[2018-4-5 21:51:46] Registering platform 'homebridge-callmonitor.CallMonitor'
[2018-4-5 21:51:46] ---
[2018-4-5 21:51:46] Loaded plugin: homebridge-gpio-device
homebridge-gpio-device API version: 2.2
[2018-4-5 21:51:46] Registering accessory 'homebridge-gpio-device.GPIODevice'
[2018-4-5 21:51:46] ---
[2018-4-5 21:51:47] Loaded plugin: homebridge-http
[2018-4-5 21:51:47] Registering accessory 'homebridge-http.Http'
[2018-4-5 21:51:47] ---
[2018-4-5 21:51:47] Loaded plugin: homebridge-sonybraviatv
[2018-4-5 21:51:47] Registering accessory 'homebridge-sonybraviatv.SonyBraviaTV'
[2018-4-5 21:51:47] ---
[2018-4-5 21:51:47] Loaded config.json with 7 accessories and 2 platforms.
[2018-4-5 21:51:47] ---
[2018-4-5 21:51:47] Loading 2 platforms...
[2018-4-5 21:51:47] [Wohnzimmer] Initializing AppleTV platform...
[2018-4-5 21:51:47] [Wohnzimmer] [INFO] Automatically discovering Apple TV's
[2018-4-5 21:51:47] [CallMonitor] Initializing CallMonitor platform...
[2018-4-5 21:51:47] [CallMonitor] CallMonitor Platform Plugin Loaded
[2018-4-5 21:51:47] [CallMonitor] Found device in config: "undefined"
[2018-4-5 21:51:47] [CallMonitor] Initializing platform accessory 'AVM Fritz!Box 7590'...
[2018-4-5 21:51:47] Loading 7 accessories...
[2018-4-5 21:51:47] [Steckdose N] Initializing Http accessory...
[2018-4-5 21:51:47] [Steckdose L] Initializing Http accessory...
[2018-4-5 21:51:47] [Steckdose M] Initializing Http accessory...
[2018-4-5 21:51:47] [Steckdose gefunden] Initializing Http accessory...
[2018-4-5 21:51:47] [Wohnzimmer TV] Initializing SonyBraviaTV accessory...
[2018-4-5 21:51:47] [Internet] Initializing Broadband accessory...
[2018-4-5 21:51:47] [Haustuer] Initializing GPIODevice accessory...
Load homebridge-callmonitor.CallMonitor
[2018-4-5 21:51:48] [homebridge-callmonitor.CallMonitor] CallMonitor Platform Plugin Loaded
[2018-4-5 21:51:48] [CallMonitor] Connected to AVM Fritz!Box 7590
[2018-4-5 21:51:52] [Wohnzimmer TV] State changed: on
[2018-4-5 21:51:52] [Wohnzimmer] [INFO] Discovered Apple TV (Wohnzimmer) at 192.168.188.29
[2018-4-5 21:51:52] [Wohnzimmer] [INFO] Added pair switch for Apple TV (Wohnzimmer) at 192.168.188.29
[2018-4-5 21:51:52] [Wohnzimmer] [INFO] Discovered Apple TV (Wohnzimmer) at 192.168.188.29
[2018-4-5 21:51:52] [Wohnzimmer] [INFO] Added pair switch for Apple TV (Wohnzimmer) at 192.168.188.29
[2018-4-5 21:51:52] [Wohnzimmer] [CONFIG ERROR] Up; No connected device could be found with a deviceID of "lounge".
[2018-4-5 21:51:52] [Wohnzimmer] Initializing platform accessory 'Pair Wohnzimmer'...
[2018-4-5 21:51:52] [Wohnzimmer] Initializing platform accessory 'Pair Wohnzimmer'...
(node:27747) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 1c130b23-dd19-4ce4-b60f-e7da10fd9d61
(node:27747) [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.
[2018-4-5 21:51:54] [Wohnzimmer] 
[2018-4-5 21:51:54] [Wohnzimmer] **************************************************************************************************************
[2018-4-5 21:51:54] [Wohnzimmer] ** Welcome to version 1.0.2 of the Homebridge Apple TV Plugin!
[2018-4-5 21:51:54] [Wohnzimmer] ** 
[2018-4-5 21:51:54] [Wohnzimmer] ** Find out what's in the latest release here: https://github.com/lprhodes/homebridge-apple-tv/releases
[2018-4-5 21:51:54] [Wohnzimmer] ** 
[2018-4-5 21:51:54] [Wohnzimmer] ** If you like this plugin then please star it on GitHub or better yet
[2018-4-5 21:51:54] [Wohnzimmer] ** buy me a drink using Paypal https://paypal.me/lprhodes or crypto https://goo.gl/bEn1RW.
[2018-4-5 21:51:54] [Wohnzimmer] ** 
[2018-4-5 21:51:54] [Wohnzimmer] ** Keep up to date with this plugin along with everything HomeKit and homebridge
[2018-4-5 21:51:54] [Wohnzimmer] ** by signing up to my newsletter at http://workswith.io
[2018-4-5 21:51:54] [Wohnzimmer] **
[2018-4-5 21:51:54] [Wohnzimmer] ** You can disable this message by adding "hideWelcomeMessage": true to the config (see config-sample.json).
[2018-4-5 21:51:54] [Wohnzimmer] **
[2018-4-5 21:51:54] [Wohnzimmer] **************************************************************************************************************
[2018-4-5 21:51:54] [Wohnzimmer] 
epheterson commented 6 years ago

Are you maybe running two versions of homebridge? I hit this issue myself before realizing I forgot to stop the homebridge that launches on boot before attempting to run an instance manually.

MrDrache333 commented 6 years ago

Thread #14 and #15 are about the same issue...look in #15...i wrote some issues

aveach commented 5 years ago

After successfully pairing then deleting ./homebridge/accessories/cachedAccessories I had the same issue where the logs looked good but homebridge didn’t actually start. Ended up having to set "showPairSwitches": false And everything works now.