KraigM / homebridge-harmonyhub

HomeBridge Plugin for Logitech Harmony Hub
182 stars 52 forks source link

UUID Problem with 0.2.0 alpha #38

Open jer78 opened 8 years ago

jer78 commented 8 years ago

Just recently, under 0.2.0-alpha I've been getting this error. All of my activities have unique names and it registers the first time properly. It causes this error after Homebridge is restarted. Not sure why it was fine up until yesterday as I had been using for about a week no problems

Unhandled rejection Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: de3806d6-73a9-4d18-8d83-ed144b59fa34 at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:219:13) at Bridge.Accessory.addBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:265:10) at Server._handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:416:16) at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:32:10) at emitOne (events.js:77:13) at API.emit (events.js:169:7) at API.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/api.js:143:8) at /usr/local/lib/node_modules/homebridge-harmonyhub/lib/home-platform.js:134:15 at PassThroughHandlerContext.finallyHandler (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/finally.js:56:23) at PassThroughHandlerContext.tryCatcher (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:502:31) at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:559:18) at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:604:10) at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:683:18) at Promise._fulfill (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:628:18) at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:423:57)

ylor commented 8 years ago

Same issue. Were you able to fix?

KraigM commented 8 years ago

Did you register the platform twice? Multi-Hub support is built in now so adding to copies of the platform config will double each hub.

jer78 commented 8 years ago

No I couldn't fix. But I figure the problem may have been my Harmony hubs were named the same as some rooms. I had to delete everything and rebuild HomeKit. :( Now it's working fine and I named all my activities to what I wanted to use with Siri so if it happens again it's not too difficult to rebuild. Since then no problems.

ylor commented 8 years ago

I only have one Harmony Hub. Platform is only entered in ~/.homebridge/config.json once. :/

rittet commented 8 years ago

Hi guys, I had the same problem. By delting cachedAccessories in .homebridge/accessories it started to work again.

EnigmaFx commented 8 years ago

same issue deleting cache works for bit then issue comes back, only have on instance of the platform in the .json file im assuming that means its only registered once? dont know what else to do @KraigM mate any insight on this?

jer78 commented 8 years ago

Happened again. Deleting the Accessories and Persist folder and the Accessory from HomeKit seems to be the only way to get it working again. Here's the error it throws:

/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:219 throw new Error("Cannot add a bridged Accessory with the same UUID as another bridged Accessory: " + existing.UUID); ^

Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: de3806d6-73a9-4d18-8d83-ed144b59fa34 at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:219:13) at Server._configCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:327:18) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:74:8) 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:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.runMain (module.js:575:10) at run (node.js:348:7) at startup (node.js:140:9) at node.js:463:3

EnigmaFx commented 8 years ago

Yep it will continue to happen it happens to me at least twice a day now

EnigmaFx commented 8 years ago

Can't get kraigm to respond no one else is able to help sort of gave up I don't even bother Using it anymore hoping there's a fix the form of some sort of update but so far nothing

jer78 commented 8 years ago

For me it only happens every few weeks which is weird it happens so often for you. I wonder if it has something to do with a timeout reaching the hub. I used to have this happen way more but since I changed my crappy router it's been less frequent.

EnigmaFx commented 8 years ago

@jer78 https://flickr.com/photos/82391466@N06/sets/72157656781043569 <-- :) I'm almost certain it's not my network or my routers, unless there's some sort of conflict that I am unaware of or I just can't see? either way thanks for the reply this really sucks I was in homebridge bliss for a while there then I updated to alpha 2 of harmony hubs and everything went to $hit I can't even figure out how to go back to the older version, when I do I get a whole new World of errors to deal with For some reason getting help becoming very difficult used to be easier Everyone's busy I guess what can you do (sigh) lik I said kinda giving up, I'm hoping an update will fix

GaryFDes commented 7 years ago

I kept getting this every restart of the service as well. I am giving up on the plugin for the moment as well. Let's hope it gets fixed or there is another way to connect homekit to the harmonyhub soon. If not then oh well. Will check the issues every once in a while to see if there is any progress.

jer78 commented 7 years ago

The other way that might soon be possible is through homeassistant.io I read through the forums and they are working on a plugin for Harmony and they already have a HomeKit plugin for homebridge.

brentratliff commented 7 years ago

Has anyone tried using homebridge-smartthings with Harmony? All of my SmartThings accessories are working perfectly in iOS 10 with Homebridge and the Home app. Harmony activities show up as switches in SmartThings. I purposely didn't add my Harmony activities to homebridge-smartthings since this plugin existed but I may try next week. I currently control my 4 hubs with voice via Amazon Echo/SmartThings but it would be great if Siri could also do it as I don't have an Echo in every room. I do believe that getting 0.2.0 of homebridge-harmonyhub is a more elegant solution though. I will install it next week and see if I get the same error. Is there an example config snippet for 0.2.0? I know you don't add multiple platforms but I haven't seen an example of how to set multiple hubs.

Andybishop commented 7 years ago

I had this issue after the IP address changed on Harmony Hub, I had to delete cachedAccessories in .homebridge/accessories and then set the Harmony Hub IP address as a reservation. I think because the IP address changed it saw it as another Hub.