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 venv
source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements_test.txt
Checks
pylint pydeako
pycodestyle pydeako
pytest 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.5.1.tar.gz
(17.0 kB
view details)
Built Distribution
pydeako-0.5.1-py3-none-any.whl
(22.8 kB
view details)
File details
Details for the file pydeako-0.5.1.tar.gz
.
File metadata
- Download URL: pydeako-0.5.1.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67788aed3d8b15b0e52409b608be4d15bd51ab97724727995c447a6102fc326a |
|
MD5 | 1a0798fa489f73ea38da097ce87634a4 |
|
BLAKE2b-256 | ec3d64eab3290ab83d48b2252bf3d8d327cf5598af51fdf802794ca1e5aa1fc3 |
File details
Details for the file pydeako-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: pydeako-0.5.1-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e6df1fc1d6d503a4882bd38825e327834fa5cabb79673b81f91877059a974aa |
|
MD5 | d621960d146cd1ca2cd649e01ae9c7b2 |
|
BLAKE2b-256 | 0142d0c2723409cf6372670911ce5b0710d4a809f808695a471fb9789145e8a7 |