Commit Graph

50 Commits (fc1babfc92ec975888b62a3509263e31a0e23f46)

Author SHA1 Message Date
J. Nick Koston 219348d573
Skip each ssdp listener that fails to bind (#53670) 2021-07-29 18:07:52 +02:00
Steven Looman 34b1ab5f5c
Upgrade to async-upnp-client==0.19.1 (#53288) 2021-07-21 14:29:27 -07:00
Ville Skyttä 470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02:00
J. Nick Koston 574cb03acc
Send ssdp requests to ipv4 broadcast as well (#52760)
* Send ssdp requests to 255.255.255.255 as well

- This matches pysonos behavior and may fix reports of
  inability to discover some sonos devices
  https://github.com/amelchio/pysonos/blob/master/pysonos/discovery.py#L120

* Update homeassistant/components/ssdp/__init__.py
2021-07-11 17:03:48 -04:00
Steven Looman a127131c1b
Upgrade async_upnp_client to 0.19.0 (#52019) 2021-06-20 18:17:39 +02:00
J. Nick Koston ccf4b5a265
Move remaining code out of netdisco to eliminate as SSDP dependency (#51588) 2021-06-07 22:12:33 +02:00
J. Nick Koston 12ac4109f4
Ensure ssdp can callback messages that do not have an ST (#51436)
* Ensure ssdp can callback messages that do not have an ST

Sonos sends unsolicited messages when the device reboots. We want
to capture these to ensure we can recover the subscriptions as soon
as the device reboots

* Update homeassistant/components/ssdp/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-05 09:23:51 +02:00
J. Nick Koston c1111afef8
Allow registering a callback to ssdp that matches any key value (#51382) 2021-06-03 08:26:37 -10:00
J. Nick Koston 32dc62a996
Handle empty ssdp descriptions in the cache (#51253) 2021-05-29 22:50:48 -05:00
J. Nick Koston fb50cf9840
Add network and callback support to SSDP (#51019)
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-28 21:18:59 -05:00
J. Nick Koston 60e65a4bc2
Bump async-upnp-client to 0.18.0 (#51017)
- Adds support for a long running SSDP listener
2021-05-24 13:50:40 +02:00
Franck Nijhof aa6b26c9ff
Upgrade defusedxml to 0.7.1 (#50671) 2021-05-15 19:41:34 +02:00
Steven Looman e284a14ccd
Upgrade async_upnp_client to 0.17.0 (#50371) 2021-05-09 17:06:47 -05:00
J. Nick Koston 7b07bc2d65
Bump netdisco to 2.8.3 for compat with latest zeroconf (#50212) 2021-05-06 22:26:03 -05:00
J. Nick Koston 9689e06d3c
Bump async-upnp-client to 0.16.2 (#49671) 2021-04-25 10:32:39 -10:00
J. Nick Koston c753606a74
Bump async-upnp-client to 0.16.1 (#49577) 2021-04-23 07:39:49 +02:00
Marc Mueller c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
J. Nick Koston 403c6b9e26
Stop ssdp scans when stop event happens (#49140) 2021-04-14 22:23:15 +02:00
Martin Hjelmare 7e30ab2fb2
Add missing internal quality scale label (#48947)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-10 12:37:20 +02:00
Steven Looman 7a6c88feeb
Bump async_upnp_client to 0.16.0 (#48521) 2021-03-30 15:36:18 -10:00
J. Nick Koston 39785c5cef
Switch ssdp to be async by using async_upnp_client for scanning (#46554)
SSDP scans no longer runs in the executor

This is an interim step that converts the async_upnp_client
response to netdisco's object to ensure fully backwards
compatibility
2021-02-18 11:00:11 +01:00
Vladimír Záhradník ee55223065
SSDP response decode: replace invalid utf-8 characters (#42681)
* SSDP response decode: replace invalid utf-8 characters

* Add test to validate replaced data

Co-authored-by: Joakim Plate <elupus@ecce.se>
2021-01-31 17:59:14 +01:00
J. Nick Koston 4907996dd6
Guard against empty ssdp locations (#43156) 2020-11-13 09:40:25 +01:00
J. Nick Koston 3661d8380a
Avoid the same task ending up multiple times in the ssdp asyncio.gather (#42815) 2020-11-04 17:25:37 +01:00
J. Nick Koston 6c1078d1ca
Reduce ssdp context switches into the executor (#42045)
* Reduce ssdp context switches into the executor

* no self use
2020-10-18 13:44:01 -05:00
Ville Skyttä eb0af3752c
Add more SSDP discovery data and constants (#39984) 2020-09-14 09:18:09 +02:00
J. Nick Koston 49edd91f4e
Bump netdisco to 2.8.2 to accomodate new zeroconf exception (#38949) 2020-08-17 09:46:30 +02:00
J. Nick Koston d0d0403664
Add zeroconf/homekit/ssdp discovery support for custom components (#38466)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-05 15:50:56 +02:00
J. Nick Koston 973688d87e
Bump netdisco to 2.8.1 (#38173)
* Bump netdisco to 2.8.1

* bump ssdp
2020-07-24 21:00:08 -10:00
J. Nick Koston 5cf7b1b1bc
Ensure we do not start discovered flows until after the started event has fired (#38047)
* Ensure we do not start discovered flows until after the start event has fired

This change makes zeroconf and ssdp match discovery behavior of not
creating config flows until the start event has been fired.  This
prevents config flow creation/dependency installs for discovered
config flows from competing for cpu time during startup.

* Start discovery/service browser/ssdp when EVENT_HOMEASSISTANT_STARTED is fired instead of EVENT_HOMEASSISTANT_START
2020-07-21 14:18:43 -10:00
J. Nick Koston fae47358b8
Use shared zeroconf for discovery netdisco (#37237)
* Use shared zeroconf for netdisco

* Update netdisco

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-29 19:34:38 -05:00
Paulus Schoutsen f69fc79fd1
Bump Netdisco to 2.7.1 (#36891) 2020-06-18 13:08:43 +02:00
Paulus Schoutsen 49747684a0
Update netdisco (#36499) 2020-06-06 19:02:39 +02:00
J. Nick Koston 5e65d8d3c3
Upgrade zeroconf to 0.27.1 (#36277) 2020-06-05 14:33:26 -07:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Franck Nijhof 22760a0bee Correct names in manifests (Q-S) (#30543) 2020-01-07 08:19:44 -05:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Ville Skyttä d236a19139
Include all SSDP data in discovery info (#28197)
* Include all SSDP data in discovery info

* Use UPnP device description as discovery info, inject some SSDP attrs

* Clean up attribute names

* Adapt existing SSDP flows to changed attribute names

* Prefix all SSDP UPnP attribute name constants with ATTR_UPNP, tweak a bit
2019-12-19 19:28:03 +02:00
Bas Nijholt 23b92b2a56 Sort imports according to PEP8 for components starting with "S" (#29777) 2019-12-09 14:38:01 +01:00
Ville Skyttä d4c80f160c Add bandit, use to catch known vulnerable XML parsing (#28341)
* Add bandit to pre-commit and CI, use to catch known vulnerable XML parsing

* Use defusedxml instead of direct xml.etree to parse XML

* Move config to tests/bandit.yaml
2019-11-18 09:10:15 +01:00
Ville Skyttä 1679ec3245 SSDP matching improvements (#28285)
* SSDP matching improvements

- support multiple match groups per domain
- require matches on all, not any item in a group
- support matching on all UPnP device description data

* Manifest structure fixes
2019-11-02 12:30:09 -07:00
Ville Skyttä 3c4caaaefc
Add presentation URL to SSDP discovery info (#28196) 2019-10-25 20:09:18 +03:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Ville Skyttä a54ade1189 Spelling fixes (#25666) 2019-08-02 23:20:06 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen d7c8adc085
Run SSDP discovery in parallel (#24299) 2019-06-04 11:04:02 -07:00
Robert Svensson 449a7d3fd5 deCONZ migrate to SSDP discovery (#24252)
* Migrate deCONZ to use new SSDP discovery
Add new discovery info manufacturer URL to be able to separate Hue and deCONZ bridges

* Mark deCONZ as migrated in Discovery component

* Fix tests

* Fix Hue discovery ignore deCONZ bridge

* Less snake more badger

* Mushroom

* Fix indentation

* Config flow ignore manufacturer url that is not philips
2019-06-03 09:26:01 -07:00
Paulus Schoutsen 6f299e7245
Improve error handling (#24204) 2019-05-30 16:23:42 -07:00
Paulus Schoutsen 9debbfb1a8
Add SSDP integration (#24090)
* Add SSDP integration

* Fix tests

* Sort all the things

* Add netdisco to test requirements
2019-05-26 19:48:27 -07:00