Skip to main content

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


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)

Uploaded Source

Built Distribution

python_ml_dali-0.0.15-py3-none-any.whl (17.6 kB view hashes)

Uploaded Python 3

Supported by

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