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.19.tar.gz
(9.0 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.19.tar.gz.
File metadata
- Download URL: xcomfort-0.0.19.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd3ecdaae6a8ca4cb0a146e1a6926304dc1ebbc7ff573ab8f5ff06712c4360ed
|
|
| MD5 |
f959994865706309a7ebd9afb4cb7e92
|
|
| BLAKE2b-256 |
1737a58343c2f1fabdc1ab145be5e164e09b94c05de7d6f0b581863adafeb1e3
|
File details
Details for the file xcomfort-0.0.19-py3-none-any.whl.
File metadata
- Download URL: xcomfort-0.0.19-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adc190c7558317155315281c0a1d72aa3a1488b7ee29f1e545accca43e3688f8
|
|
| MD5 |
f458eb27c1eb8b660ac4738367be68a5
|
|
| BLAKE2b-256 |
2ec60b14f3b1a3b8846c77002425a98ef2ece6a7a36702cef5b39cd17bb8ae86
|