Multiple ZHA integrations possible?

I found some threads by people saying it does not work …

When I try to manually setup ZHA integration - and coordinator I get message that I can have only one, when I use configure of the auto discovered devices I can have two (probably more), is is bug or is there some reason for it?

image

image

but in the end only the first one added actually works

Now I have devices to 2 different coordinators at the same time and even two different home assistants???

needless to say neither of the devices (actually it is one device) actually detects the motion in either HA

You can currently only have one instance of the ZHA integration per Home Assistant installation, that is for sure. So for now it will only be the first instance of ZHA that you choose to configure that is used.

The only way I can think of getting two working instances of the ZHA integration per Home Assistant installed today would be the hacky option of manually copying the zha component to a new folder/directory and edit the manifest JSON file on the second copy so that its domain and name is named something else which is unique, which in practice would make it into a completely separate integration component, (and doing so would currently mess up the USB/Zeroconf discovery function for initiation the initial config flow).

I think that this pull request suggested for new introduction in ZHA documentation does explain this about current ZHA limitations → https://github.com/home-assistant/home-assistant.io/pull/24494

That might change in the future if the ZHA developers work on a ZHA WS (zhaws Websocket Server) project is continued and comes to fruition, see https://github.com/zigpy/zha-websocket-server/ and https://github.com/zigpy/zhaws-addon + the beginning of a matching thin frontend client component https://github.com/dmulcahey/home-assistant/tree/dm/zha-ws (which is the basis for a similar client-server architecture model that the existing Z-Wave JS implementation uses in Home Assistant).

For now what most people do instead as a workaround/solution to get two Zigbee gateways is to just install Zigbee2MQTT and use as a second Zigbee implementation → https://www.zigbee2mqtt.io

Regardless, a Zigbee device can only be connected to a single Zigbee network / Zigbee Coordinator.

I got two from Discovery

Discovery is only “USB Discovery” and “Zeroconf” ( Zero-configuration networking) which are really separate system integrations from the ZHA integration itself that are just designed to only list all compatible integrations for the devices/services that they have discovered, showing users the possibility that should be possible to do with them, but that does not change the fact that you currently can not install more than one instance of the ZHA integration on the same Home Assistant installation. So maybe that “USB Discovery” and “Zeroconf Discovery” could be seen as a bug or needing changing when yoy already have an ZHA integration installed in that Home Assistant installation. Suggest report that issue to core Issues · home-assistant/core · GitHub for the “USB Discovery” and “Zeroconf Discovery” integration and not the ZHA integration, see:

https://www.home-assistant.io/integrations/usb/

https://www.home-assistant.io/integrations/zeroconf/

zero conf i guess, but for yellow i dunno, i think it is different case even

You did not specifically mention that you have Home Assistant Yellow appliance hardware. Discovery of the built-in Zigbee Coordinator adapter will be different for Home Assistant Yellow appliance hardware since its Zigbee Coordinator adapter is connected via a static GPIO serial port only and does not use USB or Zerocoft but instead custom code for discovery if using the Yellow. Report as issue → https://github.com/home-assistant/core/issues and see Yellow specific documentation → https://yellow.home-assistant.io/ E.g. https://yellow.home-assistant.io/support/#what-is-the-serial-port-of-the-zigbee-radio

See related new core and frontend pull requests adding unique ID to Yellow hardware for ZHA discovery

Use a unique ID for the config flow when the Yellow is discovered. With home-assistant/frontend#14281, this allows for the ZHA discovery entry to be ignored.

This also correctly sets the name of the discovery card:

image

Add hardware as a config flow discovery source.

Without this change, discovered Yellow cannot be ignored:

image