Пример #1
0
def discover(handshake):
    """Search for robots in the network."""
    if handshake:
        MiIOProtocol.discover()
    else:
        miio.Discovery.discover_mdns()
Пример #2
0
from miio.miioprotocol import MiIOProtocol
import logging
#from miio.vacuum_cli
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)

MiIOProtocol.discover()
Пример #3
0
def discover():
    """Search for plugs in the network."""
    MiIOProtocol.discover()
Пример #4
0
def discover(mdns, handshake, network, timeout):
    """Discover devices using both handshake and mdns methods."""
    if handshake:
        MiIOProtocol.discover(addr=network, timeout=timeout)
    if mdns:
        Discovery.discover_mdns(timeout=timeout)