python-dali icon indicating copy to clipboard operation
python-dali copied to clipboard

Quaddali feature

Open ferdinandkeil opened this issue 5 years ago • 5 comments

This is the driver for my custom DALI interface. The design will be published as open-source.

The DALI to serial conversion is pretty basic, mainly just translating what happens on the DALI line to serial data. Therefore some timing is implemented in the driver. The interface supports listening to a DALI bus as well, but that is not implemented in the driver yet.

I have so far tested the driver on a bus with a single device. I will do some testing with multiple devices and longer cable runs in the future.

ferdinandkeil avatar May 15 '20 11:05 ferdinandkeil

@sde1000 I have added pyserial as a requirement to the setup.py, hoping that this PR will now pass the CI tests. Please let me know if there any other changes I need to make.

ferdinandkeil avatar Jul 09 '20 09:07 ferdinandkeil

There's still an issue with dependencies. You unconditionally import serial in the driver.base module, which means that (for example) someone using the driver-unipi extra and not the driver-quaddali extra would still need to have pyserial installed.

There's still a fair bit of work to be done tidying up driver interfaces, as discussed in #69 and #70. It might be best to merge this now and sort it out later as part of doing that work. I wonder what @rnixx thinks?

sde1000 avatar Jul 09 '20 09:07 sde1000

There's still an issue with dependencies. You unconditionally import serial in the driver.base module, which means that (for example) someone using the driver-unipi extra and not the driver-quaddali extra would still need to have pyserial installed.

It was my understanding that it would be down to the user to check for the requirements before importing a driver. From the top of my head I can't think of an elegant way of conditionally importing serial while also letting the user know that the driver will now be available. If you have any ideas please let me know.

Would the CI test pass now? Or do I need to change the Travis configuration as well?

There's still a fair bit of work to be done tidying up driver interfaces, as discussed in #69 and #70. It might be best to merge this now and sort it out later as part of doing that work. I wonder what @rnixx thinks?

As said in #70, I'd suggest starting work on a command line tool that builds on top of python-dali as a reference implementation. Maybe I'll find time to dabble with this later this year.

ferdinandkeil avatar Jul 09 '20 09:07 ferdinandkeil

The CI test does pass now, because it ignores extras and drivers.

sde1000 avatar Jul 09 '20 09:07 sde1000

It might be best to merge this now and sort it out later as part of doing that work.

I think extra requirements and conditional imports should be fixed before merging as this are low hanging fruits. @ferdinandkeil don't hesitate if you need help.

rnixx avatar Jul 14 '20 07:07 rnixx