evlo
(Evlo)
October 22, 2022, 8:34am
1
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?
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
Hedda
(Hedda)
October 24, 2022, 11:14am
2
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.
Hedda
(Hedda)
October 24, 2022, 2:16pm
4
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/
evlo
(Evlo)
October 24, 2022, 3:39pm
5
zero conf i guess, but for yellow i dunno, i think it is different case even
Hedda
(Hedda)
November 14, 2022, 2:08pm
6
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
Hedda
(Hedda)
November 15, 2022, 10:24am
7
See related new core and frontend pull requests adding unique ID to Yellow hardware for ZHA discovery
home-assistant:dev
← puddly:puddly/zha-config-flow-unique-hardware-id
opened 04:00AM - 04 Nov 22 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
Use a unique ID for the config flow when the Yellow is discovered. With https://github.com/home-assistant/frontend/pull/14281, this allows for the ZHA discovery entry to be ignored.
This also correctly sets the name of the discovery card:
<img width="297" alt="image" src="https://user-images.githubusercontent.com/32534428/199882632-4c70bf39-100f-4bcc-a6fc-b4be7a913dc4.png">
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] The code has been formatted using Black (`black --fast homeassistant tests`)
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[docs-repository]: https://github.com/home-assistant/home-assistant.io
home-assistant:dev
← puddly:puddly/add-hardware-discovery-source
opened 07:11PM - 03 Nov 22 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue or discussion
in the additional information section.
-->
Add `hardware` as a config flow discovery source.
Without this change, discovered Yellow cannot be ignored:
<img width="459" alt="image" src="https://user-images.githubusercontent.com/32534428/199812785-6a11b327-13ba-4344-bd8e-cbc24434b20f.png">
## Type of change
<!--
What type of change does your PR introduce to the Home Assistant frontend?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (thank you!)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Example configuration
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR.
-->
```yaml
```
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue or discussion:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] There is no commented out code in this PR.
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
<!--
Thank you for contributing <3
-->
[docs-repository]: https://github.com/home-assistant/home-assistant.io
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:
Add hardware
as a config flow discovery source.
Without this change, discovered Yellow cannot be ignored: