Giter Club home page Giter Club logo

homebridge-apple-tv's People

Contributors

lprhodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-apple-tv's Issues

Installation error on Synology NAS

hey,

I can't install this plugin. this is the error message:

USER: root
DIR: /homebridge
CMD: npm --no-update-notifier install --unsafe-perm --save homebridge-apple-tv@latest


> [email protected] preinstall /homebridge/node_modules/sodium
> node install.js --preinstall

Static libsodium was not found at /homebridge/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtool is required, but wasn't found on this system
make: *** [Makefile:62: libsodium] Error 1
/homebridge/node_modules/sodium/install.js:287
            throw new Error(cmdLine + ' exited with code ' + code);
            ^

Error: make libsodium exited with code 2
    at ChildProcess.<anonymous> (/homebridge/node_modules/sodium/install.js:287:19)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
npm WARN homebridge No description
npm WARN homebridge No repository field.
npm WARN homebridge No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: `node install.js --preinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-07-12T19_08_44_389Z-debug.log

Command failed. Please review log for details

How can I solve it?

can't find witch case for change audio source with long press on play/pause

I don't find the good way to add long press for change audio source.
I try to done the same method on #34 and #37 but this method work only for switch off apple tv (with long press on menu).
Somebody have try to do long press on play/pause button for change the audio source ?
I trying with all sendCommand.js case, with no result...

Error preventing install with sodium

Hi,

I'm trying to install your plugin to test and am getting the following error in terminal when I run the install command. It's struggling with sodium 2.0.3 during install.

Could there be a dependency I'm missing? I've tried installing it separately, but this has had no impact on my ability to successfully install your plugin.

In reading your instructions, I am running NodeJS 9.10.1, which I believe should work.

Any help or guidance is appreciated. Thanks!


Static libsodium was not found at /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtool is required, but wasn't found on this system
make: *** [libsodium] Error 1
/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287
throw new Error(cmdLine + ' exited with code ' + code);
^

Error: make libsodium exited with code 2
at ChildProcess. (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287:19)
at ChildProcess.emit (events.js:180:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: node install.js --preinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-04-15T21_08_58_421Z-debug.log

Always get long press with simple command.

Hi. When I use a command with Homebridge-appletv is simulating a long press. Is not posible get simple press. ¿ any help ? thanks. ( Mac )

"platforms": [
{
"platform":"AppleTV",
"name":"Apple TV",
"devices": [
{
"id": "lounge",
"name": "Lounge Apple TV",
"credentials": "..."
}

],
"accessories": [
{
"deviceID":"lounge",
"name":"Salvapantalla",
"enableAutoOff": true,

"command": [


{


  "command": "top_menu"
},

{

  "command": "menu"
}

]
}
]
}
]

Error loading plugin. Could not locate the bindings file

Hello,

I'm running my homebridge in a docker container on a RaspberryPi3. When I start the homebridge service, I see this in the logs:

homebridge_1 | [2018-4-27 18:28:34] ====================
homebridge_1 | [2018-4-27 18:28:34] ERROR LOADING PLUGIN homebridge-apple-tv:
homebridge_1 | [2018-4-27 18:28:34] Error: Could not locate the bindings file. Tried:
homebridge_1 | → /homebridge/node_modules/ed25519/build/ed25519.node
homebridge_1 | → /homebridge/node_modules/ed25519/build/Debug/ed25519.node
homebridge_1 | → /homebridge/node_modules/ed25519/build/Release/ed25519.node
homebridge_1 | → /homebridge/node_modules/ed25519/out/Debug/ed25519.node
homebridge_1 | → /homebridge/node_modules/ed25519/Debug/ed25519.node
homebridge_1 | → /homebridge/node_modules/ed25519/out/Release/ed25519.node
homebridge_1 | → /homebridge/node_modules/ed25519/Release/ed25519.node
homebridge_1 | → /homebridge/node_modules/ed25519/build/default/ed25519.node
homebridge_1 | → /homebridge/node_modules/ed25519/compiled/8.11.1/linux/arm/ed25519.node
homebridge_1 | at bindings (/homebridge/node_modules/bindings/bindings.js:88:9)
homebridge_1 | at Object. (/homebridge/node_modules/ed25519/index.js:1:99)
homebridge_1 | at Module._compile (module.js:652:30)
homebridge_1 | at Object.Module._extensions..js (module.js:663:10)
homebridge_1 | at Module.load (module.js:565:32)
homebridge_1 | at tryModuleLoad (module.js:505:12)
homebridge_1 | at Function.Module._load (module.js:497:3)
homebridge_1 | at Module.require (module.js:596:17)
homebridge_1 | at require (internal/module.js:11:18)
homebridge_1 | at Object. (/homebridge/node_modules/node->appletv/dist/lib/pairing.js:5:17)
homebridge_1 | [2018-4-27 18:28:34] ====================

I tried the steps in this post (different issue, but similar) with no luck. Any ideas?
homebridge/homebridge#962

Cannot pair Apple TV - Homebridge log doesn't response to Input

Hey, I successfully installed your Plugin, but when I start Homebridge via SSH on my Mac and then I press the Button "Pair Apple TV" in my Home App, the Apple TV shows me a Pin an the TV, i cannot pair the Homebridge to the Apple TV.
When i see the PIN on the TV I go into the Homebridge Log (via Terminal) and see the Command: [INFO] Type the Apple TV pairing code then press enter/return.
But when i insert the PIN (and press Enter)nothing happens.

Apr 08 21:38:11 hbridge2 homebridge[24754]: [INFO] Type the Apple TV pairing code then press enter/return.
`8761`
Apr 08 21:39:38 hbridge2 homebridge[24754]: ...

Can someone please help me.

Maybe its to easy :)

libsodium

for command:

npm install -g homebridge-apple-tb

I'm getting:

npm ERR! code E404
npm ERR! 404 Not Found: homebridge-apple-tb@latest

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2018-12-17T03_27_40_981Z-debug.log

[note] 404 File not found (https://lprhodes.github.io/homebridge-apple-tv-slate/config-sample.json)

@lprhodes Hey there...
Thanks for your great work with this and other homebridge plugins. 👍

I notices that the link in your documentation
https://lprhodes.github.io/homebridge-apple-tv-slate/#installation

to the config-sample.json is not working.
https://lprhodes.github.io/homebridge-apple-tv-slate/config-sample.json

It should be like this or so.
https://github.com/lprhodes/homebridge-apple-tv/blob/master/config-sample.json

The same with the homebridge-broadlink-rm plugin
https://lprhodes.github.io/slate/#installation

Hope this helps. ;)
Looking forward to your ongoing work. Thanks again.

Multiple ATV and "defaultSwitchesIncludeATVName": true results in wrong labeling

I have an ATV in the living room and one in the Bedroom. Configuration with the option:

"defaultSwitchesIncludeATVName": true

results in wrong labels:

[2018-9-8 01:11:37] [Apple TV] Mic/Siri (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Menu (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Select (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] TV/Home (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Up (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] TV/Home (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Sleep (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Mic/Siri (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Down (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Left (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Right (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Pause (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Right (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Pause (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Up (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Play (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Sleep (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Left (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Play (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Down (Living Room) (Master Bedroom) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Menu (Living Room) getSwitchState: false
[2018-9-8 01:11:37] [Apple TV] Select (Living Room) getSwitchState: false

Multiple Device Format

What am I doing wrong here? I'm not an expert, but I've usually been able to figure out how to write the code. I know I'm not following a correct format but I cant figure out what it is. When adding the second device to the accessories it only loads the first one and not the second one.

`

