lukasroegner / homebridge-apple-tv-remote

Plugin for controlling Apple TVs in homebridge.
MIT License
131 stars 13 forks source link

Error credential when connecting #31

Closed italoc closed 4 years ago

italoc commented 4 years ago

I have the latest version of homebridge and latest version of this plugin, after configuration of credentials, always obtain this error

Error while connecting: Error: Apple TV not found while scanning.

lukasroegner commented 4 years ago

Did you execute the appletv pair command on the same device? Make sure that the plugin is not blocked by a firewall.

italoc commented 4 years ago

Did you execute the appletv pair command on the same device? Make sure that the plugin is not blocked by a firewall.

Yes and if i execute appletv command menu —credential key works great, thse same key with another plugin work

lukasroegner commented 4 years ago

Please add an additional (undocumented) property to the config.json:

"platform": "AppleTvPlatform",
"scanTimeout": 10,
 "devices": [...

This increases the timeout that is used when scanning for Apple TVs on the network.

italoc commented 4 years ago

"platform": "AppleTvPlatform", "scanTimeout": 10, "devices": [...

with timeout works great

thanks

d3bing commented 4 years ago

I'm having same issues. I tried timeout but no luck. It's keeping my whole HB off-line.

[5/26/2020, 6:33:10 PM] [Apple TV Platform] [Living Room] Error while connecting: Error: Apple TV not found while scanning. [5/26/2020, 6:33:25 PM] [Apple TV Platform] [Bedroom] Error while connecting: Error: Apple TV not found while scanning. [5/26/2020, 6:33:25 PM] Error: This socket has been ended by the other party at Socket.writeAfterFIN [as write] (net.js:452:14) at /homebridge/node_modules/homebridge-apple-tv-remote/node_modules/node-appletv-x/dist/lib/connection.js:165:33 at new Promise () at Connection.sendProtocolMessage (/homebridge/node_modules/homebridge-apple-tv-remote/node_modules/node-appletv-x/dist/lib/connection.js:134:16) at Connection.send (/homebridge/node_modules/homebridge-apple-tv-remote/node_modules/node-appletv-x/dist/lib/connection.js:130:21) at /homebridge/node_modules/homebridge-apple-tv-remote/node_modules/node-appletv-x/dist/lib/appletv.js:182:22 [5/26/2020, 6:33:25 PM] Got SIGTERM, shutting down Homebridge... [5/26/2020, 6:33:25 PM] [Apple TV Platform] Shutting down Apple TV clients...