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

Unable to add itunes to Homebridge/HomeKit #17

Open
ghost opened this issue Oct 20, 2016 · 10 comments
Open

Unable to add itunes to Homebridge/HomeKit #17

ghost opened this issue Oct 20, 2016 · 10 comments

Comments

@ghost
Copy link

ghost commented Oct 20, 2016

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
Copy link

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
Copy link
Author

ghost commented Oct 21, 2016

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
Copy link
Author

ghost commented Oct 21, 2016

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
Copy link
Author

ghost commented Oct 21, 2016

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
Copy link
Author

ghost commented Oct 21, 2016

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
Copy link

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

@Oggymator
Copy link

any updates, same issue here...

@SphtKr
Copy link
Owner

SphtKr commented Apr 9, 2017

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
Copy link
Owner

SphtKr commented Apr 9, 2017

Whoops...and see the important upgrade notice!

@SphtKr
Copy link
Owner

SphtKr commented Apr 18, 2017

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!

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

4 participants