def discover(handshake): """Search for robots in the network.""" if handshake: MiIOProtocol.discover() else: miio.Discovery.discover_mdns()
from miio.miioprotocol import MiIOProtocol import logging #from miio.vacuum_cli logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) MiIOProtocol.discover()
def discover(): """Search for plugs in the network.""" MiIOProtocol.discover()
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)