"platforms": [{
	"platform": "BelkinWeMo",
	"name": "WeMo Platform"
}, {
	"platform": "Hue",
	"users": {"001788FFFE102492": "
	},
	"lights": true
}, {
	"platform": "Wink",
	"name": "Wink",
	"client_id": "gYRevDb3tho9kFU",
	"client_secret": "aP5EQo0lB",
	"fan_ids": [744103,746203],
	"hide_groups": ["garage_door","thermostat"],
	"access_token": "w0O_t_HkG8Wmgx",
	"refresh_token": "GxfOVNdBL1v9bl"
}, {    
            "platform": "AppleTV",
	"name": "Apple TV",
	"showPairSwitches": false,
            "hideWelcomeMessage": true,
	"devices": [{
		"id": "LivingRoom",
		"name": "Living Room Apple TV",
		"credentials": "648BCA9D-BBA2-4581-9448-01B8A77E911F:343837382d344637372d344230352d423642312d384336343144303532344436:31613434343564372d643963612d346663652d626531302d393063343132623331316438:e28f4d7479e0c3ae9624e3050cbce6939b3ac176242daed6bca41ee0312dce95:af14526c9d3d31b76301f8fbf151a0cd1a4a101d83e79"
	},           {
                    "id":  "Bedroom",
                    "name": "Bedroom TV",
                    "credentials": "3C07946F-6A8E-4C8F-22F9-626675991AD3:38353532383532392d463331302d343337432d393231382d363639463839433341314531:39366537353638332d653564342d343761632d393662612d653339663461323861333565:552cf616faba23e0c8bafc7ba5857b911b923f84ad202e19a95c4cc158e6f900:7c1a8fa45a6af521acea258959bfbf175fcf53af95d3269ea6a20630"
            }
            ],
	"accessories": [{
			"deviceID": "Bedroom",
			"name": "Cable",
			"command": [
                              {
                                "command": "tv",
                                "repeat": 2,
                                "interval": 3.0,
                                "pause": 4.0
                                
                              },
                              {
                                "command": "select"
                              },
                            {
                            "deviceID": "LivingRoom",
                            "name": "Directv",
                            "command": [
                              {
                               "command": "tv",
                               "repeat": 2,
                               "interval": 3.0,
                               "pause": 4.0
                              },
                              {
                               "command": "select"
                              }
                            ]
                        }
                      ]
                   }
                ]
    }, {

	"platform": "ZP",
	"service": "light",
	"brightness": true,
	"speakers": true
}]

}`

Manage ATV state

Hi all!

Is it possible to implement something like this:

One switch for the ATV. Which is on if the ATV is running and off if not. And for sure, sending an ON command if it's off and an OFF command if it's on.
Is there somehow a chance to ask the ATV about his state? Unfortunately ATV is always giving a ping back even in Sleep state.

Could find anything similar in the node-appletv package. Somebody got a workaround for this?

State tile to sleep/wake Apple TV

It'd be cool if there were one tile representing the power state of the Apple TV that, when tapped, toggled the state.

Can we query on/off state of Apple TV to properly light up the tile?

Any way to do a press & hold advanced command?

I'd like to add a few commands that involve pressing and holding buttons for a duration of time. Is there any way to do that in an advanced command? I only saw ways to string multiple commands together with pause periods in between.

For example, I'd like to..

  • Press & hold "menu" for 2 seconds to go to the home screen
  • Press & hold "tv" for 2 seconds and then press "select" to put the Apple TV to sleep
  • Press & hold "siri" for 5 seconds to give me enough time to talk to the remote and give the TV a command.

Help with error

I was able to install the AppleTV plugin, but after adding the plugin to my Homebridge config file I'm getting the following error, and Homebridge is crashing. I will appreciate your help.

[8/27/2018, 7:08:04 PM] [Apple TV] [INFO] Discovered Apple TV (Estudio Merce) at 192.168.1.53
[8/27/2018, 7:08:04 PM] [Apple TV] [INFO] Added pair switch for Apple TV (Estudio Merce) at 192.168.1.53

[8/27/2018, 7:08:04 PM] [Apple TV] [INFO] Discovered Apple TV (Alcoba) at 192.168.1.57
[8/27/2018, 7:08:04 PM] [Apple TV] [INFO] Added pair switch for Apple TV (Alcoba) at 192.168.1.57
[8/27/2018, 7:08:04 PM] [Apple TV] [INFO] Discovered Apple TV (Alcoba) at 192.168.1.57
[8/27/2018, 7:08:04 PM] [Apple TV] [INFO] Added pair switch for Apple TV (Alcoba) at 192.168.1.57

[8/27/2018, 7:08:04 PM] [Apple TV] [INFO] Discovered Apple TV (Estudio Merce) at 192.168.1.53
[8/27/2018, 7:08:04 PM] [Apple TV] [INFO] Added pair switch for Apple TV (Estudio Merce) at 192.168.1.53

[8/27/2018, 7:08:04 PM] [Apple TV] No accessories have been added to the "Apple TV" platform config.

[8/27/2018, 7:08:04 PM] [Apple TV] Initializing platform accessory 'Pair Estudio Merce'...
[8/27/2018, 7:08:04 PM] [Apple TV] Initializing platform accessory 'Pair Alcoba'...
[8/27/2018, 7:08:04 PM] [Apple TV] Initializing platform accessory 'Pair Alcoba'...

(node:2664) UnhandledPromiseRejectionWarning: Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: a8855172-e897-461c-9256-24a8026b7d84
at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:264:13)
at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:398:24)
at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19
at AppleTVPlatform.accessories (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/homebridge-platform-helper/platform.js:42:14)

(node:2664) 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:2664) [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.

[Bug] Homebridge loses accessories when AppleTV isn't found

When the AppleTV isn't found during startup HomeKit will remove the associated devices which results in broken scenes and other issues.

The plugin could hold the homebridge startup when AppleTV isn't found or it could simply add the switches for HomeKit anyway and continue to try and connect in the background (this probably ties in with #18)

Cant install

Hello

did follow:

sudo apt-get install libtool autoconf automake
sudo npm install -g homebridge-apple-tv

get errors:

root@raspberrypi:~# sudo npm install -g homebridge-apple-tv
                                                                                                                               
> [email protected] preinstall /usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium
> node install.js --preinstall

Static libsodium was not found at /usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtoolize:   error: Failed to create 'build-aux'
Makefile:61: recept voor doel 'libsodium' is mislukt
make: *** [libsodium] Fout 1
/usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287
            throw new Error(cmdLine + ' exited with code ' + code);
            ^

Error: make libsodium exited with code 2
    at ChildProcess.<anonymous> (/usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287:19)
    at ChildProcess.emit (events.js:189:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! code ELIFECYCLE                                                                                                       
npm ERR! errno 1
npm ERR! [email protected] preinstall: `node install.js --preinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-02-05T09_29_41_272Z-debug.log

What can this be?

Credentials

I was trying to install this Plugin with Auto Discovering mode but could not manage to get it to work.
I read other Posts with People who were having similar Problems and who recommended just to do the Pairing manualy and configure it with the autodiscover.

But i don't have a clue what I have to use for credentials mentioned in the example config.json.

{
"id": "lounge",
"name": "Lounge Apple TV",
"credentials": "..."
}

I do have a "pairing" ID (16 Digits) and a Service Name (40 Digits) don't I Need both? and which one would I Need to enter unter credentials?
I asume "id" and "name" are 2 values that I can choose free.

Thanks for some clarification on how to get this Setup

Apple TV is found twice - plugin fails

After I first couldn't discover my AppleTV at all (see #9) it seems like the plugin is discovering my AppleTV twice now :)

This causes the plugin to crash homebridge because it tries to create two pair switches with the same name:

[2018-4-6 18:11:35] [Apple TV] [INFO] Discovered Apple TV (Apple TV) at 192.168.2.113
[2018-4-6 18:11:35] [Apple TV] [INFO] Added pair switch for Apple TV (Apple TV) at 192.168.2.113
[2018-4-6 18:11:35] [Apple TV] [INFO] Discovered Apple TV (Apple TV) at 192.168.2.113
[2018-4-6 18:11:35] [Apple TV] [INFO] Added pair switch for Apple TV (Apple TV) at 192.168.2.113
[2018-4-6 18:11:35] [Apple TV] [INFO] Connecting to "Apple TV"
[2018-4-6 18:11:35] [cmdSwitch2] 3D Drucker is off.
[2018-4-6 18:11:36] [Apple TV] [INFO] Connected to "Apple TV"
[2018-4-6 18:11:36] [Apple TV] Initializing platform accessory 'Pair Apple TV'...
[2018-4-6 18:11:36] [Apple TV] Initializing platform accessory 'Pair Apple TV'...
[2018-4-6 18:11:36] [Apple TV] 

