homebridge-apple-tv: Conflict with homebridge-config-ui-x

It seems that the config-example.json is missing entries in the “devices” section. With the default example the plugin complains that theres no device called “lounge”. I added a simple section like

{
   "deviceID": "lounge"
}

but I am getting this error when booting up after that:

(node:27838) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'split' of undefined
(node:27838) [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.

Am I missing something else in that devices entry?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19

Most upvoted comments

The instructions are kind of misleading, especially with references to “lounge” which is the author’s Apple TV.

You’re supposed to start out with nothing in the devices[] section, and as such, any references to specific devices will throw warnings/errors.

You should see a toggle in the Home App for your Apple TV. Turning that on should put a code on the Apple TV. The Homebridge CLI will then ask you to type the code and hit enter. The CLI will then give you auth credentials to paste into the devices[] section. You can optionally name your device “lounge” to correspond with the examples in config-sample.json.

Hope this helps!

Got it… Just stop the Homebridge on Pi

  • sudo systemctl stop homebridge
  • then just run homebridge
  • Press the pair button in Home App
  • In the Terminal there you now can enter the code.
  • After this ctrl+c
  • Edit the config.json with the snipped
  • restart homebridge sudo systemctl start homebridge

thanks @epheterson for pointing to the right direction. 👍🏻

You also should be able to run homebridge directly, but not sure how to provide steps for your setup. You’d only need to run it manually once, then could go back to any other method.

For example, on my Mac it runs on boot with launchctl, but when modifying things I stop the process and run the same command manually in terminal to watch the output and debug quickly.