SphtKr / homebridge-itunes

Control iTunes on a Mac from HomeKit and Siri
53 stars 9 forks source link

Unable to add itunes to Homebridge/HomeKit #17

Open ghost opened 7 years ago

ghost commented 7 years ago

Hello,

I tried yesterday for several hours to add the iTunes plugin to homebridge. Each time, I set it up, I am no longer able to add Homebridge to HomeKit over several different apps. I can see the bridge, I can enter the code 031-45-154 but then nothing happens or rather it cancels with the message something like network issues. If I then, remove the iTunes information from the config.json and uninstall the plugin, I am still no longer able to start homebridge properly. All what helps is, removing everything and set it up again as new. Everything is up2date: MacMini, iTunes, HomeBridge, Node, iPhone, iPad. Restarting everything incl. router does not help either. Am I the only one, experiencing this type of issue?

thmoore20850 commented 7 years ago

I am having the same problem. I have cleared out the "accessories" and "persist" folders, have reinstalled everything all the way along:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer sudo npm install -g homebridge sudo npm install node-osascript@1.0.2 sudo npm install -g homebridge-nest sudo npm install -g homebridge-itunes homebridge

...and given a new name, username, and PIN to Homebridge. No dice. When I go to add the accessory, I enter the PIN, then it grinds away for a few minutes before failing.

I'm running iOS10.1 betas on my main devices, but I've had the same issue with devices running vanilla iOS10.0.

I feel like I'm so close to my dream of being able to select AirPlay speakers with Siri!

ghost commented 7 years ago

I am having the same problem. I have cleared out the "accessories" and "persist" folders, have reinstalled everything all the way along:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer sudo npm install -g homebridge sudo npm install node-osascript@1.0.2 sudo npm install -g homebridge-nest sudo npm install -g homebridge-itunes homebridge

...and given a new name, username, and PIN to Homebridge. No dice. When I go to add the accessory, I enter the PIN, then it grinds away for a few minutes before failing.

I'm running iOS10.1 betas on my main devices, but I've had the same issue with devices running vanilla iOS10.0.

I feel like I'm so close to my dream of being able to select AirPlay speakers with Siri!

Yea deleting those two folders did not resolved my issue too.

I do not know if it is a network related issue, or something is wrong with the plug in itself. Because sometimes I got issues documented in terminal which indicated some ports failed, sometimes everything runs smooth but still no connection.

ghost commented 7 years ago

Now I cannot even install the plug in again.

Trying to install the plug in results in this:

sudo npm install -g homebridge-itunes npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-itunes" npm ERR! node v4.6.1 npm ERR! npm v3.10.8

npm ERR! uid must be an unsigned int npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-itunes" npm ERR! node v4.6.1 npm ERR! npm v3.10.8

After that: Terminal responds with this error:

[2016-10-21 10:31:23] Loading 1 platforms... /usr/local/lib/node_modules/homebridge/lib/api.js:118 throw new Error("The requested platform '" + name + "' was not registered by any plugin."); ^

Error: The requested platform 'iTunes' was not registered by any plugin. at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:118:13) at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:281:45) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:77:36) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10)

ghost commented 7 years ago

okay, last error seemed to be related with the npm version. after resolving this issue another one came up:

server:~ admin$ homebridge [2016-10-21 11:28:46] Loaded plugin: homebridge-itunes [2016-10-21 11:28:46] Registering platform 'homebridge-itunes.iTunes' [2016-10-21 11:28:46] --- [2016-10-21 11:28:46] Loaded plugin: homebridge-synology [2016-10-21 11:28:46] Registering accessory 'homebridge-synology.Synology' [2016-10-21 11:28:46] --- [2016-10-21 11:28:46] Loaded config.json with 1 accessories and 0 platforms. [2016-10-21 11:28:46] --- [2016-10-21 11:28:46] Loading undefined platforms... [2016-10-21 11:28:46] Loading 1 accessories... [2016-10-21 11:28:46] [media] Initializing Synology accessory... Load homebridge-itunes.iTunes Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[2016-10-21 11:28:46] Homebridge is running on port 51826.

homebridge does not understand the iTunes plugin properly, I guess, because it says: undefined platforms. As long as this message appears, I am not even able to connect to my synology NAS, even though no error in terminal shows up!

ghost commented 7 years ago

okay, last post for now.

After uninstalling the plug in, removing it from the .json file and adding homebridge again to my setup, it discovered "play state", "track skipper", "album skipper". (Note: iTunes plugin is already uninstalled).

Of course the buttons were not usable, so I tried to add the plug in again. MyHome showed me the buttons as "available/online" but were still not reachable. Additionally other accessories were not reachable too. activity monitor shows also 100% CPU usage, when iTunes plugin is running. Without the plugin 0,2%.

I will leave it for now. Will check this thread again, after a new update to see if it is then working for me!

daysrnumberd commented 7 years ago

Same exact issue as misanthrophy here! Using latest homebridge and node js as of oct 23rd 2016.

Oggymator commented 7 years ago

any updates, same issue here...

SphtKr commented 7 years ago

Okay folks, if you're still with me, I've just published 0.2.0-alpha0, which I hope may fix your issue. Can you try it:

npm install -g homebridge-itunes@latest

And let me know if it helps, please? Thanks!

SphtKr commented 7 years ago

Whoops...and see the important upgrade notice!

SphtKr commented 7 years ago

Okay, 0.2.0-alpha1 is now out and it makes the upgrade notice I mentioned no longer necessary, and adds some additional features. Enjoy!