causing this:

(node:8016) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: f958068f-b583-49f2-bd3b-5f17f6e254b6
(node:8016) [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.

This happens with a clean homebridge with only the Apple TV plugin enabled.

Edit: When I get the credentials manually using the command line tool and set the setEnablePairSwitches to false the plugin works as expected.

Documentation for newly installed Homebridge users

Just comment for documentation. For different operating system, some repositories my not work work correctly for pulling code. For example, i was trying to trouble shoot why "npm install -g homebridge-apple-tv" would throw errors every time i tried it. I kept doing so after manually adding homebrew, libsodium and libtool individual to osx. This was simply remedied by running this code instead "sudo npm install -g --unsafe-perm homebridge-apple-tv" This was able to let the script pull everything it needed and not throw errors.

Also on your gethub page, your install script is "npm install -g homebridge-apple-tb" instead of "V"

Thanks for this contribution to my smart home!

Cannot install Error: [email protected]

I was trying to get this plugin installed on my home bridge docker, but I am hitting some issues with installing sodium. I am using the oznu home bridge docker and this is my startup.sh

apk add libtool
apk add autoconf
apk add automake
apk add libsodium
apk add g++
npm rebuild
verbose stack Error: [email protected] install: `node install.js --install`
verbose stack Exit status 1
verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
verbose stack     at EventEmitter.emit (events.js:182:13)
verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
verbose stack     at ChildProcess.emit (events.js:182:13)
verbose stack     at maybeClose (internal/child_process.js:962:16)
verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
verbose pkgid [email protected]
verbose cwd /homebridge
verbose Linux 4.18.17-unRAID
verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-apple-tv" "--unsafe-perm"
verbose node v10.13.0
verbose npm  v6.4.1
error code ELIFECYCLE
error errno 1
error [email protected] install: `node install.js --install`
error Exit status 1
error Failed at the [email protected] install script.
error This is probably not a problem with npm. There is likely additional logging output above.
6656 verbose exit [ 1, true ]

Standard button layout?

It looks like currently you need to manually define each button you think you may use. That's kinda cumbersome, it'd be cool if all possible options could be exposed instead.

There are two ideas here, one could be that you create all the switches on one accessory which can be used in Eve app or something, or a set of switches that show up individually in the Home App.

I like the idea that you can also define custom buttons, especially macros, but a standard set would be a big convenience.

Updates?

Hi, did you have any progress with this plugin? If not, im going to start a simple ON/OFF Homebridge Plugin.

Thanks!

[Bug] Plugin can miss the AppleTV packets during startup

As I found out while investigating issue #9 the AppleTV plugin fails to discover the AppleTV when the homebridge server is very busy during startup. This is probably happening when the plugin doesn't get any CPU cycles while the UDP packet arrives.

As UDP packets are unreliable anyway I suppose having the AppleTV retry discovering the AppleTV after a while would be a good idea?

Thanks for this plugin - I can finally tell Siri to turn on the fireplace ;)

