mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-23 03:33:35 +00:00
Add a note about using the discovery target parameter (#168)
* Update discover.py Updated discovery documentation for multiple interfaces explanation * revise Co-authored-by: Teemu R <tpr@iki.fi>
This commit is contained in:
parent
016d030245
commit
7565d03c8e
@ -152,13 +152,14 @@ class Discover:
|
|||||||
Sends discovery message to 255.255.255.255:9999 in order
|
Sends discovery message to 255.255.255.255:9999 in order
|
||||||
to detect available supported devices in the local network,
|
to detect available supported devices in the local network,
|
||||||
and waits for given timeout for answers from devices.
|
and waits for given timeout for answers from devices.
|
||||||
|
If you have multiple interfaces, you can use target parameter to specify the network for discovery.
|
||||||
|
|
||||||
If given, `on_discovered` coroutine will get passed with the :class:`SmartDevice`-derived object as parameter.
|
If given, `on_discovered` coroutine will get passed with the :class:`SmartDevice`-derived object as parameter.
|
||||||
|
|
||||||
The results of the discovery are returned either as a list of :class:`SmartDevice`-derived objects
|
The results of the discovery are returned either as a list of :class:`SmartDevice`-derived objects
|
||||||
or as raw response dictionaries objects (if `return_raw` is True).
|
or as raw response dictionaries objects (if `return_raw` is True).
|
||||||
|
|
||||||
:param target: The target broadcast address (e.g. 192.168.xxx.255).
|
:param target: The target address where to send the broadcast discovery queries if multi-homing (e.g. 192.168.xxx.255).
|
||||||
:param on_discovered: coroutine to execute on discovery
|
:param on_discovered: coroutine to execute on discovery
|
||||||
:param timeout: How long to wait for responses, defaults to 5
|
:param timeout: How long to wait for responses, defaults to 5
|
||||||
:param discovery_packets: Number of discovery packets are broadcasted.
|
:param discovery_packets: Number of discovery packets are broadcasted.
|
||||||
|
Loading…
Reference in New Issue
Block a user