A Python library to communicate with Dali controllers from Ministry of Light.
Project description
python-ml-dali
A Python library to communicate with Dali controllers from Ministry of Light
Description
This python libarary can be used to communicate with ML (Ministry of Light) Dali relais on a DALI bus, using the ML DALI USB controller.
Documentation
QuickStart
import asyncio
from mldali import MLDaliLight
async def turnOnOff(address):
light_fixture = MLDaliLight(address)
await asyncio.sleep(1)
await light_fixture.turn_on()
await asyncio.sleep(3)
await light_fixture.turn_off()
async def turnOnOffDelayed(address):
await asyncio.sleep(2)
light_fixture = MLDaliLight(address)
await asyncio.sleep(1)
await light_fixture.turn_on()
await asyncio.sleep(1)
await light_fixture.turn_off()
async def main():
await asyncio.gather(turnOnOff(12), turnOnOffDelayed(13), asyncio.sleep(20))
loop = asyncio.get_event_loop()
loop.run_until_complete(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
python-ml-dali-0.0.15.tar.gz
(16.2 kB
view hashes)
Built Distribution
Close
Hashes for python_ml_dali-0.0.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcdcbd4ff046dfd1f8789f31e2e04e008d114976fdf07a2e07b76b633204fb8f |
|
MD5 | 4138eccae65b900e7cc7ab4aa2c20dda |
|
BLAKE2b-256 | 38b27b660892b3c9508d4015c994c07a503c7fefccc1f800ab1640ff5ebe2f9f |