materik / homebridge-harmonyhub-plugin

Logitech HarmonyHub plugin for Homebridge
39 stars 2 forks source link

Multiple Harmony plugins #17

Closed twynne closed 5 years ago

twynne commented 5 years ago

Trying to move to this fully since the last release seems to have addressed multiple hubs, but when I install and update my config, Homebridge crashes with the following:

Error: The requested platform 'HarmonyHub' has been registered multiple times. Please be more specific by writing one of: homebridge-harmonyhub.HarmonyHub, homebridge-harmonyhub-plugin.HarmonyHub at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:119:13) at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:316:45) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:86:36) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:45:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:279:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:752:3)

I've tried completely uninstalling the old Harmony plugins (which were no longer referenced in config anyway), also deleted persist and cachedaccessories. Still no joy.

The only thing that now works is removing all references to Harmony from my config, which gets me back up and running but clearly without any harmony devices.

Any ideas?

AirBorne04 commented 5 years ago

Did you try to remove the homebridge-harmonyhub npm package from the global npm packages? That can be done with npm uninstall -g homebridge-harmonyhub .

twynne commented 5 years ago

Thanks. Managed to get there in the end by removing all Harmony details from the config, bringing Homebridge back up, then using ConfigUI. I could then see that there were multiple Harmony plugins still there (these oddly didn't show before!)

Swapped over to this version of the plugin and got it all running again. Still not seeing both of my hubs so I'll investigate that next.