Integration with Eaton xComfort Bridge
Project description
xcomfort-python
Unofficial python package for communicating with Eaton xComfort Bridge
Usage
import asyncio
from xcomfort import Bridge
def observe_device(device):
device.state.subscribe(lambda state: print(f"Device state [{device.device_id}] '{device.name}': {state}"))
async def main():
bridge = Bridge(<ip_address>, <auth_key>)
runTask = asyncio.create_task(bridge.run())
devices = await bridge.get_devices()
for device in devices.values():
observe_device(device)
# Wait 50 seconds. Try flipping the light switch manually while you wait
await asyncio.sleep(50)
# Turn off all the lights.
# for device in devices.values():
# await device.switch(False)
#
# await asyncio.sleep(5)
await bridge.close()
await runTask
asyncio.run(main())
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
xcomfort-0.0.14.tar.gz
(6.5 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
File details
Details for the file xcomfort-0.0.14.tar.gz.
File metadata
- Download URL: xcomfort-0.0.14.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e4e7e8c48108910a5494c0e5e470887b511ae69ecc700a78e07db73317939d7
|
|
| MD5 |
1807b00f02f2829a59bdb0376bc6e0f0
|
|
| BLAKE2b-256 |
91158547dbb58b31a38ded96e5a321fb5046c61d5e45d2b7fb6c6acae79ae8a1
|
File details
Details for the file xcomfort-0.0.14-py3-none-any.whl.
File metadata
- Download URL: xcomfort-0.0.14-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3854c6665399325b2c6cbb93984e2d04f73161dbfd1110ba0dd7833321344a59
|
|
| MD5 |
cacc91e3aa41c5756275bdc8c9f2df2b
|
|
| BLAKE2b-256 |
6d626abd758b5da8454f1b1eec207ae1f01d00bfdb1bc3c68d047159903105c9
|