t0bst4r / home-assistant-matter-hub

Publish your Home-Assistant Instance using Matter.
Apache License 2.0
157 stars 10 forks source link

Clarification Needed on IPv6 Requirements in Documentation #171

Closed simeononsecurity closed 3 days ago

simeononsecurity commented 6 days ago

The current documentation for the Home Assistant Matter Hub should more explicitly clarify the requirement for IPv6. Specifically, it should state that IPv6 must be enabled locally on the host machine and the local network and that it is necessary for Matter communication. However, there is no requirement for an IPv6-enabled WAN connection. This clarification would be helpful as many users may have local IPv6 disabled as a security best practice, or their network hardware may not support IPv6 locally, even if it is optimal from a future-proofing perspective.

Additionally, while the documentation implies that IPv4 is optional but supported, it would be beneficial to elaborate on how IPv4 can be used and what limitations might exist if IPv4 is enabled but IPv6 remains disabled. Currently, from my testing, IPv6 is mandatory. If there are specific configurations needed for IPv4-only setups, adding those details would be greatly appreciated.

Thank you for considering these enhancements to make the documentation clearer and more user-friendly!

pixelion8 commented 6 days ago

Hi, I am trying to check my local network settings because for me everything went fine until the step to Link to my google home. All of my entities showed up and all but grey and marked offline. I was trying to check my local network and I want to ask if you add to activate DHCPV6 and DNSv6 (personalisation). Also I have two options : a firewall for ipv6 and a firewall on secondary prefixes. Should I turn them down ?

Apollon77 commented 6 days ago

Maybe linking to https://github.com/project-chip/matter.js/blob/main/docs/TROUBLESHOOTING.md#matter-and-ipv6 could be an idea?

simeononsecurity commented 6 days ago

Thank you for considering the idea of linking to the Matter.js troubleshooting guide at this link. However, I have some concerns about relying on external documentation for a project of this scope.

The Matter.js documentation, which is already referenced in this project's documentation, states:

Matter requires IPv6, but optionally also allows IPv4. If you have issues with pairing, please check if your network allows IPv6 traffic.

This raises a few questions:

I believe clarifying this requirement in the documentation would benefit many users. If IPv4 support can be configured, detailed guidance would be greatly appreciated. If not, making IPv6 a stated requirement would avoid confusion.

simeononsecurity commented 6 days ago

Hi, I am trying to check my local network settings because for me everything went fine until the step to Link to my google home. All of my entities showed up and all but grey and marked offline. I was trying to check my local network and I want to ask if you add to activate DHCPV6 and DNSv6 (personalisation). Also I have two options : a firewall for ipv6 and a firewall on secondary prefixes. Should I turn them down ?

It's possible that a firewall setting is contributing to the issue. However, in my experience, pairing typically fails altogether if IPv6 isn't enabled and working. Since you've managed to get past the pairing step and are encountering problems with your entities showing as offline, it seems likely that you are facing a different issue.

I could be mistaken, but based on what you've described, your situation may align more closely with the problem discussed in this issue: https://github.com/t0bst4r/home-assistant-matter-hub/issues/163. It might be worth monitoring that thread for any updates or solutions.

Apollon77 commented 5 days ago

@simeononsecurity

However, I have some concerns about relying on external documentation for a project of this scope.

Hm ... matter.js is the base project used by this project to offer all matter related functionality ... so when matter.js would disappear then missing documentation is the smallest problem this project would have ;-)

For "failing with IPv6" I need to say that basically (at least last time i checked) only Google Home was not working without IPv6 ... So Apple and Alexa were able to do also with IPv4, but truely this is "edge case" and "can break anytime".

So said sort: if you have proposals on how to improve the pages (also in matter.js) I am happy about Pull Requests with changes you consider helpful. Thank you

simeononsecurity commented 5 days ago

@simeononsecurity

However, I have some concerns about relying on external documentation for a project of this scope.

Hm ... matter.js is the base project used by this project to offer all matter related functionality ... so when matter.js would disappear then missing documentation is the smallest problem this project would have ;-)

For "failing with IPv6" I need to say that basically (at least last time i checked) only Google Home was not working without IPv6 ... So Apple and Alexa were able to do also with IPv4, but truely this is "edge case" and "can break anytime".

So said sort: if you have proposals on how to improve the pages (also in matter.js) I am happy about Pull Requests with changes you consider helpful. Thank you

That being said, if a major component of a project has limitations then those should be documented in addition to project documentation. Not in lue of project documentationo.

I spent a good deal of time testing, may be a edge case sure. But I've tested in two entirely separate network environments now. Each with Apple HomeKit, Google Home, Amazon Alexa, and Samsung SmartThings. With this repo installed natively through the addon repo on a HA Yellow. I was unable to even get past the pairing stage without IPv6 enabled.

I'd be glad to open a PR on either or both project(s) if I understood the problem at more than a high level. Sounds like IPv4 being optional is something controlled on the service side and not on our side. If that is the case, then we should just document that.

As far as the matter.js docs, I'd only change a line or two. Barely worthy of a PR, if at all. Assuming I understand the problem now, I'd be glad to submit some suggested changes.

As far as this project goes, I'd probably put in the actual readme that IPv6 is required in almost all cases.

Apollon77 commented 5 days ago

Yes yes Matter-wise ipb6 is "the way to go" ... IPv4 might work but can be turned off by device updates or anything anytime. SO I would only rely on IPv6 for matter to be on safe side.

t0bst4r commented 3 days ago

I have added some comments in the "documentation" for now.

Feel free to raise a PR to further improve it.