Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.ssdp.Scanner Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, IntegrationMatchers integration_matchers)
 
list[SsdpServiceInfoasync_get_discovery_info_by_st (self, str st)
 
list[SsdpServiceInfoasync_get_discovery_info_by_udn (self, str udn)
 
SsdpServiceInfo|None async_get_discovery_info_by_udn_st (self, str udn, str st)
 
Callable[[], None] async_register_callback (self, SsdpHassJobCallback callback, dict[str, str]|None match_dict=None)
 
None async_scan (self, *Any _)
 
None async_scan_broadcast (self, *Any _)
 
None async_scan_multicast (self, *Any _)
 
None async_start (self)
 
None async_stop (self, *Any _)
 

Public Attributes

 hass
 
 integration_matchers
 

Private Member Functions

None _async_dismiss_discoveries (self, SsdpServiceInfo byebye_discovery_info)
 
Mapping[str, str] _async_get_description_dict (self, str|None location)
 
list[SsdpHassJobCallback_async_get_matching_callbacks (self, CaseInsensitiveDict combined_headers)
 
SsdpServiceInfo _async_headers_to_discovery_info (self, SsdpDevice ssdp_device, CaseInsensitiveDict headers)
 
None _async_start_ssdp_listeners (self)
 
None _async_stop_ssdp_listeners (self)
 
None _handle_config_entry_removed (self, config_entries.ConfigEntry entry)
 
list[SsdpDevice] _ssdp_devices (self)
 
None _ssdp_listener_callback (self, SsdpDevice ssdp_device, DeviceOrServiceType dst, SsdpSource source)
 
None _ssdp_listener_process_callback (self, SsdpDevice ssdp_device, DeviceOrServiceType dst, SsdpSource source, Mapping[str, Any] info_desc, bool skip_callbacks=False)
 
None _ssdp_listener_process_callback_with_lookup (self, SsdpDevice ssdp_device, DeviceOrServiceType dst, SsdpSource source)
 

Private Attributes

 _cancel_scan
 
 _description_cache
 
 _device_tracker
 

Detailed Description

Class to manage SSDP searching and SSDP advertisements.

Definition at line 297 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.ssdp.Scanner.__init__ (   self,
HomeAssistant  hass,
IntegrationMatchers   integration_matchers 
)
Initialize class.

Definition at line 300 of file __init__.py.

Member Function Documentation

◆ _async_dismiss_discoveries()

None homeassistant.components.ssdp.Scanner._async_dismiss_discoveries (   self,
SsdpServiceInfo   byebye_discovery_info 
)
private
Dismiss all discoveries for the given address.

Definition at line 564 of file __init__.py.

◆ _async_get_description_dict()

Mapping[str, str] homeassistant.components.ssdp.Scanner._async_get_description_dict (   self,
str | None   location 
)
private
Get description dict.

Definition at line 577 of file __init__.py.

◆ _async_get_matching_callbacks()

list[SsdpHassJobCallback] homeassistant.components.ssdp.Scanner._async_get_matching_callbacks (   self,
CaseInsensitiveDict  combined_headers 
)
private
Return a list of callbacks that match.

Definition at line 451 of file __init__.py.

◆ _async_headers_to_discovery_info()

SsdpServiceInfo homeassistant.components.ssdp.Scanner._async_headers_to_discovery_info (   self,
SsdpDevice  ssdp_device,
CaseInsensitiveDict   headers 
)
private
Combine the headers and description into discovery_info.

Building this is a bit expensive so we only do it on demand.

Definition at line 590 of file __init__.py.

◆ _async_start_ssdp_listeners()

None homeassistant.components.ssdp.Scanner._async_start_ssdp_listeners (   self)
private
Start the SSDP Listeners.

Definition at line 407 of file __init__.py.

◆ _async_stop_ssdp_listeners()

None homeassistant.components.ssdp.Scanner._async_stop_ssdp_listeners (   self)
private
Stop the SSDP listeners.

Definition at line 356 of file __init__.py.

◆ _handle_config_entry_removed()

None homeassistant.components.ssdp.Scanner._handle_config_entry_removed (   self,
config_entries.ConfigEntry  entry 
)
private
Handle config entry changes.

Definition at line 633 of file __init__.py.

◆ _ssdp_devices()

list[SsdpDevice] homeassistant.components.ssdp.Scanner._ssdp_devices (   self)
private
Get all seen devices.

Definition at line 313 of file __init__.py.

◆ _ssdp_listener_callback()

None homeassistant.components.ssdp.Scanner._ssdp_listener_callback (   self,
SsdpDevice  ssdp_device,
DeviceOrServiceType  dst,
SsdpSource  source 
)
private
Handle a device/service change.

Definition at line 462 of file __init__.py.

◆ _ssdp_listener_process_callback()

None homeassistant.components.ssdp.Scanner._ssdp_listener_process_callback (   self,
SsdpDevice  ssdp_device,
DeviceOrServiceType  dst,
SsdpSource  source,
Mapping[str, Any]  info_desc,
bool   skip_callbacks = False 
)
private
Handle a device/service change.

Definition at line 506 of file __init__.py.

◆ _ssdp_listener_process_callback_with_lookup()

None homeassistant.components.ssdp.Scanner._ssdp_listener_process_callback_with_lookup (   self,
SsdpDevice  ssdp_device,
DeviceOrServiceType  dst,
SsdpSource  source 
)
private
Handle a device/service change.

Definition at line 491 of file __init__.py.

◆ async_get_discovery_info_by_st()

list[SsdpServiceInfo] homeassistant.components.ssdp.Scanner.async_get_discovery_info_by_st (   self,
str  st 
)
Return matching discovery_infos for a st.

Definition at line 615 of file __init__.py.

◆ async_get_discovery_info_by_udn()

list[SsdpServiceInfo] homeassistant.components.ssdp.Scanner.async_get_discovery_info_by_udn (   self,
str  udn 
)
Return matching discovery_infos for a udn.

Definition at line 623 of file __init__.py.

◆ async_get_discovery_info_by_udn_st()

SsdpServiceInfo | None homeassistant.components.ssdp.Scanner.async_get_discovery_info_by_udn_st (   self,
str  udn,
str   st 
)
Return discovery_info for a udn and st.

Definition at line 603 of file __init__.py.

◆ async_register_callback()

Callable[[], None] homeassistant.components.ssdp.Scanner.async_register_callback (   self,
SsdpHassJobCallback  callback,
dict[str, str] | None   match_dict = None 
)
Register a callback.

Definition at line 317 of file __init__.py.

◆ async_scan()

None homeassistant.components.ssdp.Scanner.async_scan (   self,
*Any  _ 
)
Scan for new entries using ssdp listeners.

Definition at line 366 of file __init__.py.

◆ async_scan_broadcast()

None homeassistant.components.ssdp.Scanner.async_scan_broadcast (   self,
*Any  _ 
)
Scan for new entries using broadcast target.

Definition at line 376 of file __init__.py.

◆ async_scan_multicast()

None homeassistant.components.ssdp.Scanner.async_scan_multicast (   self,
*Any  _ 
)
Scan for new entries using multicase target.

Definition at line 371 of file __init__.py.

◆ async_start()

None homeassistant.components.ssdp.Scanner.async_start (   self)
Start the scanners.

Definition at line 385 of file __init__.py.

◆ async_stop()

None homeassistant.components.ssdp.Scanner.async_stop (   self,
*Any  _ 
)
Stop the scanner.

Definition at line 349 of file __init__.py.

Member Data Documentation

◆ _cancel_scan

homeassistant.components.ssdp.Scanner._cancel_scan
private

Definition at line 394 of file __init__.py.

◆ _description_cache

homeassistant.components.ssdp.Scanner._description_cache
private

Definition at line 389 of file __init__.py.

◆ _device_tracker

homeassistant.components.ssdp.Scanner._device_tracker
private

Definition at line 307 of file __init__.py.

◆ hass

homeassistant.components.ssdp.Scanner.hass

Definition at line 304 of file __init__.py.

◆ integration_matchers

homeassistant.components.ssdp.Scanner.integration_matchers

Definition at line 310 of file __init__.py.


The documentation for this class was generated from the following file: