Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver and device discovery #70

Open
sde1000 opened this issue May 9, 2020 · 3 comments
Open

Driver and device discovery #70

sde1000 opened this issue May 9, 2020 · 3 comments

Comments

@sde1000
Copy link
Owner

sde1000 commented May 9, 2020

The collection of device drivers isn't really "plug-and-play" at the moment. All the example code imports the author's favourite driver and needs to be edited before being run to work with the others. This has caused problems for people picking up the library for the first time (eg. #42, #44) and in any case is a bit tedious!

We need some kind of driver registry and device discovery module, so that simple scripts that just work with a single DALI device can call to get a suitable driver with the API they need. Where multiple devices are present, or the device being used isn't automatically discoverable, the device to use could be specified by environment variable or on the command line. More complex code that works with multiple devices at once also needs a way of naming devices (eg. in its config file or on the command line), so we need a way to go from a string description of a driver/device to a driver instance.

@ferdinandkeil
Copy link
Contributor

By device you mean the DALI interface?

@sde1000
Copy link
Owner Author

sde1000 commented May 11, 2020

Sorry, yes, that's unclear! Yes, I mean the interface between whatever the code making use of python-dali is running on, and the physical DALI bus.

@ferdinandkeil
Copy link
Contributor

I think this should be solved by streamlining the driver API. At least for me, most of the confusion came from the huge differences in how the drivers are implemented.
Also, this sounds to me like you plan to come up with a general CLI for python-dali and that would probably better off as its own project.

@sde1000 sde1000 mentioned this issue Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants