ilcato / homebridge-Fibaro-HC2

Homebridge plugin for Fibaro Home Center 2 (and Home Center Lite ...)
Apache License 2.0
66 stars 27 forks source link

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

Closed beorn closed 6 years ago

beorn commented 6 years ago

Hi,

(Update! I'm actually able to reproduce this error on the first try as well, with one specific device only. If I hide that device it'll run successfully through the first time, but if I restart homebridge it'll fail on several other devices, as described below.)

I have around 200 devices split across 3 Fibaro users, which I have using the 'hotel' feature to restrict access to certain devices, so that each user has less than 100 accessories in HomeKit.

The first time I run (with empty persist and accessories folders) it works, but the second time it fails on several devices:

[12/25/2017, 7:48:51 PM] [Fibaro HC2 2] Loading accessories 
[12/25/2017, 7:48:52 PM] [Fibaro HC2 2] Error getting data from Home Center:  Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 96856b9a-0231-4085-9d33-e7751e160682
    at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:259:13)
    at Bridge.Accessory.addBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:286:10)
    at Server._handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:451:16)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:41:10)
    at API.emit (events.js:159:13)
    at API.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/api.js:159:8)
    at ShadowAccessory.resgisterUpdateAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/shadows.js:87:17)
    at FibaroHC2.addAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:166:25)
    at LoadAccessories.devices.map (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:113:22)
    at Array.map (<anonymous>)

I've confirmed that the displayName is the same as well as the UUID.

Not sure if it's useful, but here's a snippet from persist/IdentifierCache.112233445588.json showing the 96856b9a-0231-4085-9d33-e7751e160682 UUID:

      "2c88c6b9-3310-493f-a8d0-e38dd1d9ff09|nextIID" : 11,
      "61108b3c-43a3-4765-973d-0104bf96bb65|0000003E-0000-1000-8000-0026BB765291|00000030-0000-1000-8000-0026BB765291" : 6,
      "96856b9a-0231-4085-9d33-e7751e160682|0000008C-0000-1000-8000-0026BB765291|617--|0000007C-0000-1000-8000-0026BB765291" : 11,
      "f54f6807-854c-4867-b7b6-de5ab1266914|0000003E-0000-1000-8000-0026BB765291|00000052-0000-1000-8000-0026BB765291" : 7,
      "87446f77-d1c8-41fd-8429-797ba126a3c1|0000003E-0000-1000-8000-0026BB765291|00000020-0000-1000-8000-0026BB765291" : 3,
      "f27bd966-e011-412f-bebb-238c2f08c82b|0000003E-0000-1000-8000-0026BB765291|00000020-0000-1000-8000-0026BB765291" : 3,
      "0eea9a19-77a8-4bfd-ab3b-96b3dde344e6|nextIID" : 14,
      "56eecf43-2c67-41f3-8dfc-1d04fc70db14|nextIID" : 14,
      "fdbbcbee-fc0b-48eb-b37e-8c6db64b9d9c|00000049-0000-1000-8000-0026BB765291|1668-8" : 23,
      "20a68283-e6e7-44a7-8fb6-4d3c9a5e0db7|00000043-0000-1000-8000-0026BB765291|1770--RGB|00000008-0000-1000-8000-0026BB765291" : 11,
      "ca58a908-0e5b-4d2e-b9db-eee95c49ad98|nextIID" : 41,
      "337ced66-280a-46e9-a58e-87b5f5f804c4|00000043-0000-1000-8000-0026BB765291|1774--RGB|00000008-0000-1000-8000-0026BB765291" : 11,
      "9845d916-8c49-4103-b0ae-8eb4879aa728|0000008A-0000-1000-8000-0026BB765291|1778--" : 8,
      "96856b9a-0231-4085-9d33-e7751e160682|0000003E-0000-1000-8000-0026BB765291|00000030-0000-1000-8000-0026BB765291" : 6,
      "ec8eebaa-787e-4ae1-8544-991e4969d267|0000003E-0000-1000-8000-0026BB765291|00000021-0000-1000-8000-0026BB765291" : 4,
      "0eea9a19-77a8-4bfd-ab3b-96b3dde344e6|00000043-0000-1000-8000-0026BB765291|1795--RGB|00000025-0000-1000-8000-0026BB765291" : 10,
      "ca58a908-0e5b-4d2e-b9db-eee95c49ad98|0000003E-0000-1000-8000-0026BB765291|00000030-0000-1000-8000-0026BB765291" : 6,
      "0cfc0623-665e-4fa8-99f6-72409e8fb45d|0000003E-0000-1000-8000-0026BB765291|00000021-0000-1000-8000-0026BB765291" : 4,
      "88366e8d-87b6-4edb-86ce-b2a73b7c845c|0000003E-0000-1000-8000-0026BB765291|00000052-0000-1000-8000-0026BB765291" : 7,
      "c352cdcc-22de-44c9-8685-aa7d3c23f419|0000003E-0000-1000-8000-0026BB765291|00000014-0000-1000-8000-0026BB765291" : 2,
      "7a5a392b-2b5f-4dc1-9c56-4e7799d44702|0000008C-0000-1000-8000-0026BB765291|1764--|00000023-0000-1000-8000-0026BB765291" : 9,
      "04388f30-5538-4bd3-82c9-e46cb58635a1|0000003E-0000-1000-8000-0026BB765291|00000030-0000-1000-8000-0026BB765291" : 6,
      "88366e8d-87b6-4edb-86ce-b2a73b7c845c|0000003E-0000-1000-8000-0026BB765291|00000030-0000-1000-8000-0026BB765291" : 6,
      "0cfc0623-665e-4fa8-99f6-72409e8fb45d" : 134,
      "7030de44-4009-45d7-b37f-4c8c00229cff|0000003E-0000-1000-8000-0026BB765291|00000030-0000-1000-8000-0026BB765291" : 6,
      "96856b9a-0231-4085-9d33-e7751e160682|0000008C-0000-1000-8000-0026BB765291|617--|00000023-0000-1000-8000-0026BB765291" : 9,
      "134f6bc6-028a-4df6-a7e0-3d0de0672936|0000008C-0000-1000-8000-0026BB765291|1797--" : 8,
      "9c899398-c995-42de-8a9b-132ad61f8acd|0000008C-0000-1000-8000-0026BB765291|1820--" : 8,
      "80b3df39-eab9-4165-b138-55a4d3e409cb|0000003E-0000-1000-8000-0026BB765291|00000014-0000-1000-8000-0026BB765291" : 2,
      "8f1cfc7d-c1a0-4fef-a872-ec62793a7fe8|0000003E-0000-1000-8000-0026BB765291|00000023-0000-1000-8000-0026BB765291" : 5,
      "61108b3c-43a3-4765-973d-0104bf96bb65|0000003E-0000-1000-8000-0026BB765291|00000020-0000-1000-8000-0026BB765291" : 3,
      "f54f6807-854c-4867-b7b6-de5ab1266914|0000003E-0000-1000-8000-0026BB765291|00000021-0000-1000-8000-0026BB765291" : 4,
      "87446f77-d1c8-41fd-8429-797ba126a3c1" : 156,

