Skip to content

Conversation

andersfugmann
Copy link
Collaborator

This change reverts broken logic that prevented re-authentication when self._error_report is true. I dont think self._error_report is meant to be for control flow beyond limiting error reporting.

This problem was initially reported in this comment

This change allows home-assistant to successfully reconnect to the W215 after losing connection

@andersfugmann
Copy link
Collaborator Author

Ping @LinuxChristian

@LinuxChristian
Copy link
Owner

@andersfugmann thanks for submitting this. Have you tested it on a physical device? I don’t have any working W215 to test with.

@andersfugmann
Copy link
Collaborator Author

@LinuxChristian Yes. Its working like a charm on three connected dlink w215 devices controlled by home-assistant. Without the changes, home-assistant is not able to re-connect if connection is lost (e.g. if the devices are power-cycled). This PR fixes that.

@LinuxChristian LinuxChristian merged commit 4e0d8e8 into LinuxChristian:master Jun 23, 2025
@LinuxChristian
Copy link
Owner

Thanks @andersfugmann - I have created a new release (v0.8) that you can add to the official hass repo to make it the default version. Then all hass users can benefit from it.

I have also added you to this repo as co-owner in case you have other fixes.

@andersfugmann andersfugmann deleted the andersfugmann/fix_auth branch June 23, 2025 18:56
@andersfugmann
Copy link
Collaborator Author

Thanks a lot. Have you uploaded the release to pypi?
The home-assistant dlink smartplug integration fetches dependencies though pip/uv. See https://github.com/home-assistant/core/blob/dev/homeassistant/components/dlink/manifest.json.

I'll create a PR to update the dependencies once the new version is available on pypi.

@LinuxChristian
Copy link
Owner

Will upload it tomorrow. Do you have a PyPI user?

@andersfugmann
Copy link
Collaborator Author

No, I dont have a PyPI user :-)

@LinuxChristian
Copy link
Owner

Please validate that the package works - It has been a while since I released to pypi last time.

https://pypi.org/manage/project/pyW215/release/0.8.0/

@andersfugmann
Copy link
Collaborator Author

Tested and verified. Also created PR tp update depdendencies for the dlink integration for home-assistant to use 0.8.0: home-assistant/core#147534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants