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())
Tests
python -m pytest
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.22.tar.gz
(10.1 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
xcomfort-0.0.22-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file xcomfort-0.0.22.tar.gz.
File metadata
- Download URL: xcomfort-0.0.22.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
478d02714c8b371e7a4eb5afa79f3f278ef7bf15622ea23636aab5b69e495396
|
|
| MD5 |
8725acd7ee607e43866de91ca1a5741d
|
|
| BLAKE2b-256 |
d3d905a5cc1d28e2ed9726236631c66f3e095ab224f8eb0f6f3a05d9c8c62213
|
File details
Details for the file xcomfort-0.0.22-py3-none-any.whl.
File metadata
- Download URL: xcomfort-0.0.22-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d24eb7518a75cb4ef6749d694e18a882d7670242b078e74b8d69107e14fbeada
|
|
| MD5 |
909754a3905852c97d6bb8792055dffb
|
|
| BLAKE2b-256 |
743bbb9cd7021b3c65cc0b534e592be2d7c8c164d68c94a7b03bbc3776c75cff
|