Skip to main content

Python library for Sunricher DALI Gateway (EDA)

Project description

PySrDaliGateway

License

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 network
  • connection - Connect to discovered gateway
  • version - Get gateway firmware version
  • devices - Discover connected DALI devices
  • readdev - Read device status via MQTT
  • callbacks - Test device status callbacks (light, motion, illuminance, panel)
  • devparam - Get device parameters
  • groups - Discover DALI groups
  • readgroup - Read group details with device list
  • scenes - Discover DALI scenes
  • readscene - Read scene details with device list and property values
  • restart - Restart gateway (WARNING: gateway will disconnect)
  • reconnection - Test disconnect/reconnect cycle

Project details


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.13.1.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysrdaligateway-0.13.1-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file pysrdaligateway-0.13.1.tar.gz.

File metadata

  • Download URL: pysrdaligateway-0.13.1.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for pysrdaligateway-0.13.1.tar.gz
Algorithm Hash digest
SHA256 1277e56d74a53b5d43fde25febeb3bee2b51dd07983513f5dad82c9880e9574b
MD5 be077a97ca42498d3cf80cf6bb07272d
BLAKE2b-256 53001b8eb9d200b01f88c46e22cf0e52ab1414d64cb98924d31171a018a3a436

See more details on using hashes here.

File details

Details for the file pysrdaligateway-0.13.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pysrdaligateway-0.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f94c6c7de2e6c217203f7b5e2384a2576cd227636261e86fc5734e6947ff2afd
MD5 6676e9d999d9b3d381434ecd455c2b6e
BLAKE2b-256 017e688f9bbe2cde47b9940b2ad6deb975fbcb650ef2cf73c20c40c9c3191e2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page