I've also attached my entire .homebridge/ folder (hb.zip). hb.zip

ilcato commented 6 years ago

@beorn, Why did you put the platform in config.json three time?

beorn commented 6 years ago

Because I have 200+ devices and homekit only supports 100 devices per accessories, so I am using the workaround you suggested in #80 - each of the platform entries is for a different user that has a non-overlapping set of devices associated with them.

ilcato commented 6 years ago

Does it works if you configure a platform at a time?

beorn commented 6 years ago

I can try it next week when I'm home again.

beorn commented 6 years ago

I can start up homebridge if I only include one of the platform entries, all of them work individually. But I always get Error getting data from Home Center: Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory if I try to have more than one platform entry.

I'm not sure if that's what you meant by "configuring a platform at a time"?

ilcato commented 6 years ago

Yes this is what I asked you. The UUID is calculate starting from the device name and room name and cannot be duplicated so in your case there at least one device shared by the three different accounts.

beorn commented 6 years ago

The devices that are reported as 'duplicated' shouldn't really be duplicated, at least not when I look in the Fibaro HC2 interface they are selected on a mutually exclusive basis between all the accounts. I have it set up so each account only selects devices from certain rooms, in a mutually exclusive basis. Any way I can troubleshoot further?

ilcato commented 6 years ago

I never used multiple instances of a plugin on the same homebridge, so I don't know if it works. Try a simple configuration with only one device on each instance.

beorn commented 6 years ago

Okay, now I have a setup of 3 Fibaro HC2 users, as above, and each one has only 1 configured accessory. I get different results each time I run it, sometimes it'll initialize okay, sometimes it'll throw the error below - see log output from both cases, and my cachedAccessories and config.json files attached:

% homebridge
[2/6/2018, 1:39:38 PM] Loaded plugin: homebridge-fibaro-hc2
[2/6/2018, 1:39:38 PM] Registering platform 'homebridge-fibaro-hc2.FibaroHC2'
[2/6/2018, 1:39:38 PM] ---
[2/6/2018, 1:39:38 PM] Loaded config.json with 0 accessories and 3 platforms.
[2/6/2018, 1:39:38 PM] ---
[2/6/2018, 1:39:38 PM] Loading 3 platforms...
[2/6/2018, 1:39:38 PM] [Fibaro HC2 1] Initializing FibaroHC2 platform...
[2/6/2018, 1:39:38 PM] [Fibaro HC2 2] Initializing FibaroHC2 platform...
[2/6/2018, 1:39:38 PM] [Fibaro HC2 3] Initializing FibaroHC2 platform...
[2/6/2018, 1:39:38 PM] Loading 0 accessories...
[2/6/2018, 1:39:38 PM] [Fibaro HC2 3] Configured Accessory:  床灯 Ceiling TV
[2/6/2018, 1:39:38 PM] [Fibaro HC2 3] Configured Accessory:  插座1 Xmas Star
[2/6/2018, 1:39:38 PM] [Fibaro HC2 3] Configured Accessory:  Ceiling Strip 1 new
Setup Payload:
X-HM://00240T6M66K52
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
[... QR code etc...]
[2/6/2018, 1:39:38 PM] [Fibaro HC2 1] didFinishLaunching. 
[2/6/2018, 1:39:38 PM] [Fibaro HC2 2] didFinishLaunching. 
[2/6/2018, 1:39:38 PM] [Fibaro HC2 3] didFinishLaunching. 
[2/6/2018, 1:39:38 PM] Homebridge is running on port 6088.
[2/6/2018, 1:39:38 PM] [Fibaro HC2 1] Loading accessories 
[2/6/2018, 1:39:38 PM] [Fibaro HC2 1] Error getting data from Home Center:  Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: d9bf51ba-fc27-42f0-a5b2-572e8bfd1436
    at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:264:13)
    at Bridge.Accessory.addBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:290:10)
    at Server._handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:451:16)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:41:10)
    at API.emit (events.js:160:13)
    at API.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/api.js:159:8)
    at ShadowAccessory.resgisterUpdateAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/shadows.js:87:17)
    at FibaroHC2.addAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:166:25)
    at LoadAccessories.devices.map (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:113:22)
    at Array.map (<anonymous>)
[2/6/2018, 1:39:38 PM] [Fibaro HC2 3] Loading accessories 
[2/6/2018, 1:39:38 PM] [Fibaro HC2 3] Added/changed accessory:  床灯 Ceiling TV
[2/6/2018, 1:39:38 PM] [Fibaro HC2 3] Remove accessory 插座1 Xmas Star
[2/6/2018, 1:39:38 PM] [Fibaro HC2 3] Remove accessory Ceiling Strip 1 new
[2/6/2018, 1:39:38 PM] [Fibaro HC2 2] Loading accessories 
[2/6/2018, 1:39:38 PM] [Fibaro HC2 2] Added/changed accessory:  Ceiling Strip 1 new
^C[2/6/2018, 1:39:41 PM] Got SIGINT, shutting down Homebridge...
% homebridge
[2/6/2018, 1:39:44 PM] Loaded plugin: homebridge-fibaro-hc2
[2/6/2018, 1:39:44 PM] Registering platform 'homebridge-fibaro-hc2.FibaroHC2'
[2/6/2018, 1:39:44 PM] ---
[2/6/2018, 1:39:44 PM] Loaded config.json with 0 accessories and 3 platforms.
[2/6/2018, 1:39:44 PM] ---
[2/6/2018, 1:39:44 PM] Loading 3 platforms...
[2/6/2018, 1:39:44 PM] [Fibaro HC2 1] Initializing FibaroHC2 platform...
[2/6/2018, 1:39:44 PM] [Fibaro HC2 2] Initializing FibaroHC2 platform...
[2/6/2018, 1:39:44 PM] [Fibaro HC2 3] Initializing FibaroHC2 platform...
[2/6/2018, 1:39:44 PM] Loading 0 accessories...
[2/6/2018, 1:39:44 PM] [Fibaro HC2 3] Configured Accessory:  床灯 Ceiling TV
[2/6/2018, 1:39:44 PM] [Fibaro HC2 3] Configured Accessory:  插座1 Xmas Star
[2/6/2018, 1:39:44 PM] [Fibaro HC2 3] Configured Accessory:  Ceiling Strip 1 new
Setup Payload:
X-HM://00240T6M66K52
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
[... QR code etc...]
[2/6/2018, 1:39:44 PM] [Fibaro HC2 1] didFinishLaunching. 
[2/6/2018, 1:39:44 PM] [Fibaro HC2 2] didFinishLaunching. 
[2/6/2018, 1:39:44 PM] [Fibaro HC2 3] didFinishLaunching. 
[2/6/2018, 1:39:44 PM] Homebridge is running on port 6088.
[2/6/2018, 1:39:44 PM] [Fibaro HC2 3] Loading accessories 
[2/6/2018, 1:39:44 PM] [Fibaro HC2 3] Added/changed accessory:  床灯 Ceiling TV
[2/6/2018, 1:39:44 PM] [Fibaro HC2 3] Remove accessory 插座1 Xmas Star
[2/6/2018, 1:39:44 PM] [Fibaro HC2 3] Remove accessory Ceiling Strip 1 new
[2/6/2018, 1:39:44 PM] [Fibaro HC2 1] Loading accessories 
[2/6/2018, 1:39:44 PM] [Fibaro HC2 1] Added/changed accessory:  插座1 Xmas Star
[2/6/2018, 1:39:44 PM] [Fibaro HC2 2] Loading accessories 
[2/6/2018, 1:39:44 PM] [Fibaro HC2 2] Added/changed accessory:  Ceiling Strip 1 new
^C[2/6/2018, 1:39:46 PM] Got SIGINT, shutting down Homebridge...
ilcato commented 6 years ago

Did you try to launch homebridge after deleting accessories folder?

beorn commented 6 years ago

If I delete accessories and persist folders and re-launch, then it works fine the first time. But if I stop it and start it again after that, I get the above problem. I also can't make sense of the way accessories are loaded and unloaded across the home center users (FC 1/2/3)?

ilcato commented 6 years ago

I made a change in a file. Try to replace "dist/index.js" in your installation, remove accessories folder and restart.

beorn commented 6 years ago

I'm still getting random occurrences of the same error.

% homebridge
[2/7/2018, 1:33:19 PM] Loaded plugin: homebridge-fibaro-hc2
[2/7/2018, 1:33:19 PM] Registering platform 'homebridge-fibaro-hc2.FibaroHC2'
[2/7/2018, 1:33:19 PM] ---
[2/7/2018, 1:33:19 PM] Loaded config.json with 0 accessories and 3 platforms.
[2/7/2018, 1:33:19 PM] ---
[2/7/2018, 1:33:19 PM] Loading 3 platforms...
[2/7/2018, 1:33:19 PM] [Fibaro HC2 1] Initializing FibaroHC2 platform...
[2/7/2018, 1:33:19 PM] [Fibaro HC2 2] Initializing FibaroHC2 platform...
[2/7/2018, 1:33:19 PM] [Fibaro HC2 3] Initializing FibaroHC2 platform...
[2/7/2018, 1:33:19 PM] Loading 0 accessories...
[2/7/2018, 1:33:19 PM] [Fibaro HC2 3] Configured Accessory:  插座1 Xmas Star
[2/7/2018, 1:33:19 PM] [Fibaro HC2 3] Configured Accessory:  床灯 Ceiling TV
[2/7/2018, 1:33:19 PM] [Fibaro HC2 3] Configured Accessory:  Ceiling Strip 1 new
[...QR code...]
[2/7/2018, 1:33:19 PM] [Fibaro HC2 1] didFinishLaunching. 
[2/7/2018, 1:33:19 PM] [Fibaro HC2 2] didFinishLaunching. 
[2/7/2018, 1:33:19 PM] [Fibaro HC2 3] didFinishLaunching. 
[2/7/2018, 1:33:19 PM] Homebridge is running on port 6088.
[2/7/2018, 1:33:19 PM] [Fibaro HC2 2] Loading accessories 
[2/7/2018, 1:33:19 PM] [Fibaro HC2 2] Error getting data from Home Center:  Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 4695dda7-cc2a-4b50-b1f1-795b06041bb5
    at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:264:13)
    at Bridge.Accessory.addBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:290:10)
    at Server._handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:451:16)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:41:10)
    at API.emit (events.js:160:13)
    at API.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/api.js:159:8)
    at ShadowAccessory.resgisterUpdateAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/shadows.js:87:17)
    at FibaroHC2.addAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:171:25)
    at LoadAccessories.devices.map (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:113:22)
    at Array.map (<anonymous>)
[2/7/2018, 1:33:19 PM] [Fibaro HC2 1] Loading accessories 
[2/7/2018, 1:33:19 PM] [Fibaro HC2 1] Error getting data from Home Center:  Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 9e46f7f7-e186-4aef-a296-0b7c939b1815
    at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:264:13)
    at Bridge.Accessory.addBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:290:10)
    at Server._handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:451:16)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:41:10)
    at API.emit (events.js:160:13)
    at API.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/api.js:159:8)
    at ShadowAccessory.resgisterUpdateAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/shadows.js:87:17)
    at FibaroHC2.addAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:171:25)
    at LoadAccessories.devices.map (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:113:22)
    at Array.map (<anonymous>)
