Commit graph

135 commits

Author SHA1 Message Date
J. Nick Koston
0d0b77c9e4
Remove eager_start=False from zeroconf (#115498) 2024-04-13 00:09:42 -05:00
J. Nick Koston
ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately (#115169) 2024-04-08 10:07:54 -10:00
J. Nick Koston
166910f587
Make eager_start default to True for async_create_background_task (#114996) 2024-04-06 09:53:50 -10:00
J. Nick Koston
fa68c5633c
Fix zeroconf shutting down too early (#113638) 2024-03-16 14:42:27 -10:00
Joost Lekkerkerker
4547131bbc
Improve lists in integrations [X-Z] (#113253) 2024-03-13 20:32:12 +01:00
Marc Mueller
c773d57d39
Add empty line after module docstring [w-z] (#112706) 2024-03-08 10:35:45 -05:00
J. Nick Koston
a12fa0383b
Make zeroconf lookups background tasks (#112669)
* Make zeroconf lookups background tasks

There were blocking startup and shutdown

* disable for now
2024-03-07 23:37:56 -05:00
J. Nick Koston
d164039bba
Remove gather for loading generated files in zeroconf (#111699)
async_get_custom_components is the only place this can suspend
and it will always be cached by the time this is called so there
is no reason to schedule these on the event loop
2024-02-28 10:55:41 -05:00
J. Nick Koston
851ad21d11
Small cleanup to zeroconf properties matcher (#107342)
* Small cleanup to zeroconf properties matcher

- Switch to dict.items() to avoid dict key lookup
- return early when a match is rejected

* tweak
2024-01-06 10:16:57 +01:00
J. Nick Koston
bb30bfa225
Reduce zeroconf matcher complexity (#105880) 2023-12-23 11:04:05 +01:00
Ville Skyttä
24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
J. Nick Koston
4bdfea5d67
Remove HaAsyncServiceBrowser from zeroconf (#105881) 2023-12-18 14:11:06 +01:00
J. Nick Koston
aafdca88c9
Bump zeroconf to 0.129.0 (#105701)
* Bump zeroconf to 0.129.0

changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.128.5...0.129.0

* cleanup typing

* remove redunant lru

* revert type narrowing
2023-12-14 07:52:37 +01:00
J. Nick Koston
0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
J. Nick Koston
791482406c
Cleanup isinstance checks in zeroconf (#100090) 2023-09-11 08:13:25 -05:00
J. Nick Koston
d1f8309423
Bump zeroconf to 0.74.0 (#97745)
* Bump zeroconf to 0.74.0

changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.72.3...0.74.0

- more cython build fixes
- performance improvements (mostly for pyatv)

* handle typing

* handle typing

* remove if TYPE_CHECKING, this doesnt get called that often

* remove if TYPE_CHECKING, this doesnt get called that often
2023-08-03 22:48:53 -04:00
J. Nick Koston
605c4db142
Relocate async_get_announce_addresses from zeroconf to network (#94816) 2023-06-21 11:29:04 +02:00
J. Nick Koston
e0ae7a31fe
Remove _raw from zeroconf properties (#94615)
* Remove _raw from zeroconf properties

This was added in #31059 but it appears it was never used.

To preserve backwards compatibility, properties are still decoded
but utf-8 errors are replaced instead of dropped

* Remove _raw from zeroconf properties

This was added in #31059 but it appears it was never used.

To preserve backwards compatibility, properties are still decoded
but utf-8 errors are replaced instead of dropped
2023-06-14 21:31:52 -04:00
J. Nick Koston
b063a54295
Reduce overhead to match homekit zeroconf discoveries (#93753) 2023-05-29 23:42:12 +02:00
J. Nick Koston
e073f091b1
Cache ip address stringify in zeroconf (#92800)
stringify IPv6 addresses is expensive, and since zeroconf sees the same
ones over and over again an LRU can avoid the constant stringify
2023-05-14 12:07:38 -04:00
J. Nick Koston
0cc9b2e803
Use slots for discovery dataclasses (#90751) 2023-04-04 12:44:59 +02:00
J. Nick Koston
6dc55e4a3a
Bump zeroconf to 0.54.0 (#90744)
* Bump zeroconf to 0.54.0

fixes incorrect addresses when the server name changes

changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.53.0...0.54.0

* fix
2023-04-04 00:02:07 -04:00
J. Nick Koston
17270979e6
Bump zeroconf to 0.52.0 (#90660)
* Bump zeroconf to 0.52.0

Switch to using the new ip_addresses_by_version which avoids
all the ip address conversions

* updates
2023-04-02 14:09:44 -04:00
J. Nick Koston
331102e592
Dismiss discoveries when the underlying device disappears (#88340)
* Implement discovery removals

Bluetooth, HomeKit, SSDP, and Zeroconf now implement
dismissing discoveries when the underlying discovered
device disappears

* cover

* add zeroconf test

* cover

* cover bluetooth

* fix rediscover
2023-02-17 15:51:19 -05:00
J. Nick Koston
c83ea297b5
Refactor zeroconf task handling (#88204)
* Refactor zeroconf task handling

- Avoid the need to create tasks for most callbacks
- Fixes the untracked task that could get unexpectedly GCed

* be consistant

* be consistant

* fix zeroconf tests

* runtime

* Revert "runtime"

This reverts commit 19e6b61837.

* precalc

* refactor

* tweak

* update tests
2023-02-15 21:44:11 -05:00
J. Nick Koston
4d0e236c6a
Ignore invalid zeroconf names from devices with broken firmwares (#87414) 2023-02-04 16:29:03 -06:00
Franck Nijhof
4aba3fdad6
Code styling tweaks to the zeroconf integration (#86048) 2023-01-16 18:35:23 -10:00
Franck Nijhof
8819634b61
String formatting and max line length - Part 6 (#84525) 2022-12-24 13:19:51 +01:00
J. Nick Koston
5c38321c4f
Ignore unspecified addresses from zeroconf (#81620) 2022-11-07 15:50:45 -06:00
J. Nick Koston
a72e906ac1
Fix zeroconf when location name has a period (#81022) 2022-10-26 10:39:13 -05:00
J. Nick Koston
abb3ce6d69
Fix zeroconf starting later than expected (#81023) 2022-10-26 10:06:56 -05:00
Paulus Schoutsen
6e893d9162
Store alternative domain for Zeroconf homekit discovery (#79240) 2022-09-29 22:21:00 -04:00
epenet
7871a517a8
Import constants from root (#78271) 2022-09-12 18:53:05 +02:00
J. Nick Koston
c975146146
Reduce discovery integration matching overhead (#77194) 2022-08-23 10:35:20 -04:00
J. Nick Koston
df6892b908
Offer HKC local push control option when there are multiple zeroconf homekit matches (#74441) 2022-07-05 21:02:18 -07:00
Franck Nijhof
bfb47eb212
Final clean up of helpers accessed via hass (#72032)
* Final clean up of helpers accessed via hass

* Fix circular dep

* Fix import
2022-05-17 23:42:37 +03:00
epenet
141688e210
Cleanup ServiceInfo compatibility (#60540)
Co-authored-by: epenet <epenet@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-05-09 14:17:48 +02:00
Joshua Roys
bc2cc42955
Don't abort zeroconf discovery for IPv6-only devices (#66455) 2022-02-13 15:24:23 -06:00
Joshua Roys
9134e5c844
Get discovered zeroconf IPv6 addresses (#65462) 2022-02-11 16:46:17 -06:00
J. Nick Koston
ee375ff42d
Offer local control option when there are multiple zeroconf homekit matches (#62649) 2022-01-04 16:51:38 +01:00
J. Nick Koston
615872a5d1
Align zeroconf matching with ZeroconfServiceInfo (#62133) 2021-12-19 02:09:21 -06:00
epenet
da7c5f4722
Break long lines in discovery_info (#61431) 2021-12-10 12:48:47 +01:00
epenet
c05eca1c82
Remove log flooding prevention logic from discovery info (#61243)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-08 10:28:26 -10:00
epenet
683eb10f0e
Enable warnings for ZeroconfServiceInfo (#60759)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 05:55:36 -10:00
epenet
cbab0ba9c0
Drop base ATTR constants in zeroconf (#60561)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 12:29:41 +01:00
epenet
37430e7c9e
Add get method to ZeroconfServiceInfo (#60528)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-29 17:37:55 +01:00
J. Nick Koston
fd116fc408
Refactor zeroconf matching to be more DRY (#60293) 2021-11-24 19:57:13 +01:00
epenet
44611d7e26
Use dataclass for ZeroconfServiceInfo (#60206)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-23 22:59:36 +01:00
epenet
d0ff8a9b76
Add id constant for homekit discovery (#59986) 2021-11-20 10:07:59 +00:00
Simone Chemelli
5fc51130ea
Replace util.get_local_ip in favor of components.network.async_get_source_ip() - part 4 (#58669)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-11-15 09:18:57 -08:00