コード例 #1
0
def discover(handshake):
    """Search for robots in the network."""
    if handshake:
        MiIOProtocol.discover()
    else:
        miio.Discovery.discover_mdns()
コード例 #2
0
ファイル: finder.py プロジェクト: gittubbs/giuliot
from miio.miioprotocol import MiIOProtocol
import logging
#from miio.vacuum_cli
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)

MiIOProtocol.discover()
コード例 #3
0
ファイル: ceil_cli.py プロジェクト: hkder/kictech_iot_src
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)