Python library for Sunricher DALI Gateway (EDA)
Project description
PySrDaliGateway
Python library for Sunricher DALI Gateway (EDA) integration with Home Assistant.
Features
- Async/await support for non-blocking operations
- Device discovery and control (lights, sensors, panels)
- Group and scene management
- Real-time status updates via MQTT
- Energy monitoring support
- Full Type Support: Complete type hints for mypy, Pylance, and pyright
- IDE integration with auto-completion and error checking
Installation
pip install PySrDaliGateway
Device Types Supported
- Lighting: Dimmer, CCT, RGB, RGBW, RGBWA
- Sensors: Motion, Illuminance
- Panels: 2-Key, 4-Key, 6-Key, 8-Key
Requirements
- Python 3.8+
- paho-mqtt>=1.6.0
CLI Testing Tool
Testing script located at script/test_discovery_to_connect.py for hardware validation:
# Run all tests
python script/test_discovery_to_connect.py
# Run specific tests
python script/test_discovery_to_connect.py --tests discovery connection devices
# List available tests
python script/test_discovery_to_connect.py --list-tests
# Test device callbacks specifically
python script/test_discovery_to_connect.py --tests callbacks
# Test with specific gateway
python script/test_discovery_to_connect.py --gateway-sn "YOUR_GATEWAY_SN"
# Limit device operations for faster testing
python script/test_discovery_to_connect.py --device-limit 5
# Testing mode (skip discovery) - when you know gateway parameters
python script/test_discovery_to_connect.py \
--direct-sn GW123456 \
--direct-ip 192.168.1.100 \
--direct-username admin \
--direct-passwd password123
Available tests:
discovery- Discover DALI gateways on networkconnection- Connect to discovered gatewayversion- Get gateway firmware versiondevices- Discover connected DALI devicesreaddev- Read device status via MQTTcallbacks- Test device status callbacks (light, motion, illuminance, panel)devparam- Get device parametersgroups- Discover DALI groupsreadgroup- Read group details with device listscenes- Discover DALI scenesreadscene- Read scene details with device list and property valuesrestart- Restart gateway (WARNING: gateway will disconnect)reconnection- Test disconnect/reconnect cycle
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
pysrdaligateway-0.20.1.tar.gz
(37.3 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 pysrdaligateway-0.20.1.tar.gz.
File metadata
- Download URL: pysrdaligateway-0.20.1.tar.gz
- Upload date:
- Size: 37.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da4b8b684391af3e20091997bcb2e439868b2f065b15c4db8c0755bf121279a1
|
|
| MD5 |
36ce7af07245998471310d8354e66b91
|
|
| BLAKE2b-256 |
e31c5f2cd63485adf40d491a3dcb6e56ccc804c3c5c30f1e28f6f23cd103e272
|
File details
Details for the file pysrdaligateway-0.20.1-py3-none-any.whl.
File metadata
- Download URL: pysrdaligateway-0.20.1-py3-none-any.whl
- Upload date:
- Size: 39.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eb4cf0cbf869c3b94cdb6ae094a4ac9f3190ff7ba797cd12e3eb188ed45fe79
|
|
| MD5 |
debc9bf89fa4fcfa38c703dd27215dcd
|
|
| BLAKE2b-256 |
5592df7ce1e7ce1cdbec2804077de6d2aef28d7b1c598d7e28704c3f8a9090e3
|