multiple apple tv with same label

All is working fine but I see double of all buttons labeled with "Living Room Apple TV" instead of a set for living room and a set for master bedroom. Am I doing something wrong?

Here is my config:
{
"platform": "AppleTV",
"name": "Apple TV",
"devices": [
{
"id": "livingroom",
"name": "Living Room Apple TV",
"credentials": "..."
},
{
"id": "masterbedroom",
"name": "Master Bedroom Apple TV",
"credentials": "..."
}
],
"hideWelcomeMessage": true,
"showDefaultSwitches": true,
"defaultSwitchesIncludeATVName": true,
"showPairSwitches": false
}

Default Switches "showDefaultSwitches": true

Default Switches "showDefaultSwitches": true didn't work here.
The switches are showing up do not auto switch off when pressed and they don't send a command to Apple TV

{
            "platform": "AppleTV",
            "hideWelcomeMessage": true,
            "showDefaultSwitches": true,
            "name": "Apple TV 4k",
            "devices": [
                {
                    "id": "lounge",
                    "name": "Lounge Apple TV",
                    "credentials": "xxxxx-xxxxxxx"
                }
            ],
            "accessories": [
                {
                    "deviceID": "lounge",
                    "name": "Hoch",
                    "command": "up"
                }
            ]
        },
Apr 04 13:54:32 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:32] [Apple TV 4k] Play (Lounge Apple TV) getSwitchState: false
Apr 04 13:54:32 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:32] [Apple TV 4k] Sleep (Lounge Apple TV) getSwitchState: false
Apr 04 13:54:32 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:32] [Apple TV 4k] Pause (Lounge Apple TV) getSwitchState: false
Apr 04 13:54:32 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:32] [Apple TV 4k] Down (Lounge Apple TV) getSwitchState: false
Apr 04 13:54:32 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:32] [Apple TV 4k] Select (Lounge Apple TV) getSwitchState: false
Apr 04 13:54:32 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:32] [Apple TV 4k] Left (Lounge Apple TV) getSwitchState: false
Apr 04 13:54:32 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:32] [Apple TV 4k] Right (Lounge Apple TV) getSwitchState: false
Apr 04 13:54:32 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:32] [Apple TV 4k] TV/Home (Lounge Apple TV) getSwitchState: false
Apr 04 13:54:32 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:32] [Apple TV 4k] Menu (Lounge Apple TV) getSwitchState: false
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:51] [Apple TV 4k] TV/Home (Lounge Apple TV) setSwitchState: true
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:54:51] [Apple TV 4k] TV/Home (Lounge Apple TV) sendCommand (tv)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]: (node:298) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sendKeyPressAndRelease' of undefined
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at module.exports (/usr/local/lib/node_modules/homebridge-apple-tv/helpers/sendCommand.js:37:21)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at SwitchAccessory.performSend (/usr/local/lib/node_modules/homebridge-apple-tv/accessories/accessory.js:39:7)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at SwitchAccessory.setSwitchState (/usr/local/lib/node_modules/homebridge-apple-tv/accessories/switch.js:78:29)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at SwitchAccessory.setCharacteristicValue (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/homebridge-platform-helper/accessory.js:139:10)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at Characteristic.On.emit (events.js:180:13)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at Characteristic.On.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:319:10)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:867:22)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at Array.forEach (<anonymous>)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at Bridge.Accessory._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:807:8)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at HAPServer.emit (events.js:180:13)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:972:10)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at HAPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at IncomingMessage.emit (events.js:180:13)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at endReadableNT (_stream_readable.js:1106:12)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]:     at process._tickCallback (internal/process/next_tick.js:114:19)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]: (node:298) 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: 3)
Apr 04 13:54:51 raspberrypi-3BPlus homebridge[298]: (node:298) [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.
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:55:07] [Apple TV 4k] Up (Lounge Apple TV) setSwitchState: true
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]: [2018-4-4 13:55:07] [Apple TV 4k] Up (Lounge Apple TV) sendCommand (up)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]: (node:298) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sendKeyPressAndRelease' of undefined
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at module.exports (/usr/local/lib/node_modules/homebridge-apple-tv/helpers/sendCommand.js:10:21)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at SwitchAccessory.performSend (/usr/local/lib/node_modules/homebridge-apple-tv/accessories/accessory.js:39:7)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at SwitchAccessory.setSwitchState (/usr/local/lib/node_modules/homebridge-apple-tv/accessories/switch.js:78:29)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at SwitchAccessory.setCharacteristicValue (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/homebridge-platform-helper/accessory.js:139:10)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at Characteristic.On.emit (events.js:180:13)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at Characteristic.On.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:319:10)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:867:22)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at Array.forEach (<anonymous>)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at Bridge.Accessory._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:807:8)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at HAPServer.emit (events.js:180:13)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:972:10)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at HAPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at IncomingMessage.emit (events.js:180:13)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at endReadableNT (_stream_readable.js:1106:12)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]:     at process._tickCallback (internal/process/next_tick.js:114:19)
Apr 04 13:55:07 raspberrypi-3BPlus homebridge[298]: (node:298) 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: 6)

