Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nanoleaf] Suppress ipv6 addr in controller discovery #17724

Merged
merged 5 commits into from
Nov 10, 2024

Conversation

stefan-hoehn
Copy link
Contributor

@stefan-hoehn stefan-hoehn commented Nov 9, 2024

The nanoleaf binding becomes very unstable when run in an ipv6 environment (though ipv6 is required when using matter). This simple change ignores the (additional) ipv6 announcement of the nanoleaf controller which fixes online/offline flapping of the nanoleaf thing.

Also see https://community.openhab.org/t/nanoleaf-binding-may-fail-when-upgrading-to-the-latest-nanoleaf-firmware-because-of-ipv6/148152

…overy

Signed-off-by: Stefan Höhn <stefan.hoehn@nfon.com>
@stefan-hoehn
Copy link
Contributor Author

@kaikreuzer Can you review this. It would make sense to add this the milestone tomorrow as matter is coming soon which requires ipv6 and without this fix the nanoleaf binding isn't reliable anymore.

…overy

Signed-off-by: Stefan Höhn <stefan.hoehn@nfon.com>
@lsiepel lsiepel changed the title Stabilize nanoleaf binding: suppress ipv6 addr in controller discovery [nanoleaf] Suppress ipv6 addr in controller discovery Nov 9, 2024
@lsiepel lsiepel added the enhancement An enhancement or new feature for an existing add-on label Nov 9, 2024
@lsiepel
Copy link
Contributor

lsiepel commented Nov 9, 2024

Double check: does this apply to all nanoleave devices? All revisions and firmware?
So the devices have ipv6 but with ipv6 enabled all devices are unusable?

On my phone unable to fully asses the code change and don’t expect to have time before the milestone build

@stefan-hoehn
Copy link
Contributor Author

stefan-hoehn commented Nov 9, 2024

Yes it does, it happens to all panels and canvases - so all "wall-mounted" devices (at least all that I have). By the way this way introduced with some firmware changes a while ago (see the link of the community discussion I added) when all of a sudden Nanolead added ipv6 support. So you may run on an older firmware? My devices are all on the latest one.

It is not related to bulbs and other devices that are only matter/thread enabled.

If have many different devices of the ones that the binding supports and it is pretty annoying. The main problem seems somehow burried in the fact that the device may get communications via both ipv4 and ipv6 and therefore there seems to be something like an "interference" which then makes it flapping and it goes ON and OFF. As I am not completely sure what the exact issue is, this is, for the time being, the easiest solution that fixes it. Maybe, in an upcoming release, I can figure it out and an idea would be that during discovery only one device creation is used, either ipv6 or ipv4 and as soon as this has been added the other will then be suppressed. However, this is a more tricky approach which I need to investigate. The only downside of this fix here is, that the binding doesn't support a device being used based on the ipv6 address which is probably not an issue.

@lsiepel
Copy link
Contributor

lsiepel commented Nov 9, 2024

Ok thanks, please add a note to the readme.md about this ipv6 suppression. Otherwise LGTM.

Signed-off-by: Stefan Höhn <stefan.hoehn@nfon.com>
Signed-off-by: Stefan Höhn <stefan.hoehn@nfon.com>
@stefan-hoehn
Copy link
Contributor Author

I added a note to the Readme.
Btw, it already hat a reference to that issue and mentioned "With firmware version 8.5.2 or newer..." IPv6 should be switched off which I have now removed as IPv6 can be kept on as the binding can deal with it during the discovery.

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

Signed-off-by: Stefan Höhn <stefan.hoehn@nfon.com>
@lsiepel lsiepel merged commit 987b894 into openhab:main Nov 10, 2024
5 checks passed
@lsiepel lsiepel added this to the 4.3 milestone Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants