Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on aeSX RangeError [ERR_OUT_OF_RANGE] #43

Open
theOneRazvan opened this issue May 12, 2018 · 13 comments
Open

error on aeSX RangeError [ERR_OUT_OF_RANGE] #43

theOneRazvan opened this issue May 12, 2018 · 13 comments

Comments

@theOneRazvan
Copy link

[2018-5-12 17:59:07] [DACP] The accessory AppleTV is announced as 10.0.1.84:3689.
[2018-5-12 17:59:07] [DACP] It's an AppleTV6,2 named Apple TV
[2018-5-12 17:59:07] [DACP] Attempting to reconnect to AppleTV in 0.1 seconds.
[2018-5-12 17:59:07] [DACP] Connecting to AppleTV (10.0.1.84:3689)
[2018-5-12 17:59:07] [DACP] Creating status connection to 10.0.1.84:3689
Established connection to 10.0.1.84:3689 with session ID 2
error on aeSX
RangeError [ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8
at boundsError (internal/buffer.js:55:9)
at Buffer.readIntBE (internal/buffer.js:330:3)
at _decode (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:927:26)
at _decode (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:933:19)
at Object.decode (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:963:10)
at Request.request [as _callback] (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/src/dacp/DacpConnection.js:145:29)
at Request.self.callback (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/node_modules/request/request.js:186:22)
at Request.emit (events.js:182:13)
at Request. (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/node_modules/request/request.js:1163:10)
at Request.emit (events.js:182:13)
at IncomingMessage. (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1086:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
[2018-5-12 17:59:08] [DACP] Connected to Apple TV

After that the Apple TV does not appear in HomeKit. Please help. Thank you!

@theOneRazvan
Copy link
Author

I changed the config features from both true to both false:
"features": {
"no-volume-controls": false,
"input-controls": false
}
and now I get the error:

[2018-5-12 18:05:07] [DACP] Initializing DACP platform...
[2018-5-12 18:05:07] [DACP] DACP Platform Plugin Loaded - Version 0.9.2
[2018-5-12 18:05:07] [DACP] Found accessory in config: "AppleTV"

/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/src/DacpAccessory.js:61
...this.getInputControlService(homebridge),
^
TypeError: this.getInputControlService(...) is not a function or its return value is not iterable
at DacpAccessory.createServices (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/src/DacpAccessory.js:61:15)
at new DacpAccessory (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/src/DacpAccessory.js:45:27)
at _accessories.devices.map.device (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/src/index.js:201:14)
at Array.map ()
at DacpPlatform.accessories (/root/.nvm/versions/node/v10.1.0/lib/node_modules/homebridge-dacp/src/index.js:174:33)
at Server._loadPlatformAccessories (/usr/lib/node_modules/homebridge/lib/server.js:364:20)
at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:308:16)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:85:36)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)

@badrabbit
Copy link

Same issue here:

[2018-5-28 18:44:09] [DACP] Creating status connection to 10.0.1.7:3689
Established connection to 10.0.1.7:3689 with session ID 18
error on aeSX
RangeError [ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8
at boundsError (internal/buffer.js:55:9)
at Buffer.readIntBE (internal/buffer.js:330:3)
at _decode (/usr/local/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:927:26)
at _decode (/usr/local/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:933:19)
at Object.decode (/usr/local/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:963:10)
at Request.request [as _callback] (/usr/local/lib/node_modules/homebridge-dacp/src/dacp/DacpConnection.js:145:29)
at Request.self.callback (/usr/local/lib/node_modules/homebridge-dacp/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request. (/usr/local/lib/node_modules/homebridge-dacp/node_modules/request/request.js:1157:10)
at Request.emit (events.js:182:13)
at IncomingMessage. (/usr/local/lib/node_modules/homebridge-dacp/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1086:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
[2018-5-28 18:44:09] [DACP] Connected to Apple TV

Config:

"platforms": [
{
"platform": "DACP",
"devices": [
{
"name": "AppleTV4K",
"pairing": "F431C156312EEDE2",
"serviceName": "C2C5EE874E4657B4847F9BCB7CCAC30B81A5DE03",
"macros": {
"WakeSleep": [
"topmenu",
"menu"
]
},
"features": {
"no-volume-controls": true,
"input-controls": true
}
}
]
},

@node-ks
Copy link

node-ks commented May 31, 2018

Just got this error also, HomeKit shows Not Supported as a status

@gjones
Copy link

gjones commented Jun 23, 2018

Yep, +1 on this, haven't figured out a way around it as of yet.

@h00pak
Copy link

h00pak commented Jul 7, 2018

Same here, with Home showing Not Supported.

[7/7/2018, 6:22:35 AM] [DACP] It's an AppleTV6,2 named Great Room
Attempting to reconnect to AppleTV in 0.1 seconds.
Connecting to AppleTV (192.168.1.84:3689)
Creating status connection to 192.168.1.84:3689

Established connection to 192.168.1.84:3689 with session ID 3
error on aeSX
RangeError [ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8
at boundsError (internal/buffer.js:55:9)
at Buffer.readIntBE (internal/buffer.js:330:3)
at _decode (/usr/local/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:927:26)
at _decode (/usr/local/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:933:19)
at Object.decode (/usr/local/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:963:10)
at Request.request [as _callback] (/usr/local/lib/node_modules/homebridge-dacp/src/dacp/DacpConnection.js:145:29)
at Request.self.callback (/usr/local/lib/node_modules/homebridge-dacp/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request. (/usr/local/lib/node_modules/homebridge-dacp/node_modules/request/request.js:1157:10)
at Request.emit (events.js:182:13)
at IncomingMessage. (/usr/local/lib/node_modules/homebridge-dacp/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1081:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

Config:
{
"platform": "DACP",
"devices": [
{
"name": "AppleTV",
"pairing": "5D252E636C94D432",
"serviceName": "DBE927D0B39B941F3D1B91A761B0F59801A050C7",
"features": {
"input-controls": true
}
}
]
}

@metalmarco
Copy link

same here

@Dorokah
Copy link

Dorokah commented Nov 23, 2018

Same here

@mikl10
Copy link

mikl10 commented Jan 8, 2019

hello, I have that issue me too.
I run homebridge in a docker on my nas synology

@darsenval
Copy link

Hello, me too.
Also run in a Docker on Synology.
All the installation was clear.
Updating DacpConnection.js with "Remote/1021" did not help.

@CubGeek
Copy link

CubGeek commented Jan 28, 2019

Seeing this error in the log files as well. However, I do _not_have an AppleTV. The Homebridge system is on an old netbook I have and is connecting to my desktop computer's iTunes installation (Windows 7).

Ubuntu 18.04 LTS
node v11.7.0
homebridge v0.4.45
homebridge-dacp v0.9.2
iTunes 12.9.2.6

RangeError [ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8
    at boundsError (internal/buffer.js:58:9)
    at Buffer.readIntBE (internal/buffer.js:341:3)
    at _decode (/usr/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:927:26)
    at _decode (/usr/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:933:19)
    at Object.decode (/usr/lib/node_modules/homebridge-dacp/src/daap/Decoder.js:963:10)
    at Request.request [as _callback] (/usr/lib/node_modules/homebridge-dacp/src/dacp/DacpConnection.js:145:29)
    at Request.self.callback (/usr/lib/node_modules/homebridge-dacp/node_modules/request/request.js:185:22)
    at Request.emit (events.js:188:13)
    at Request.<anonymous> (/usr/lib/node_modules/homebridge-dacp/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:188:13)
2019-01-28T02:04:07.291Z dacp http://192.168.0.90:3689/ctrl-int/1/playstatusupdate?revision-number=252&session-id=1169005416 responded: { cmst:
   { mstt: 200,
     cmsr: 253,
     caps: 4,
     cash: 0,
     carp: 0,
     cafs: 0,
     cavs: 0,
     cavc: 1,
     caas: 2,
     caar: 6,
     cafe: 0,
     cave: 0,
     canp: 72,
     cann: 'Cry to the World',
     cana: 'BT & Sasha',
     canl: 'The Real World Session',
     cang: 'World',
     cmmk: 1,
     aeGs: 1,
     ceGS: 1,
     casa: 1,
     aels: 0,
     aelb: 0,
     astm: 719170,
     casc: 1,
     caks: 6,
     cant: 643788,
     cast: 719170,
     casu: 1,
     ceQu: 0 } }
2019-01-28T02:04:07.307Z dacp http://192.168.0.90:3689/ctrl-int/1/getproperty?properties=dmcp.volume&session-id=1169005416 responded: { cmgt: { mstt: 200, cmvo: 87 } }

Upon startup I see this in the /var/log/homebridge.log file:

[1/28/2019, 2:02:47 AM] [DACP] Initializing DACP platform...
[1/28/2019, 2:02:47 AM] [DACP] DACP Platform Plugin Loaded - Version 0.9.2
[1/28/2019, 2:02:47 AM] [DACP] Found accessory in config: "iTunes"
[1/28/2019, 2:02:47 AM] [DACP] Initializing platform accessory 'iTunes'...
[1/28/2019, 2:02:47 AM] [DACP] Starting DACP browser...
[1/28/2019, 2:02:48 AM] [DACP] The accessory iTunes is announced as 192.168.0.90:3689.
[1/28/2019, 2:02:48 AM] [DACP] It's an iTunes named Kosh’s Library
[1/28/2019, 2:02:48 AM] [DACP] Attempting to reconnect to iTunes in 0.1 seconds.
[1/28/2019, 2:02:48 AM] [DACP] Connecting to iTunes (192.168.0.90:3689)
[1/28/2019, 2:02:48 AM] [DACP] Creating status connection to 192.168.0.90:3689
Established connection to 192.168.0.90:3689 with session ID 1169005416
error on mscu
error on aeSX
error on msma
error on msma
error on mper
Skipping 'mdbk' - don't know how to parse. length=4
Skipping 'aeCs' - don't know how to parse. length=4
Skipping 'aeIM' - don't know how to parse. length=8
Skipping 'meds' - don't know how to parse. length=4
error on mper
Skipping 'mdbk' - don't know how to parse. length=4
Skipping 'aeCs' - don't know how to parse. length=4
Skipping 'meds' - don't know how to parse. length=4
[1/28/2019, 2:02:48 AM] [DACP] Connected to Kosh’s Library
error on asai
[1/28/2019, 2:02:48 AM] [DACP] Creating properties connection to 192.168.0.90:3689
[1/28/2019, 2:02:48 AM] [DACP] Updating characteristics with current volume: v=87

@doczelig
Copy link

doczelig commented Feb 2, 2020

same here, controlling iTunes on mac from homebridge on RPi ZeroW

@machineglow
Copy link

found out about this plugin recently and tried to set it up and ran into this issue.

Is there a way to get the plugin working? Sounds like there's a bunch of new properties in the DACP protocol that isn't supported...

Are other people still able to control itunes with these errors?

@machineglow
Copy link

after finding the PR with the changes that fix the bytelength error, I implemented the changes (with an additional change to line 929). I can now control itunes play/pause using the alternate-playpause-switch. Not sure if there's a way to control skipping in itunes.

oh well, better than nothing =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests