-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Improve Xioami Aqara zeroconf discovery handling #37469
Conversation
Hey there @Danielhiversen, @syssi, mind taking a look at this pull request as its been labeled with an integration ( |
@Danielhiversen You just released PyXiaomiGateway on github and can see it under github releases. |
The travis tests failed, so it was not pushed to pypi https://travis-ci.org/github/Danielhiversen/PyXiaomiGateway |
FYI - the build is now passing and pypi is up to date with PyXiaomiGateway v0.13.2 |
@frenck could you add this to the 0.113.3 milestone? |
Could someone merge this? |
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
@MartinHjelmare thanks for the revieuw! |
@MartinHjelmare the |
@MartinHjelmare Looks like the test failure is unrelated to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good!
@syssi, you've tagged it for 0.114.0, but this is an improvement, not a fix, right? |
@frenck it is both, it makes some improvements but mainly it fixes an issue that prevents lots of users to setup the integration. |
Ok, in that case, I'm a bit in the middle. The general policy is that we do not allow for new features/improvements after cutting the beta, only fixes. @MartinHjelmare What do you think? |
@@ -4,9 +4,11 @@ | |||
"step": { | |||
"user": { | |||
"title": "Xiaomi Aqara Gateway", | |||
"description": "Connect to your Xiaomi Aqara Gateway", | |||
"description": "Connect to your Xiaomi Aqara Gateway, if the IP and mac addresses are left empty, auto-discovery is used", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having this step, we should do discovery first, and then show a drop down of found entries with "Manual" being one of the options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do this in a future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint, that indeed sounds like a nice improvement.
There already is a drop down list in case multiple gateways are discovered using discovery so schould not be to hard to implement this.
I will not have time in the near future to do this, but I will keep it in mind to do it sometime in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine to put this in the beta as we're 1 day in. Should be enough time to get things fixed.
Co-authored-by: Franck Nijhof <git@frenck.dev> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Breaking change
Proposed change
Improve the handeling of a zeroconf discovered xiaomi aqara gateway.
This illiminates the need for a network search of the gateway, because the required information is already known.
fix issue with not beeing able to bind to interface if using some operating systems.
ensure listener loop can exit succesfully by setting a timeout and catching that timeout. (I experianced issues with homeassistant not beeing able to close or remove the xiaomi_aqara integration because it hangs forever on
data, (ip_add, _) = self._mcastsocket.recvfrom(self.SOCKET_BUFSIZE)
(there was no timeout) which prevented the listener loop to exit.Allow users to mannualy specify an IP an Mac address if both the SSDP and auto-discovery fail.
Type of change
Example entry for
configuration.yaml
:Config flow
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale: