richardpack / homebridge-multizone-amp

Homebridge plugin for Monoprice multizone amps
Apache License 2.0
0 stars 0 forks source link

Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory #3

Open picitizen opened 2 years ago

picitizen commented 2 years ago

Hi Richard, Firstly, thank you very much for your hard work on this plug-in. It has worked flawlessly up until today. I was excited to see the new Master and Sources controls, so I updated the plug-in. Unfortunately, I'm consistently getting "Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory". I've cleared the accessory cache, restarted the server, and even reinstalled the entire docker image on my QNAP NAS (no other accessories installed) but am still getting this error. Please let me know if I can provide any additional info or help with testing.

Here's the log: Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: ff08eb6b-26eb-4862-9af9-6883a8fd32a5 at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:583:15) at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:552:25 at Array.forEach () at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:539:21 at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18 at MonopriceAmpPlatform.accessories (/homebridge/node_modules/homebridge-monoprice-amp/src/homebridge-monoprice-amp-static.ts:70:9) at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:534:24 at new Promise () at BridgeService.loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:528:12) at /usr/local/lib/node_modules/homebridge/src/server.ts:445:42

jgsieve commented 2 years ago

i just setup a fresh install and this is happening to me too. Any help is appreciated, thanks!

json below

{ "platform": "MonopriceAmp", "itachFlexIp": "192.168.10.15", "zones": [ { "name": "Living Room", "number": 1 }, { "name": "Kitchen", "number": 2 } ], "sources": [ "LivingRoom", "Kitchen", "AirPlay", "ChromeCast Audio", "Living BT", "Basement BT" ], "enableMasterControls": true, "groups": [ { "name": "Sample 1", "zones": [ 1, 2, 3, 4 ] } ], "_bridge": { "username": "0E:2D:D7:CA:3E:D8", "port": 42729 } }

error 1/27/2022, 10:18:58 AM] Initializing platform accessory 'Living Room-undefined'... [1/27/2022, 10:18:58 AM] Initializing platform accessory 'Living Room-undefined'... Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: fdc0eab0-83cd-4f89-a766-9fe4cbe4865a at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:594:15) at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:552:25 at Array.forEach () at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:539:21 at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:10:18 at MonopriceAmpPlatform.accessories (/homebridge/node_modules/homebridge-monoprice-amp/src/homebridge-monoprice-amp-static.ts:70:9) at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:534:24 at new Promise () at BridgeService.loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:528:12) at ChildBridgeFork.startBridge (/usr/local/lib/node_modules/homebridge/src/childBridgeFork.ts:139:36) [1/27/2022, 10:18:58 AM] [homebridge-monoprice-amp] Child bridge process ended [1/27/2022, 10:18:58 AM] [homebridge-monoprice-amp] Process Ended. Code: 1, Signal: null [1/27/2022, 10:19:05 AM] [homebridge-monoprice-amp] Restarting Process...

richardpack commented 2 years ago

I'm not able to reproduce the issue. Have either of you tried googling "Cannot add a bridged Accessory with the same UUID as another bridged Accessory". It looks like some of the suggested solutions are to clear the accessory cache at ~/.homebridge/accessories/cachedAccessories and to look at the list of accessories to find one with the duplicate ID at http://ip:port/accessories and removing the duplicate. I will keep looking.

jgsieve commented 2 years ago

Yeah, I found that and it seems to come back after service restart. I’ll take another stab at it Monday, thanks for all you do!

Sent from my iPhone

On Jan 29, 2022, at 1:19 PM, richardpack @.***> wrote:

 I'm not able to reproduce the issue. Have either of you tried googling "Cannot add a bridged Accessory with the same UUID as another bridged Accessory". It looks like some of the suggested solutions are to clear the accessory cache at ~/.homebridge/accessories/cachedAccessories and to look at the list of accessories to find one with the duplicate ID at http://ip:port/accessories and removing the duplicate. I will keep looking.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.

funetn commented 1 year ago

Hey Richard,

Ditto on your support for the Monoprice Amp. As a new Homebridge user (fresh install) I ran into the same kind of error. I thought maybe I messed things up so created a new Homebridge w/o any other customizations or plug-ins, but rec'd the same error. This causes my RPI to go into a reboot loop:

[12/11/2022, 16:10:47] Loaded plugin: homebridge-monoprice-amp@1.0.10 [12/11/2022, 16:10:47] Registering platform 'homebridge-monoprice-amp.MonopriceAmp' [12/11/2022, 16:10:47] --- [12/11/2022, 16:10:47] Loading 2 platforms... [12/11/2022, 16:10:47] [MonopriceAmp] Initializing MonopriceAmp platform... [12/11/2022, 16:10:47] [MonopriceAmp] connecting to controller [12/11/2022, 16:10:47] [MonopriceAmp] MonopriceAmp finished initializing v1.0.7a! [12/11/2022, 16:10:47] [MonopriceAmp] starting adding accessories [12/11/2022, 16:10:47] [MonopriceAmp] zones[object Object],[object Object] [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created Zone 1 [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created Zone 1-undefined [12/11/2022, 16:10:47] [MonopriceAmp] Added source Zone 1 _ 1_sourceundefined [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created Zone 1-undefined [12/11/2022, 16:10:47] [MonopriceAmp] Added source Zone 1 1_sourceundefined [12/11/2022, 16:10:47] [MonopriceAmp] Added zone Zone 1 1 [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created Zone 2 [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created Zone 2-undefined [12/11/2022, 16:10:47] [MonopriceAmp] Added source Zone 2 _ 2_sourceundefined [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created Zone 2-undefined [12/11/2022, 16:10:47] [MonopriceAmp] Added source Zone 2 2_sourceundefined [12/11/2022, 16:10:47] [MonopriceAmp] Added zone Zone 2 2 [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created All-undefined [12/11/2022, 16:10:47] [MonopriceAmp] Added master source: undefined [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created All-undefined [12/11/2022, 16:10:47] [MonopriceAmp] Added master source: undefined [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created AllSpeakers [12/11/2022, 16:10:47] [MonopriceAmp] Added master on/off [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created Sample 1-undefined [12/11/2022, 16:10:47] [MonopriceAmp] Added group: Sample 1 source undefined [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created Sample 1-undefined [12/11/2022, 16:10:47] [MonopriceAmp] Added group: Sample 1 source undefined [12/11/2022, 16:10:47] [MonopriceAmp] Zone accessory created Sample 1 [12/11/2022, 16:10:47] [MonopriceAmp] Added group: Sample 1 [12/11/2022, 16:10:47] Initializing platform accessory 'Zone 1'... [12/11/2022, 16:10:47] Initializing platform accessory 'Zone 1-undefined'... [12/11/2022, 16:10:47] Initializing platform accessory 'Zone 1-undefined'... [12/11/2022, 16:10:47] Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 2aea236e-f268-4da4-99aa-864ce13e5b57 at Bridge.Accessory.addBridgedAccessory (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:594:15) at /var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:552:25 at Array.forEach () at /var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:539:21 at /var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:10:18 at MonopriceAmpPlatform.accessories (/var/lib/homebridge/node_modules/homebridge-monoprice-amp/src/homebridge-monoprice-amp-static.ts:70:9) at /var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:534:24 at new Promise () at BridgeService.loadPlatformAccessories (/var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:528:12) at /var/lib/homebridge/node_modules/homebridge/src/server.ts:478:42 [12/11/2022, 16:10:47] Got SIGTERM, shutting down Homebridge... [12/11/2022, 16:10:50] [Homebridge UI] Sending SIGKILL to Homebridge [12/11/2022, 16:10:50] [HB Supervisor] Homebridge Process Ended. Code: null, Signal: SIGKILL [12/11/2022, 16:10:52] [Homebridge UI] Changes to config.json saved. [12/11/2022, 16:10:55] [HB Supervisor] Restarting Homebridge...

I used your example JSON config w/o any changes hoping to just get beyond this error but nope :(

Would you be willing to share your config file/parms with us since your's is working?

Hardware: RPi 3+, Rev B with 32GB memory card.

Software: Homebridge v1.5.1 Node.js.version v18i.12.1 OS: Linux 5.15.76-v7+ arm

Distribution was downloaded using the Raspberry PI Image tool and selecting the Homebrige image.

I'd be happy to provide any logs. Homebridge, I don't think, cares about the names/sources - that's more of human clarification tag vs. the controller, which just cares about getting the codes to switch on the channel and the appropriate zone input.

Thanks again for any assistance you (or anyone) can provide. Boy I wish I had 10% of the skill you coders have to allow us DIYers/hackers implement difficult automation turnkey/easier.

funetn commented 1 year ago

I had some time to look at this issue again as it was bothering me as to why I couldn't get it to work. I decided since jgsieve's issue was different from mine and they were kind enough to post their json code, I decided to cut/paste that code into my config, only changing the IP address of my itachFlexIp and removing the bridge info. Rebooted my Homebridge and didn't have any errors!! And my speakers showed up. Went back and reconfigured the speaker names/zone/sources, etc. to match my setup. Here's my json that worked. Very happy now to tweak more as I get familiar with this plugin. I think might still have some config issues with zones but glad the amp is being recognized in Homebridge!!

{ "platform": "MonopriceAmp", "itachFlexIp": "192.168.1.105", "zones": [ { "name": "Living Room", "number": 1 }, { "name": "Master Bedroom", "number": 2 }, { "name": "Basement", "number": 3 }, { "name": "Basement Office", "number": 4 }, { "name": "Deck", "number": 5 }, { "name": "Garage", "number": 6 } ], "sources": [ "HTPC", "Direct Plug", "", "", "PI House", "Basement TV" ], "enableMasterControls": true, "groups": [ { "name": "Inside Speakers", "zones": [ 1, 2, 3, 4 ] }, { "name": "All Speakers", "zones": [ 1, 2, 3, 4, 5, 6 ] }, { "name": "Outside Speakers", "zones": [ 5, 6 ] }, { "name": "Main Living", "zones": [ 1, 2 ] } ] }

funetn commented 1 year ago

A little progress/some issues still. :(

The good: I am able to control my zones (speakers) via the Homebridge Acessories tab - turn on/off, volume up/down.

Issues still: Nothing is showing up in HomeKit. I've rebooted all devices (HomePod Mini/Homebridge/routers/etc. - nothing has resolved this issue. No sources or groups are shown either - just the speakers.

I looked in the log a little closer and still getting the following messages - not sure if this is an issue or just part of the boot-up of the plugin: [30/01/2023, 11:36:32] [MonopriceAmp] Initializing MonopriceAmp platform... [30/01/2023, 11:36:32] [MonopriceAmp] connecting to controller [30/01/2023, 11:36:32] [MonopriceAmp] MonopriceAmp finished initializing v1.0.7a! [30/01/2023, 11:36:32] [MonopriceAmp] starting adding accessories [30/01/2023, 11:36:32] [MonopriceAmp] zones[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room _ 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Added zone Living Room 1 [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom _ 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Added zone Master Bedroom 2 . . . Then further in the log (just below the above) get the following: [30/01/2023, 11:56:21] Initializing platform accessory 'Living Room'... [30/01/2023, 11:56:21] Initializing platform accessory 'Living Room-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Living Room-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Living Room-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Living Room-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Living Room-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Living Room-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Master Bedroom'... [30/01/2023, 11:56:21] Initializing platform accessory 'Master Bedroom-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Master Bedroom-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Master Bedroom-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Master Bedroom-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Master Bedroom-undefined'... [30/01/2023, 11:56:21] Initializing platform accessory 'Master Bedroom-undefined'...

So little progress which is better than before but still not fully functional from a HomeKit prospective.

jgsieve commented 1 year ago

I appreciate you! I don’t have enough expertise to help much, I don’t see anything standing out fwiw. Thank you!Sent from my iPhoneOn Jan 30, 2023, at 11:43 AM, funetn @.***> wrote: A little progress/some issues still. :( The good: I am able to control my zones (speakers) via the Homebridge Acessories tab - turn on/off, volume up/down. Issues still: Nothing is showing up in HomeKit. I've rebooted all devices (HomePod Mini/Homebridge/routers/etc. - nothing has resolved this issue. No sources or groups are shown either - just the speakers. I looked in the log a little closer and still getting the following messages - not sure if this is an issue or just part of the boot-up of the plugin: [30/01/2023, 11:36:32] [MonopriceAmp] Initializing MonopriceAmp platform... [30/01/2023, 11:36:32] [MonopriceAmp] connecting to controller [30/01/2023, 11:36:32] [MonopriceAmp] MonopriceAmp finished initializing v1.0.7a! [30/01/2023, 11:36:32] [MonopriceAmp] starting adding accessories [30/01/2023, 11:36:32] [MonopriceAmp] zones[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room _ 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Living Room-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Living Room 1_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Added zone Living Room 1 [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom _ 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Zone accessory created Master Bedroom-undefined [30/01/2023, 11:36:32] [MonopriceAmp] Added source Master Bedroom 2_sourceundefined [30/01/2023, 11:36:32] [MonopriceAmp] Added zone Master Bedroom 2 . . .

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

funetn commented 1 year ago

Hey jgsieve - you got me a little further down the road ;)

Some questions if you don't mind entertaining me: 1) Do you have your plugin functional? 1a) If so do you see those errors/warnings also in the log? 2) Are you able to see your monoprice amp in HomeKit or just Homebridge? 3) Are you able to see all of the options in Homebridge/HomeKit (speakers/zones/sources/groups)?

Thanks for any input/feedback you can provide.

I know you aren't the developer but I'd really like to get this functional. Prob a simple fix but I just can't get the pieces aligned. Hopefully through this issue entry others will find it beneficial.

funetn commented 1 year ago

OK - 2023-02-17 Update: After reinstalling HomeBridge and other various plugins I decided to give Richard's plugin another try. I installed the plugin and copied his example JSON info as-is and only changed the IP (naturally) to point to my IPFLEX. Rebooted HB and it worked!! Naturally I went back to tweak the zones/sources (didn't mess with the groups). Not sure what resolved the issue but the plugin does function. Thanks Richard for your time developing this plugin for HB.

@picitizen - thanks for letting me piggyback my issue (thought might be related to your issue) on your ticket.

Take care.