How do I enter the code displayed on my Apple TV?

Hi,

I am running homebridge-apple-tv plugin on my Synology NAS using the docker installation

In your documentation you say that after the TV is discovered I need to enter the code displayed on the screen but how can I do this? The web interface doesn't let me enter anything...

thank you for your help !

Powercut - now previous pairing is lost - HELP

We had a power cut for 5hrs and the Apple TV remote pairing for all remotes including this homebridge plugins were lost.

What is the process to re-pair it with my config still having the existing credentials?

Thanks!

Less verbose logging?

It looks like we're logging 4 lines for each button press. That's maybe a little excessive, as only one is necessary and the rest is a bit redundant.

We currently print:

[2018-4-2 21:23:26] [Apple TV] Down setSwitchState: true
[2018-4-2 21:23:26] [Apple TV] Down sendCommand (down)
[2018-4-2 21:23:26] [Apple TV] Down setSwitchState: (automatically turn off in 0.1 seconds)
[2018-4-2 21:23:26] [Apple TV] Down setSwitchState: false

Instead it should only print:
[2018-4-2 21:23:26] [Apple TV] Down sendCommand (down)

The setting in config.js defines the enableAutoOff behavior, so printing on/action/timer/off is unnecessary.

Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory

Hello

I'm posting this after reviewing several similar open issues (#13 #14 & #15 ) I read the threads over and over and couldn't understand if the issue is resolved or not and what steps may help. Excuse me for duplicating

