grover / homebridge-dacp

Remotely control Apple TV and iTunes via HomeKit.
MIT License
151 stars 14 forks source link

TvOS 12.1.2 broke the switch ? #60

Open petikist opened 5 years ago

petikist commented 5 years ago

hello, everything was working fine, with the switch activating himself when something was playing on the Apple TV, but it seems that since tvOS 12.1.2 update, the switch is not working anymore. I've try repairing, but this changed nothing.

Any idea ? thanks !

( Homebridge is running on a Mac mini Mojave )

CooperCGN commented 5 years ago

Same here, no idea what happened. When I hit the switch in the home app (or any other app) it keeps spinning the wheel.

damianromanowski commented 5 years ago

Same issue here.

maxgyver87 commented 5 years ago

Hi there just started with Hb and i can say it works right now und tvOS 12.1.2 here are my steps:

sudo npm install -g homebridge-dacp --unsafe-perm

-make sure to add YOUR “pairing" and”serviceName" to there right place like:

  "platform": "DACP",
  "devices": [
    {
    "name": "AppleTV",
    "pairing": "C68EF83FBD93B4AD",
    "serviceName": "6B91F6B4D00A1FE92ABABA9F4A3B34B0BE39DD85",
    "features": {
      "no-volume-controls": true,
      "input-controls": true

locate your DacpConnection.js file with sudo find / -name DacpConnection.js for me it was under /usr/local/lib/node_modules/homebridge-dacp/sr/dacp/

open the file DacpConnection.js in and add “Remote/1021” to line 112(agents) like so 'User-Agent': 'Remote/1021 TVRemote/186 CFNetwork/808.1.4 Darwin/16.1.0'

Reboot homebridge

Lucasfranz123321 commented 5 years ago

I tried it but it didn't work either...

fugazzy commented 5 years ago

Hi there just started with Hb and i can say it works right now und tvOS 12.1.2 here are my steps:

sudo npm install -g homebridge-dacp --unsafe-perm

-make sure to add YOUR “pairing" and”serviceName" to there right place like:

  "platform": "DACP",
  "devices": [
    {
    "name": "AppleTV",
    "pairing": "C68EF83FBD93B4AD",
    "serviceName": "6B91F6B4D00A1FE92ABABA9F4A3B34B0BE39DD85",
    "features": {
      "no-volume-controls": true,
      "input-controls": true

locate your DacpConnection.js file with sudo find / -name DacpConnection.js for me it was under /usr/local/lib/node_modules/homebridge-dacp/sr/dacp/

open the file DacpConnection.js in and add “Remote/1021” to line 112(agents) like so 'User-Agent': 'Remote/1021 TVRemote/186 CFNetwork/808.1.4 Darwin/16.1.0'

Reboot homebridge

That works fine for me now!! Thanks! But only on my Raspi not in my docker environment.

What I do get ist this - but it works - May 23 20:08:23 homebridge homebridge[5328]: error on aeSX May 23 20:08:23 homebridge homebridge[5328]: RangeError [ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8 May 23 20:08:23 homebridge homebridge[5328]: at boundsError (internal/buffer.js:49:9) May 23 20:08:23 homebridge homebridge[5328]: at Buffer.readIntBE (internal/buffer.js:324:3) May 23 20:08:23 homebridge homebridge[5328]: at _decode (/usr/local/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:927:26) May 23 20:08:23 homebridge homebridge[5328]: at _decode (/usr/local/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:933:19) May 23 20:08:23 homebridge homebridge[5328]: at Object.decode (/usr/local/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:963:10) May 23 20:08:23 homebridge homebridge[5328]: at Request.request [as _callback] (/usr/local/lib/node_modules/homebridge-dacp/src/dacp/DacpConnection.js:145:29) May 23 20:08:23 homebridge homebridge[5328]: at Request.self.callback (/usr/local/lib/node_modules/homebridge-dacp/node_modules/request/request.js:185:22) May 23 20:08:23 homebridge homebridge[5328]: at Request.emit (events.js:189:13) May 23 20:08:23 homebridge homebridge[5328]: at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-dacp/node_modules/request/request.js:1161:10) May 23 20:08:23 homebridge homebridge[5328]: at Request.emit (events.js:189:13)

CooperCGN commented 5 years ago

I got it working until the first restart of Homebridge. After that I get the above mentioned aeSX range error. I still can pause/play the Apple TV from the Home app but changes made via the remote are not reflected back into HomeKit which is the primary reason I wanted to use it to have some nice automations. This drives me nuts.