Skip to main content

Connect and interact with deako devices over the network locally

Project description

pydeako

Description

pydeako is a Python library for discovering, connecting to, and interacting with Deako smart devices on the local network.

Installation

pip install pydeako

Usage

pydeako mdns discovery client

import asyncio
from pydeako import discover

async def _discover():
    d = discover.DeakoDiscoverer()
    try:
        address = await d.get_address()
        print(f"Found deako device at {address}!")
    except discover.DevicesNotFoundException:
        print("No devices found!")
        pass

if __name__ == "__main__":
    asyncio.run(_discover())

pydeako socket client

import asyncio
from pydeako import deako, discover

async def _discover():
    client_name = "MyClient"
    d = discover.DeakoDiscoverer()
    deako_client = deako.Deako(d.get_address, client_name=client_name)

    await deako_client.connect()
    await deako_client.find_devices()

    devices = deako_client.get_devices()

    # turn on all devices
    for uuid in devices:
        await deako_client.control_device(uuid, True)

if __name__ == "__main__":
    asyncio.run(_discover())

Contributing

Dev environment setup

  1. Use Python 3.11+
  2. python -m venv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt
  5. pip install -r requirements_test.txt

Checks

  1. pylint pydeako
  2. pycodestyle pydeako
  3. pytest pydeako

License

MIT License, see LICENSE.txt

Project status

Actively maintained by Deako.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydeako-0.3.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

pydeako-0.3.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file pydeako-0.3.1.tar.gz.

File metadata

  • Download URL: pydeako-0.3.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pydeako-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2b35c926d7cd2e824c71521284098d6d032de7ab41b95602e552d49bac64a5f0
MD5 adb8ade077a03da8c412450b68c7f015
BLAKE2b-256 d187627c7d69d05f56aa1b0ca91afc70ce6bf914c119a22a59bc44a3cffb1c92

See more details on using hashes here.

File details

Details for the file pydeako-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pydeako-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pydeako-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2e7ded9ba66e2b6380eb32c2d5e42e1ae833f8d66f474e322a2a6f7bdb73d2
MD5 4d7f26544b2585febabb15785ae11399
BLAKE2b-256 b38c0c6ba50422bc6d19a8767754813bedee017ac56371c2abc2155c1c618b4f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page