I can't perform the pairing and the error is the "same UUID". Here is the full message for reference:

May 07 21:04:26 raspberrypi homebridge[9934]: [2018-5-7 21:04:26] [Apple TV] [INFO] Discovered Apple TV (Apple TV) at 192.168.14.77
May 07 21:04:26 raspberrypi homebridge[9934]: [2018-5-7 21:04:26] [Apple TV] [INFO] Added pair switch for Apple TV (Apple TV) at 192.168.14.77
May 07 21:04:26 raspberrypi homebridge[9934]: [2018-5-7 21:04:26] [Apple TV] [INFO] Discovered Apple TV (Apple TV) at 192.168.14.77
May 07 21:04:26 raspberrypi homebridge[9934]: [2018-5-7 21:04:26] [Apple TV] [INFO] Added pair switch for Apple TV (Apple TV) at 192.168.14.77
May 07 21:04:26 raspberrypi homebridge[9934]: [2018-5-7 21:04:26] [Apple TV] [CONFIG ERROR] Up; No connected device could be found with a deviceID of "lounge".
May 07 21:04:26 raspberrypi homebridge[9934]: [2018-5-7 21:04:26] [Apple TV] Initializing platform accessory 'Pair Apple TV'...
May 07 21:04:26 raspberrypi homebridge[9934]: [2018-5-7 21:04:26] [Apple TV] Initializing platform accessory 'Pair Apple TV'...
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV]
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] **************************************************************************************************************
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] ** Welcome to version 1.0.2 of the Homebridge Apple TV Plugin!
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] **
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] ** Find out what's in the latest release here: https://github.com/lprhodes/homebridge-apple-tv/releases
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] **
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] ** If you like this plugin then please star it on GitHub or better yet
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] ** buy me a drink using Paypal https://paypal.me/lprhodes or crypto https://goo.gl/bEn1RW.
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] **
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] ** Keep up to date with this plugin along with everything HomeKit and homebridge
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] ** by signing up to my newsletter at http://workswith.io
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] **
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] ** You can disable this message by adding "hideWelcomeMessage": true to the config (see config-sample.json).
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] **
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV] **************************************************************************************************************
May 07 21:04:27 raspberrypi homebridge[9934]: [2018-5-7 21:04:27] [Apple TV]
May 07 21:04:27 raspberrypi homebridge[9934]: (node:9934) UnhandledPromiseRejectionWarning: Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: xxxxx-xxxxxx-xxxxxx
May 07 21:04:27 raspberrypi homebridge[9934]:     at Bridge.Accessory.addBridgedAccessory (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:264:13)
May 07 21:04:27 raspberrypi homebridge[9934]:     at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:377:24)
May 07 21:04:27 raspberrypi homebridge[9934]:     at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19
May 07 21:04:27 raspberrypi homebridge[9934]:     at AppleTVPlatform.accessories (/usr/lib/node_modules/homebridge-apple-tv/node_modules/homebridge-platform-helper/platform.js:50:5)
May 07 21:04:27 raspberrypi homebridge[9934]:     at <anonymous>:null:null
May 07 21:04:27 raspberrypi homebridge[9934]: (node:9934) 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)
May 07 21:04:27 raspberrypi homebridge[9934]: (node:9934) [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.

Here is the configuration from config.json:

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

I reviewed issues #13 #14 & #15 but I couldn't understand what am I doing wrong...
I tried deleting the cachedAccessories file but that didn't help

Any help is highly appreciated.

Environment Information:

Device: Raspberry Pi 3 Model B+
Homebridge: 0.4.38

systemd configuration:

$ cat /etc/systemd/system/homebridge.service

[Unit]
Description=Node.js HomeKit Server
After=syslog.target network-online.target

[Service]
Type=simple
User=pi
EnvironmentFile=/etc/default/homebridge
ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS
Restart=on-failure
RestartSec=10
KillMode=process

[Install]
WantedBy=multi-user.target

$ cat /etc/default/homebridge

# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/homebridge

# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*

$ ls -R /var/homebridge/

/var/homebridge/:
accessories  auth.json  config.json  persist  plugin-persist

/var/homebridge/accessories:
cachedAccessories

/var/homebridge/persist:
AccessoryInfo.CC223DE3CE30.json  IdentifierCache.CC223DE3CE30.json

/var/homebridge/plugin-persist:
homebridge-broadlink-rm

/var/homebridge/plugin-persist/homebridge-broadlink-rm:

Error: 404 Not Found: homebridge-apple-tb@latest

Hello,
When installing homebridge-apple-tv I get this error:

http fetch GET 404 https://registry.npmjs.org/homebridge-apple-tb 900ms
8 silly fetchPackageMetaData error for homebridge-apple-tb@latest 404 Not Found: homebridge-apple-tb@latest
9 verbose stack Error: 404 Not Found: homebridge-apple-tb@latest

And when I visit the link "https://registry.npmjs.org/homebridge-apple-tb" I arrive on a blank webpage with this message "{"error":"Not found"}".
Could you help me with this is issue?

Best regards,
Thomas

no such file or directory DeviceInfoUpdate.proto

no such file or directory, open '/usr/local/lib/node_modules/homebridge/node_modules/node-appletv/dist/lib/protos/DeviceInfoUpdate.proto

File is not present when browsing the folder. Please advise, this is otherwise working awesome, except this missing file crashes homebridge every so often.

documentation error

on github.io under the installation section you have:

Install this plugin using: npm install -g homebridge-apple-tb

note that it should be

Install this plugin using: npm install -g homebridge-apple-tv

HDMI-CEC commands

The sleep and suspend command does only turn the ATV off. The TV will stay on.
If I turn off the ATV with the remote (long press on TV button, then sleep) also the TV goes off over HDMI-CEC.

Install Failed

pi@raspberrypi:~ $ sudo npm install -g homebridge-apple-tv
npm WARN lifecycle [email protected]~preinstall: cannot run in wd %s %s (wd=%s) [email protected] node install.js --preinstall /usr/lib/node_modules/.staging/sodium-baf38b6a

[email protected] install /usr/lib/node_modules/homebridge-apple-tv/node_modules/mdns
node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/7.10.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/homebridge-apple-tv/node_modules/mdns/.node-gyp"
make: Entering directory '/usr/lib/node_modules/homebridge-apple-tv/node_modules/mdns/build'
CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
make: g++: Command not found
dns_sd_bindings.target.mk:149: recipe for target 'Release/obj.target/dns_sd_bindings/src/dns_sd.o' failed
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 127
make: Leaving directory '/usr/lib/node_modules/homebridge-apple-tv/node_modules/mdns/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.14.30-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/homebridge-apple-tv/node_modules/mdns
gyp ERR! node -v v7.10.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
/usr/lib
└── (empty)

npm ERR! Linux 4.14.30-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "homebridge-apple-tv"
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mdns
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mdns
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2018-04-03T03_12_07_273Z-debug.log
pi@raspberrypi:~ $ node -v
v7.10.1

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?

Homebridge doesnt start

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!

What does this error mean? - HELP

Was working fine when I set it up. Then a couple of days later I pressed the accessories I set up in the home app and they turned on and off accordingly but no response from the apple tv (which was on)

This is the error I got:

[2018-4-17 09:39:53] [Apple TV] Freeview sendCommand (tv)
[2018-4-17 09:39:55] [Apple TV] Freeview sendCommand (tv)
(node:91865) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/node-appletv/dist/lib/protos/DeviceInfoUpdate.proto'
(node:91865) [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-17 09:39:56] [Apple TV] Freeview sendCommand (right)
[2018-4-17 09:39:56] [Apple TV] Freeview sendCommand (right)
[2018-4-17 09:39:57] [Apple TV] Freeview sendCommand (right)
[2018-4-17 09:39:57] [Apple TV] Freeview sendCommand (select)
[2018-4-17 09:39:58] [Apple TV] Freeview setSwitchState: (automatically turn off in 0.1 seconds)
[2018-4-17 09:39:58] [Apple TV] Freeview setSwitchState: false

Any help would be appreciated.

Thanks!

Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory

I am getting this error when starting up Homebridge ...

(node:24845) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 794d9787-a521-432e-9841-a7a7490ea5d7
(node:24845) 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.