hass-core/homeassistant/generated/ssdp.py
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

250 lines
6.4 KiB
Python

"""Automatically generated by hassfest.
To update, run python3 -m script.hassfest
"""
# fmt: off
SSDP = {
"arcam_fmj": [
{
"deviceType": "urn:schemas-upnp-org:device:MediaRenderer:1",
"manufacturer": "ARCAM"
}
],
"axis": [
{
"manufacturer": "AXIS"
}
],
"control4": [
{
"st": "c4:director"
}
],
"deconz": [
{
"manufacturer": "Royal Philips Electronics"
}
],
"denonavr": [
{
"deviceType": "urn:schemas-upnp-org:device:MediaRenderer:1",
"manufacturer": "Denon"
},
{
"deviceType": "urn:schemas-upnp-org:device:MediaRenderer:1",
"manufacturer": "DENON"
},
{
"deviceType": "urn:schemas-upnp-org:device:MediaRenderer:1",
"manufacturer": "DENON PROFESSIONAL"
},
{
"deviceType": "urn:schemas-upnp-org:device:MediaRenderer:1",
"manufacturer": "Marantz"
},
{
"deviceType": "urn:schemas-upnp-org:device:MediaServer:1",
"manufacturer": "Denon"
},
{
"deviceType": "urn:schemas-upnp-org:device:MediaServer:1",
"manufacturer": "DENON"
},
{
"deviceType": "urn:schemas-upnp-org:device:MediaServer:1",
"manufacturer": "DENON PROFESSIONAL"
},
{
"deviceType": "urn:schemas-upnp-org:device:MediaServer:1",
"manufacturer": "Marantz"
},
{
"deviceType": "urn:schemas-denon-com:device:AiosDevice:1",
"manufacturer": "Denon"
},
{
"deviceType": "urn:schemas-denon-com:device:AiosDevice:1",
"manufacturer": "DENON"
},
{
"deviceType": "urn:schemas-denon-com:device:AiosDevice:1",
"manufacturer": "DENON PROFESSIONAL"
},
{
"deviceType": "urn:schemas-denon-com:device:AiosDevice:1",
"manufacturer": "Marantz"
}
],
"directv": [
{
"deviceType": "urn:schemas-upnp-org:device:MediaServer:1",
"manufacturer": "DIRECTV"
}
],
"dlna_dmr": [
{
"st": "urn:schemas-upnp-org:device:MediaRenderer:1"
},
{
"st": "urn:schemas-upnp-org:device:MediaRenderer:2"
},
{
"st": "urn:schemas-upnp-org:device:MediaRenderer:3"
},
{
"nt": "urn:schemas-upnp-org:device:MediaRenderer:1"
},
{
"nt": "urn:schemas-upnp-org:device:MediaRenderer:2"
},
{
"nt": "urn:schemas-upnp-org:device:MediaRenderer:3"
}
],
"fritz": [
{
"st": "urn:schemas-upnp-org:device:fritzbox:1"
}
],
"fritzbox": [
{
"st": "urn:schemas-upnp-org:device:fritzbox:1"
}
],
"harmony": [
{
"deviceType": "urn:myharmony-com:device:harmony:1",
"manufacturer": "Logitech"
}
],
"heos": [
{
"st": "urn:schemas-denon-com:device:ACT-Denon:1"
}
],
"huawei_lte": [
{
"deviceType": "urn:schemas-upnp-org:device:InternetGatewayDevice:1",
"manufacturer": "Huawei"
}
],
"hue": [
{
"manufacturer": "Royal Philips Electronics",
"modelName": "Philips hue bridge 2012"
},
{
"manufacturer": "Royal Philips Electronics",
"modelName": "Philips hue bridge 2015"
},
{
"manufacturer": "Signify",
"modelName": "Philips hue bridge 2015"
}
],
"hyperion": [
{
"manufacturer": "Hyperion Open Source Ambient Lighting",
"st": "urn:hyperion-project.org:device:basic:1"
}
],
"isy994": [
{
"deviceType": "urn:udi-com:device:X_Insteon_Lighting_Device:1",
"manufacturer": "Universal Devices Inc."
}
],
"keenetic_ndms2": [
{
"deviceType": "urn:schemas-upnp-org:device:InternetGatewayDevice:1",
"manufacturer": "Keenetic Ltd."
},
{
"deviceType": "urn:schemas-upnp-org:device:InternetGatewayDevice:1",
"manufacturer": "ZyXEL Communications Corp."
}
],
"konnected": [
{
"manufacturer": "konnected.io"
}
],
"netgear": [
{
"deviceType": "urn:schemas-upnp-org:device:InternetGatewayDevice:1",
"manufacturer": "NETGEAR, Inc."
}
],
"roku": [
{
"deviceType": "urn:roku-com:device:player:1-0",
"manufacturer": "Roku",
"st": "roku:ecp"
}
],
"samsungtv": [
{
"st": "urn:samsung.com:device:RemoteControlReceiver:1"
}
],
"songpal": [
{
"manufacturer": "Sony Corporation",
"st": "urn:schemas-sony-com:service:ScalarWebAPI:1"
}
],
"sonos": [
{
"st": "urn:schemas-upnp-org:device:ZonePlayer:1"
}
],
"syncthru": [
{
"deviceType": "urn:schemas-upnp-org:device:Printer:1",
"manufacturer": "Samsung Electronics"
}
],
"synology_dsm": [
{
"deviceType": "urn:schemas-upnp-org:device:Basic:1",
"manufacturer": "Synology"
}
],
"unifi": [
{
"deviceType": "urn:schemas-upnp-org:device:InternetGatewayDevice:1",
"manufacturer": "Ubiquiti Networks",
"modelDescription": "UniFi Dream Machine"
},
{
"deviceType": "urn:schemas-upnp-org:device:InternetGatewayDevice:1",
"manufacturer": "Ubiquiti Networks",
"modelDescription": "UniFi Dream Machine Pro"
}
],
"upnp": [
{
"st": "urn:schemas-upnp-org:device:InternetGatewayDevice:1"
},
{
"st": "urn:schemas-upnp-org:device:InternetGatewayDevice:2"
}
],
"wemo": [
{
"manufacturer": "Belkin International Inc."
}
],
"wilight": [
{
"manufacturer": "All Automacao Ltda"
}
],
"yamaha_musiccast": [
{
"manufacturer": "Yamaha Corporation"
}
]
}