ebaauw / homebridge-music

Homebridge plugin for iTunes with AirPlay speakers
Apache License 2.0
92 stars 7 forks source link

Plugin /usr/local/lib/node_modules/homebridge-music requires Node version of ^8.12.0 which does not satisfy the current Node version of v9.11.1. You may need to upgrade your installation of Node. #9

Closed DJay-X closed 5 years ago

DJay-X commented 5 years ago

@ebaauw Thanks for your work. Would love to try your homebridge-music plugin. Running macOS Mojave 10.14, iTunes 12.9.0.164 and Homebridge@0.4.45 with node@9.11.1. On my Pi Running node 10.11.0 and now was wondering that the plugin is not working with 9.11.1? I don't have to downgrade, didn't I? Actually, I wanted the current version 10.11.0 on the Mac as well. At least stay on 9.11.1.

Hope you can help. Thanks in advance for your time.

Plugin /usr/local/lib/node_modules/homebridge-music requires Node version of ^8.12.0 which does not satisfy the current Node version of v9.11.1. You may need to upgrade your installation of Node.
[Music] warning: not using recommended node version v8.12.0 LTS
/usr/local/lib/node_modules/homebridge-music/lib/MusicAccessory.js:48
    .on('set', this.setOn.bind(this))
    ^
TypeError: Cannot read property 'on' of undefined
    at new MusicAccessory (/usr/local/lib/node_modules/homebridge-music/lib/MusicAccessory.js:48:5)
    at MusicPlatform.<anonymous> (/usr/local/lib/node_modules/homebridge-music/lib/MusicPlatform.js:144:35)
    at applescript.execString (/usr/local/lib/node_modules/homebridge-music/lib/Script.js:113:5)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/homebridge-music/node_modules/applescript/lib/applescript.js:54:7)
    at ChildProcess.emit (events.js:180:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
ebaauw commented 5 years ago

I develop and test my plugins against the latest LTS version of NodeJS. Other versions might work... or not.

I don’t think this particular error is caused by the version of NodeJS, though. What other plugins are you running / do you have installed?

DJay-X commented 5 years ago

Thanks for your reply @ebaauw On my iMac only running

+-- forever@0.15.3 +-- homebridge@0.4.45 +-- homebridge-accessory-bandwidth-quality@0.9.2 +-- homebridge-broadband@1.0.3 +-- homebridge-config-ui-x@3.8.11 +-- homebridge-itunes@0.2.0-alpha1 +-- homebridge-music@0.1.11 +-- n@2.1.8 +-- npm@6.4.1 `-- speak.awf@0.4.2

ebaauw commented 5 years ago

Best uninstall homebridge-itunes, see https://github.com/SphtKr/homebridge-itunes/issues/40.

Alternatively, run it in a separate homebridge instance, and use the "plugins" key in config.json to make sure it's not loaded in the other instance.

DJay-X commented 5 years ago

Thanks. I uninstalled homebridge-itunes and installed your plugin again. Now homebridge is starting correct.

In the log I still get the notification but the plugin is running.

[2018-10-22 21:12:34] Plugin /usr/local/lib/node_modules/homebridge-music requires Node version of ^8.12.0 which does not satisfy the current Node version of v9.11.1. You may need to upgrade your installation of Node. [2018-10-22 21:12:34] [Music] warning: not using recommended node version v8.12.0 LTS

Unfortunately I got a lot of errors and it's not working properly on my machine. :/ Speakers are turning on but they show as off. Also Music is playing on iTunes but also off with Error.

napkin 22 10 18 9 24 47 pm

[2018-10-22 21:14:15] [Music] Music: on changed from true to false
[2018-10-22 21:14:30] [Music] Wohnzimmer: on changed from true to false
[2018-10-22 21:15:53] [Music] Wohnzimmer: set on from false to true
[2018-10-22 21:15:55] [Music] Wohnzimmer: on changed from true to false
[2018-10-22 21:16:15] [Music] Music: set on from false to true
[2018-10-22 21:16:15] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:15] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to setPlayerOn(true, "Organic Bijou")
[2018-10-22 21:16:15] [Music] Music: could not set on to true
[2018-10-22 21:16:15] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:15] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:16:20] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:20] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:16:25] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:25] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:16:30] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:30] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:16:35] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:35] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:16:40] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:40] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:16:45] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:45] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:16:48] [Music] Schlafzimmer: set on from false to true
[2018-10-22 21:16:50] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:50] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:16:53] [Music] applescript timeout
[2018-10-22 21:16:53] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to setSpeakerOn("Schlafzimmer", true)
[2018-10-22 21:16:53] [Music] Schlafzimmer: could not set on to true
[2018-10-22 21:16:55] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:16:55] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:00] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:00] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:05] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:05] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:10] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:10] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:15] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:15] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:18] [Music] Schlafzimmer: set volume from 30 to 32
[2018-10-22 21:17:19] [Music] Schlafzimmer: set volume from 32 to 52
[2018-10-22 21:17:19] [Music] Schlafzimmer: could not set volume to 52
[2018-10-22 21:17:19] [Music] Schlafzimmer: set volume from 32 to 54
[2018-10-22 21:17:19] [Music] Schlafzimmer: could not set volume to 54
[2018-10-22 21:17:20] [Music] Schlafzimmer: set volume from 32 to 34
[2018-10-22 21:17:20] [Music] Schlafzimmer: set volume from 34 to 52
[2018-10-22 21:17:20] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:20] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:21] [Music] Schlafzimmer: could not set volume to 52
[2018-10-22 21:17:23] [Music] Schlafzimmer: set volume from 34 to 36
[2018-10-22 21:17:23] [Music] Schlafzimmer: set volume from 36 to 24
[2018-10-22 21:17:23] [Music] Schlafzimmer: could not set volume to 24
[2018-10-22 21:17:23] [Music] Schlafzimmer: set volume from 36 to 18
[2018-10-22 21:17:23] [Music] Schlafzimmer: could not set volume to 18
[2018-10-22 21:17:23] [Music] Schlafzimmer: set volume from 36 to 18
[2018-10-22 21:17:25] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:25] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:26] [Music] Schlafzimmer: set volume from 18 to 22
[2018-10-22 21:17:26] [Music] Schlafzimmer: set volume from 22 to 43
[2018-10-22 21:17:28] [Music] Schlafzimmer: set volume from 43 to 44
[2018-10-22 21:17:28] [Music] Schlafzimmer: could not set volume to 44
[2018-10-22 21:17:28] [Music] Schlafzimmer: set volume from 43 to 28
[2018-10-22 21:17:28] [Music] Schlafzimmer: set volume from 28 to 27
[2018-10-22 21:17:30] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:30] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:35] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:35] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:40] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:40] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:41] [Music] Wohnzimmer: set on from false to true
[2018-10-22 21:17:45] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:45] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:47] [Music] Schlafzimmer: set on from false to true
[2018-10-22 21:17:50] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:50] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:17:55] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:17:55] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:00] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:00] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:06] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:06] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:10] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:10] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:15] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:15] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:20] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:20] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:25] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:25] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:30] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:30] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:36] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:36] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:40] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:40] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:46] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:46] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:51] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:51] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:18:56] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:18:56] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:01] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:01] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:06] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:06] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:11] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:11] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:16] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:16] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:21] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:21] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:26] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:26] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:31] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:31] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:36] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:36] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:41] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:41] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:46] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:19:46] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:19:56] [Music] Wohnzimmer: on changed from true to false
[2018-10-22 21:20:01] [Music] Schlafzimmer: on changed from true to false
[2018-10-22 21:20:03] [Music] Music: set on from false to true
[2018-10-22 21:20:04] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:04] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to setPlayerOn(true, "Organic Bijou")
[2018-10-22 21:20:04] [Music] Music: could not set on to true
[2018-10-22 21:20:06] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:06] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:11] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:11] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:14] [Music] Wohnzimmer: set on from false to true
[2018-10-22 21:20:16] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:16] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:20] [Music] Schlafzimmer: set on from false to true
[2018-10-22 21:20:21] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:21] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:26] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:26] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:31] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:31] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:32] [Music] Schlafzimmer: set on from true to false
[2018-10-22 21:20:36] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:36] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:41] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:41] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:46] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:46] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:48] [Music] Schlafzimmer: set on from false to true
[2018-10-22 21:20:51] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:51] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:20:53] [Music] applescript timeout
[2018-10-22 21:20:53] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to setSpeakerOn("Schlafzimmer", true)
[2018-10-22 21:20:53] [Music] Schlafzimmer: could not set on to true
[2018-10-22 21:20:56] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:20:56] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:01] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:01] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:06] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:06] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:11] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:11] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:16] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:16] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:21] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:21] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:26] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:26] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:31] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:31] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:36] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:36] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:41] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:41] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:46] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:46] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:51] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:51] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:21:56] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:21:56] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
[2018-10-22 21:22:01] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

[2018-10-22 21:22:01] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to getState()
ebaauw commented 5 years ago
[2018-10-22 21:16:15] [Music] applescript: set lib to (load script "/usr/local/lib/node_modules/homebridge-music/scripts/iTunes.scpt")
tell lib to setPlayerOn(true, "Organic Bijou")
[2018-10-22 21:16:15] [Music] Music: could not set on to true

This typically happens when you try and play a non-existing track. Did you specify this track in config.json? Is it a regular song or a radio station? What happens if you play this track from iTunes and the switch off and back on Music?

[2018-10-22 21:16:15] [Music] applescript error execution error: „iTunes“ hat einen Fehler erhalten: „name of current track“ kann nicht gelesen werden. (-1728)

I haven't seen this error before. -1728 is a reference error in AppleScript (see https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_error_codes.html). My best guess is that iTunes somehow got an invalid current track. Did the error only appear after you tried to switch on Music for the first time? What happens if you stop homebridge, exit iTunes, and then run homebridge -D?

What version of macOS and iTunes are you on?

DJay-X commented 5 years ago

Playing a lot of Radio Stream. In Example probably just http://188.138.9.183/ukwwien.mp3. :) Maybe the plugin can't handle this. Running macOS Mojave 10.14, iTunes 12.9.0.164 For now I have to go back to homebridge-itunes what works okay but unfortunately seems no longer under development. I'm on vacation starting tomorrow so unfortunately I'm not able to try anything else for now. I was giving the -music plugin a shot was sadly not was a success for me. :) Thanks anyway.

ebaauw commented 5 years ago

That’s the same versions I use. I can play the stream from homebridge-music without any problems.

OK, I’ll close this issue then. Happy holidays.