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.5.4.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydeako-0.5.4.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for pydeako-0.5.4.tar.gz
Algorithm Hash digest
SHA256 70943fa3921cf9c274ae434b095b81cf766c0f11da692477ca65a04b9ba35511
MD5 0f0380a9f2fe461c60c5e9fd4c8fc901
BLAKE2b-256 32ab0e8e9b621cc2bc51dc7033dc44ab76e3d02ca928f8dde3bf92399c84b0e2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pydeako-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a902ec2ebd66038e3e3dc5ecb95d62713b1ccbfd54d3c322b2be0af847821065
MD5 6b50df9d68b8542029ca8d45aff6f22d
BLAKE2b-256 8e83a3212942c3b718132f1afa84d510db3a95240f07e960ab1901e38c525d75

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