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
- Use Python 3.11+
python -m venv venvsource venv/bin/activatepip install -r requirements.txtpip install -r requirements_test.txt
Checks
pylint pydeakopycodestyle pydeakopytest pydeako
License
MIT License, see LICENSE.txt
Project status
Actively maintained by Deako.
Project details
Release history Release notifications | RSS feed
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.6.0.tar.gz
(17.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pydeako-0.6.0-py3-none-any.whl
(23.7 kB
view details)
File details
Details for the file pydeako-0.6.0.tar.gz.
File metadata
- Download URL: pydeako-0.6.0.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0db5452d7bc3c94530309195586e6c72e1f928df9e743dde6041ebbef9ab04f
|
|
| MD5 |
7c1ff4abe5ddce1ddbdae1f5c0d8ebef
|
|
| BLAKE2b-256 |
b0d6873941199f49ac010bd77183103d7d689b497cea4be3386b45632cf40bc6
|
File details
Details for the file pydeako-0.6.0-py3-none-any.whl.
File metadata
- Download URL: pydeako-0.6.0-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bebea28f1aa790d02a6a6bfc53fb120c9a0cb56398a1b4c4a5e8135ee1c35def
|
|
| MD5 |
f8d5b810d67f6984742087733247f5c9
|
|
| BLAKE2b-256 |
f2c6b6799b5c6b5f71ad12e57b48239c80f810d86db69ffd5c87af87e2b5a613
|