alexander-vitishchenko / hc3-to-mqtt

Fibaro HC3 integration with Home Assistant & NodeRed
MIT License
31 stars 13 forks source link

3 Home center 3 replicated at same time to Home Assistant #30

Closed EzequielPitton78 closed 1 year ago

EzequielPitton78 commented 2 years ago

Large installation with 3 indepently syncronized HC3 may have duplicate device IDs that seemns to not be handled correctly.

alexander-vitishchenko commented 2 years ago

Hi @EzequielPitton78,

Can you please clarify whether those 3 independently synchronized HC3... may have duplicate device IDs, or they do have duplicate IDs?

How do you independently synchronize your HC3 instances? And do you run the QuickApp at (a) one of the HC3 instances, or (b) at all of them at the same time?

Thank you, Alexander

P.S.: apologies for late reply as I only finished my accommodation in Berlin

EzequielPitton78 commented 2 years ago

Hello @alexander-vitishchenko, Each HC3 is running running its own QuickApp at the same time since they are all masters (Gateway connection model changed from HC2 to HC3 and requires to reinclude all devices under the new master-slave scheme, not done at the moment). In my case with arround 120 devices in each HC3 at least some devices ID numbers are duplicated, so I wonder if you could or are using already also controller-id key when you publish to MQTT.

Ezequiel

PD: No apologies needed!!! THank you very much for your work!!!

alexander-vitishchenko commented 2 years ago

Hi @EzequielPitton78

Sure, I can extend "device id" with "controller id" (i.e. with HC3 serial number), so "" will look like "-"

Important thing is to preserve backward compatibility for the majority of people who don't have multi-gateway installations, so they they don't have to reconfigure the existing device register, scenes, etc.

Few options to add a new functionality while keeping the existing users unaffected:

  1. I can add a new QuickApp variable like "multipleGateways = true" (default = false)
  2. Or try adding the automatic discovery of HC3 master-master or master-slave installations. Then enrich device ids with HC3 serial id with multi-gateway setup automatically, which wouldn't require manual configuration of QuickApp variable. If this is the preferred route - then I need you to use swagger and send me JSON for each of your HC3 instances for (a) "gatewayConnection" (filterMap = gatewayConnection) and (b) "settings/info"
alexander-vitishchenko commented 1 year ago

Hi @EzequielPitton78,

Your feature request might be indirectly resolved with new entity id generation mechanism since 1.0.191 version of the QuickApp.

And if not - happy to assist with the new feature implementation is provided with more information and/or hardware. Please let me know. As for know closing the request to due its expiration.