示例#1
0
async def show_status(s_session, host, ssl, username, password):  # pylint: disable=invalid-name
    """Show status."""

    api = pynrf905api.nRF905API(session=s_session,
                                host=host,
                                ssl=ssl,
                                username=username,
                                password=password)

    await api.get_status()

    print(json.dumps(api.result, indent=1))
示例#2
0
async def set_speed(s_session, host, ssl, username, password, txaddr, payload):  # pylint: disable=invalid-name
    """Show status."""

    api = pynrf905api.nRF905API(session=s_session,
                                host=host,
                                ssl=ssl,
                                username=username,
                                password=password)

    await api.send(txaddr, payload)

    print(json.dumps(api.result, indent=1))
示例#3
0
async def queryDevice(session, host, ssl, username, password):  # pylint: disable=invalid-name
    """Show status."""

    api = pynrf905api.nRF905API(session=session,
                                host=host,
                                ssl=ssl,
                                username=username,
                                password=password)

    await api.fan_querydevice()

    print(json.dumps(api.result, indent=1))
示例#4
0
async def fan_config(s_session, host, ssl, username, password, model, network,
                     main_unit_id, device_id):  # pylint: disable=invalid-name
    """Show status."""

    api = pynrf905api.nRF905API(session=s_session,
                                host=host,
                                ssl=ssl,
                                username=username,
                                password=password,
                                model=model,
                                network=network,
                                main_unit_id=main_unit_id,
                                device_id=device_id)

    await api.fan_config()

    print(json.dumps(api.result, indent=1))