[2/7/2018, 1:33:19 PM] [Fibaro HC2 3] Loading accessories 
[2/7/2018, 1:33:19 PM] [Fibaro HC2 3] Added/changed accessory:  床灯 Ceiling TV
[2/7/2018, 1:33:19 PM] [Fibaro HC2 3] Remove accessory 插座1 Xmas Star
[2/7/2018, 1:33:19 PM] [Fibaro HC2 3] Remove accessory Ceiling Strip 1 new
^C[2/7/2018, 1:33:21 PM] Got SIGINT, shutting down Homebridge...
ilcato commented 6 years ago

I made another change can you try again (same procedure)?

beorn commented 6 years ago

Same as before. It works the first time, then after that I get the error:

% homebridge
[2/7/2018, 2:34:31 PM] Loaded plugin: homebridge-fibaro-hc2
[2/7/2018, 2:34:31 PM] Registering platform 'homebridge-fibaro-hc2.FibaroHC2'
[2/7/2018, 2:34:31 PM] ---
[2/7/2018, 2:34:31 PM] Loaded config.json with 0 accessories and 3 platforms.
[2/7/2018, 2:34:31 PM] ---
[2/7/2018, 2:34:31 PM] Loading 3 platforms...
[2/7/2018, 2:34:31 PM] [Fibaro HC2 1] Initializing FibaroHC2 platform...
[2/7/2018, 2:34:31 PM] [Fibaro HC2 2] Initializing FibaroHC2 platform...
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] Initializing FibaroHC2 platform...
[2/7/2018, 2:34:31 PM] Loading 0 accessories...
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] Configured Accessory:  床灯 Ceiling TV
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] Configured Accessory:  插座1 Xmas Star
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] Configured Accessory:  Ceiling Strip 1 new
[...QR code...]
[2/7/2018, 2:34:31 PM] [Fibaro HC2 1] didFinishLaunching. 
[2/7/2018, 2:34:31 PM] [Fibaro HC2 2] didFinishLaunching. 
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] didFinishLaunching. 
[2/7/2018, 2:34:31 PM] Homebridge is running on port 6088.
[2/7/2018, 2:34:31 PM] [Fibaro HC2 1] Loading accessories 
[2/7/2018, 2:34:31 PM] [Fibaro HC2 1] Unique seed:  插座1 Xmas Star3Fibaro HC2 1
[2/7/2018, 2:34:31 PM] [Fibaro HC2 1] Error getting data from Home Center:  Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 9e46f7f7-e186-4aef-a296-0b7c939b1815
    at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:264:13)
    at Bridge.Accessory.addBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:290:10)
    at Server._handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:451:16)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:41:10)
    at API.emit (events.js:160:13)
    at API.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/api.js:159:8)
    at ShadowAccessory.resgisterUpdateAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/shadows.js:87:17)
    at FibaroHC2.addAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:172:25)
    at LoadAccessories.devices.map (/usr/local/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:113:22)
    at Array.map (<anonymous>)
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] Loading accessories 
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] Unique seed:  床灯 Ceiling TV1952Fibaro HC2 3
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] Added/changed accessory:  床灯 Ceiling TV
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] Remove accessory 插座1 Xmas Star
[2/7/2018, 2:34:31 PM] [Fibaro HC2 3] Remove accessory Ceiling Strip 1 new
[2/7/2018, 2:34:31 PM] [Fibaro HC2 2] Loading accessories 
[2/7/2018, 2:34:31 PM] [Fibaro HC2 2] Unique seed:  Ceiling Strip 1 new58Fibaro HC2 2
[2/7/2018, 2:34:31 PM] [Fibaro HC2 2] Added/changed accessory:  Ceiling Strip 1 new
^C[2/7/2018, 2:34:35 PM] Got SIGINT, shutting down Homebridge...
ilcato commented 6 years ago

Unfortunately it seems that homebridge doesn't call a necessary function for this scenario. You can try to run 3 different instances of homebridge with 3 different config.json file that specify bridge parameters (name, username and port) and a single fibre-hc2 platform in each.

beorn commented 6 years ago

Or submit a bug report to Homebridge about this? I'm not exactly sure what's missing, so would need your help.

ilcato commented 6 years ago

The problem is that homebridge stores in the accessories folder the devices based on the platform name without a reference to the specific instance.

ilcato commented 6 years ago

@beorn, it is confirmed that the only way to solve your issue is to have multiple instances of homebridge.