Commit Graph

182 Commits (7f345e7672ed2befb48d37bcce3a7a875a0d4bb1)

Author SHA1 Message Date
GitHub Action dc31f420ed [ci skip] Translation update 2022-03-12 00:17:47 +00:00
GitHub Action 66d757115c [ci skip] Translation update 2022-03-11 00:21:48 +00:00
epenet d656acfa2c
Bump async-upnp-client to 0.26.0 (#67760) 2022-03-07 11:08:50 +01:00
GitHub Action e963ad96d4 [ci skip] Translation update 2022-03-01 00:23:47 +00:00
Steven Looman dbbb5655e5
Bump async-upnp-client to 0.25.0 (#66414)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-02-27 08:29:29 -10:00
GitHub Action 102ae9f0e3 [ci skip] Translation update 2022-02-22 00:17:23 +00:00
Michael Chisholm 3c15fe8587
Add media browser support to dlna_dmr (#66425) 2022-02-19 21:07:38 -08:00
GitHub Action ad0cb4831e [ci skip] Translation update 2022-02-14 00:15:30 +00:00
Ben Edmunds c93d389544
Bump async-upnp-client to 0.23.5 (#65922) 2022-02-08 20:27:16 +02:00
GitHub Action 2da4d280b2 [ci skip] Translation update 2022-02-06 00:17:31 +00:00
GitHub Action 256ad084c5 [ci skip] Translation update 2022-02-03 00:14:18 +00:00
GitHub Action ca7d4234e1 [ci skip] Translation update 2022-01-31 00:14:28 +00:00
GitHub Action 77ef86faee [ci skip] Translation update 2022-01-30 00:14:21 +00:00
J. Nick Koston 5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
GitHub Action dd4e5bb9c5 [ci skip] Translation update 2022-01-27 00:14:02 +00:00
Michael Chisholm c9e495607e
Ignore further ssdp:alive message if connection fails in dlna_dmr (#59891) 2022-01-20 11:23:23 -10:00
Michael Chisholm 45b8684b37
Bump async-upnp-client to 0.23.4 (#64287) 2022-01-17 14:55:07 +01:00
Marc Mueller 67c35652f0
Update typing - collections.abc (2) (#63934) 2022-01-12 09:04:37 +01:00
Michael Chisholm dc71d59141
dlna_dmr: Allow for upnp attributes with None contents (#63892) 2022-01-11 13:36:46 +01:00
GitHub Action d99548fc04 [ci skip] Translation update 2022-01-10 00:14:49 +00:00
Marc Mueller 89859aad8d
Fix ParamSpec Callable return types (#63701) 2022-01-09 06:03:18 +01:00
GitHub Action a8fee4c2f6 [ci skip] Translation update 2022-01-09 00:15:18 +00:00
GitHub Action 0827608302 [ci skip] Translation update 2022-01-08 00:14:39 +00:00
Marc Mueller 53496c019c
Start using `ParamSpec` for decorator functions (#63148) 2022-01-04 18:37:46 +01:00
Steven Looman cba752c1af
Bump async-upnp-client==0.23.3 (#63282) 2022-01-03 13:42:09 +01:00
GitHub Action 8c8c7e91a2 [ci skip] Translation update 2021-12-25 00:13:29 +00:00
Steven Looman cb82169e92
Bump async-upnp-client to 0.23.2 (#62634) 2021-12-22 13:23:22 -10:00
Robert Hillis ed9e17aeec
Clean up ssdp flow in dlna_dmr (#62466) 2021-12-21 12:02:21 +01:00
Robert Hillis e689afc0b3
Remove deprecated yaml config from dlna_dmr (#62344) 2021-12-20 13:56:45 +01:00
Michael Chisholm f280b03df8
Update async-upnp-client library to 0.23.1 (#62298) 2021-12-18 23:41:32 -06:00
Diego Elio Pettenò 6ce99bfc80
Bump async-upnp-client to 0.23.0 (#62223) 2021-12-17 16:57:02 -06:00
GitHub Action eb345bfdf1 [ci skip] Translation update 2021-12-14 00:13:33 +00:00
GitHub Action f75b325ab2 [ci skip] Translation update 2021-12-12 00:14:30 +00:00
GitHub Action 68ca0a05c8 [ci skip] Translation update 2021-12-04 00:13:16 +00:00
Marc Mueller f57d42a9e8
Use platform enum (1) [A-D] (#60908)
* Use platform enum (1) [A-D]

* Fix imports

* Fix tests

* Use Platform even in tests
2021-12-03 08:51:30 -08:00
epenet 66494b0238
Use dataclass properties in dlna_dmr (#60794)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-02 09:49:34 -08:00
epenet e95914cf60
Use dataclass properties in dlna_dmr discovery (#60693)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 08:59:12 -10:00
GitHub Action c9589f763c [ci skip] Translation update 2021-12-01 00:17:12 +00:00
epenet ec1c52d945
Use dataclass for SsdpServiceInfo (#59931)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-29 06:10:07 -10:00
GitHub Action 96313bbbe0 [ci skip] Translation update 2021-11-27 00:12:17 +00:00
Michael Chisholm 9fa6daf47a
dlna_dmr: Ignore philips tv (#60204) 2021-11-23 23:22:34 +01:00
GitHub Action 9e606abb0c [ci skip] Translation update 2021-11-23 00:13:54 +00:00
GitHub Action 31d4239b64 [ci skip] Translation update 2021-11-22 00:13:02 +00:00
GitHub Action 29dc9de08f [ci skip] Translation update 2021-11-19 00:14:01 +00:00
GitHub Action 9a85c8d894 [ci skip] Translation update 2021-11-18 00:12:48 +00:00
GitHub Action 0228d11546 [ci skip] Translation update 2021-11-16 00:18:33 +00:00
GitHub Action fc539da42b [ci skip] Translation update 2021-11-14 00:12:48 +00:00
GitHub Action 86b12af3dc [ci skip] Translation update 2021-11-10 00:17:39 +00:00
GitHub Action e35b83081e [ci skip] Translation update 2021-11-08 00:12:31 +00:00
Franck Nijhof ddf0941275
Upgrade async-upnp-client to 0.22.12 (#59284) 2021-11-07 07:41:26 -08:00
GitHub Action 332a571bb4 [ci skip] Translation update 2021-11-07 00:12:38 +00:00
GitHub Action 7b59dea67e [ci skip] Translation update 2021-11-06 00:11:41 +00:00
GitHub Action c8d8513a1a [ci skip] Translation update 2021-11-05 00:13:45 +00:00
GitHub Action 2f4b7fe809 [ci skip] Translation update 2021-11-03 00:11:55 +00:00
GitHub Action 0a94badb72 [ci skip] Translation update 2021-11-02 00:12:41 +00:00
Marc Mueller e0c0d00833
Use assignment expressions 39 (#58829) 2021-10-31 18:56:25 +01:00
Michael Chisholm 4f83a251fa
Bump async-upnp-client to 0.22.11 (#58803) 2021-10-31 16:16:50 +01:00
Michael Chisholm ce27fb87c6
dlna_dmr: less eager discovery (#58780) 2021-10-31 16:11:20 +01:00
Marc Mueller 84618fa831
Use assignment expressions 30 (#58714) 2021-10-30 16:33:42 +02:00
GitHub Action 9fafa57074 [ci skip] Translation update 2021-10-30 00:11:34 +00:00
GitHub Action 7d408e3288 [ci skip] Translation update 2021-10-29 00:30:22 +00:00
Michael Chisholm 6cdc372dcb
Add more dlna_dmr media_player services and attributes (#57827) 2021-10-28 16:44:41 -05:00
GitHub Action e75e40f26e [ci skip] Translation update 2021-10-27 00:11:52 +00:00
Michael Chisholm 2ea537e1a6
dlna_dmr will gracefully handle device's rejection of subscription attempt (#58451) 2021-10-26 20:19:18 +02:00
Michael Chisholm 44aa1fdc66
dlna_dmr won't support devices that don't provide all DMR services (#58374) 2021-10-25 19:54:58 -05:00
GitHub Action a9a74e0415 [ci skip] Translation update 2021-10-26 00:12:23 +00:00
Steven Looman e5e38ace6c
Bump async-upnp-client to 0.22.10 (#58387) 2021-10-25 12:22:19 +02:00
GitHub Action 30fb619095 [ci skip] Translation update 2021-10-24 00:12:57 +00:00
GitHub Action 1b42caa34a [ci skip] Translation update 2021-10-23 00:11:40 +00:00
Michael Chisholm ee087c7a05
Discovery ignores DLNA DMR devices when they are better supported by another integration (#57363) 2021-10-22 10:26:33 -10:00
Michael Chisholm 164f09c1f0
Sleep between device requests to detect socket closes (#58087) 2021-10-22 14:22:10 +02:00
Marc Mueller 184e0d7fdf
Use assignment expressions 26 (#58187) 2021-10-22 11:31:17 +02:00
GitHub Action f9d985553c [ci skip] Translation update 2021-10-22 00:14:10 +00:00
J. Nick Koston 4a9209ebc8
Bump async-upnp-client to 0.22.9 (#58185)
Co-authored-by: Steven Looman <steven.looman@gmail.com>
2021-10-21 10:58:34 -10:00
GitHub Action 4634b65924 [ci skip] Translation update 2021-10-21 00:12:43 +00:00
GitHub Action 3855bb43ec [ci skip] Translation update 2021-10-19 00:12:08 +00:00
GitHub Action c76e15149c [ci skip] Translation update 2021-10-17 00:12:27 +00:00
Michael Chisholm aeb00823aa
Log reason for DLNA-DMR device becoming unavailable (#57516) 2021-10-15 19:24:04 +02:00
GitHub Action 8c326198cf [ci skip] Translation update 2021-10-14 00:11:41 +00:00
GitHub Action d55a7e5cc7 [ci skip] Translation update 2021-10-09 00:11:46 +00:00
Steven Looman ba83433c64
Fix multiple upnp/ssdp issues (#57314) 2021-10-08 08:57:49 -07:00
GitHub Action 01d883d7c9 [ci skip] Translation update 2021-10-08 00:13:12 +00:00
Michael Chisholm 667e730946
Improve dlna_dmr code quality (#56886)
* Listen for config updates from DlnaDmrEntity.async_added_to_hass

Use `Entity.async_on_remove` for dealing with callback cancellation,
instead of re-inventing the wheel with `_remove_ssdp_callbacks`.

* Use async_write_ha_state within async methods

* Import YAML config from async_setup_platform

* Import flow prompts user when device is uncontactable during migration

When config flow is able to contact a device, or when it has information
from SSDP, it will create config entries without error. If the device is
uncontactable at this point then it will appear as unavailable in HA
until it is turned on again.

When import flow cannot migrate an entry because it needs to contact the
device and can't, it will notify the user with a config flow form.

* Don't del unused parameters, HA pylint doesn't care

* Remove unused imports from tests

* Abort config flow at earliest opportunity

* Return async_abort instead of raising AbortFlow

* Consolidate config entry test cleanup into a single function

* fixup! Consolidate config entry test cleanup into a single function

Revert "Consolidate config entry test cleanup into a single function"

This reverts commit 8220da7263.

* Check resource acquisition/release in specific tests

* fixup! Check resource acquisition/release in specific tests

* Remove unused network dependency from manifest

* _on_event runs in async context

* Call async_write_ha_state directly (not via shedule_update)

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 22:14:00 +02:00
GitHub Action 8fea54fff7 [ci skip] Translation update 2021-10-07 00:10:57 +00:00
Steven Looman 41d2f03b2f
Bump async-upnp-client to 0.22.5 (#56989) 2021-10-03 07:28:41 -10:00
Michael Chisholm 64d4e8537f
Disable discovery for dlna_dmr until it is more selective (#56950) 2021-10-03 09:09:30 -06:00
GitHub Action 06602e6cc5 [ci skip] Translation update 2021-10-03 00:13:50 +00:00
GitHub Action f42c2f5170 [ci skip] Translation update 2021-10-02 12:59:05 +00:00
Michael Chisholm f7d95588f8
Provide most media metadata in DlnaDmrEntity (#56728)
Co-authored-by: Steven Looman <steven.looman@gmail.com>
2021-09-28 19:37:23 -05:00
Michael Chisholm a28fd7d61b
Config-flow for DLNA-DMR integration (#55267)
* Modernize dlna_dmr component: configflow, test, types

* Support config-flow with ssdp discovery
* Add unit tests
* Enforce strict typing
* Gracefully handle network devices (dis)appearing

* Fix Aiohttp mock response headers type to match actual response class

* Fixes from code review

* Fixes from code review

* Import device config in flow if unavailable at hass start

* Support SSDP advertisements

* Ignore bad BOOTID, fix ssdp:byebye handling

* Only listen for events on interface connected to device

* Release all listeners when entities are removed

* Warn about deprecated dlna_dmr configuration

* Use sublogger for dlna_dmr.config_flow for easier filtering

* Tests for dlna_dmr.data module

* Rewrite DMR tests for HA style

* Fix DMR strings: "Digital Media *Renderer*"

* Update DMR entity state and device info when changed

* Replace deprecated async_upnp_client State with TransportState

* supported_features are dynamic, based on current device state

* Cleanup fully when subscription fails

* Log warnings when device connection fails unexpectedly

* Set PARALLEL_UPDATES to unlimited

* Fix spelling

* Fixes from code review

* Simplify has & can checks to just can, which includes has

* Treat transitioning state as playing (not idle) to reduce UI jerking

* Test if device is usable

* Handle ssdp:update messages properly

* Fix _remove_ssdp_callbacks being shared by all DlnaDmrEntity instances

* Fix tests for transitioning state

* Mock DmrDevice.is_profile_device (added to support embedded devices)

* Use ST & NT SSDP headers to find DMR devices, not deviceType

The deviceType is extracted from the device's description XML, and will not
be what we want when dealing with embedded devices.

* Use UDN from SSDP headers, not device description, as unique_id

The SSDP headers have the UDN of the embedded device that we're interested
in, whereas the device description (`ATTR_UPNP_UDN`) field will always be
for the root device.

* Fix DMR string English localization

* Test config flow with UDN from SSDP headers

* Bump async-upnp-client==0.22.1, fix flake8 error

* fix test for remapping

* DMR HA Device connections based on root and embedded UDN

* DmrDevice's UpnpDevice is now named profile_device

* Use device type from SSDP headers, not device description

* Mark dlna_dmr constants as Final

* Use embedded device UDN and type for unique ID when connected via URL

* More informative connection error messages

* Also match SSDP messages on NT headers

The NT header is to ssdp:alive messages what ST is to M-SEARCH responses.

* Bump async-upnp-client==0.22.2

* fix merge

* Bump async-upnp-client==0.22.3

Co-authored-by: Steven Looman <steven.looman@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-27 15:47:01 -05:00
J. Nick Koston 26e031984b
Ensure sonos always gets ssdp callbacks from searches (#56591) 2021-09-26 17:16:03 -05:00
Steven Looman 73260c5b88
Move parts of ssdp to async_upnp_client (#55540)
* Move parts of ssdp to async_upnp_client

* Fix test for environments with multiple sources

* Fix sonos tests

* More fixes/changes

* More fixes

* Use async_upnp_client==0.21.0

* Pylint/test fixes

* More changes after review

* Fix tests

* Improve testing

* Fix mypy

* Fix yamaha_musiccast tests?

* Changes after review

* Pylint

* Reduce calls to combined_headers

* Update to async_upnp_client==0.21.1

* Update to async_upnp_client==0.21.2

* use as_dict

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-11 13:38:16 -10:00
J. Nick Koston 62015f5495
Bump async-upnp-client to 0.20.0, adapt to breaking changes (#54782) 2021-08-18 12:13:59 +02:00
Steven Looman 2c1728022d
Use ssdp callbacks in upnp (#53840) 2021-08-13 11:13:25 -05:00
Simone Chemelli 75f7d3d696
Replace util.get_local_ip in favor of components.network.async_get_source_ip() - part 1 (#52980) 2021-07-22 08:12:33 -10:00
Steven Looman 34b1ab5f5c
Upgrade to async-upnp-client==0.19.1 (#53288) 2021-07-21 14:29:27 -07:00
Steven Looman a127131c1b
Upgrade async_upnp_client to 0.19.0 (#52019) 2021-06-20 18:17:39 +02: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
Steven Looman e284a14ccd
Upgrade async_upnp_client to 0.17.0 (#50371) 2021-05-09 17:06:47 -05:00
J. Nick Koston 9689e06d3c
Bump async-upnp-client to 0.16.2 (#49671) 2021-04-25 10:32:39 -10:00