sde1000 / python-dali

Library for controlling DALI lighting systems
Other
150 stars 73 forks source link

New hasseb firmware, drivers, and graphical user interface #60

Closed hasseb closed 4 years ago

sde1000 commented 4 years ago

Thank you for all your work on this! The new firmware is a huge, huge improvement over the original firmware.

I have to choose which parts of this pull request to accept into the project — and before I can do that, I need to clear up what this project is all about, because I have never really been explicit about it before now.

I wrote python-dali so that people could make use of DALI hardware without having to possess a copy of IEC-62386. When I found myself in possession of a building with DALI lighting, it is the library that I searched for and could not find. I made use of the resources I could find — in particular, daliserver enabled me to make use of interface hardware I was able to buy at the time — but eventually I became frustrated, bought copies of some of the parts of IEC-62386, and tried to do a proper job.

python-dali is intended as a reference, and as a base for other projects. It's not intended to be an application in and of itself. I want it to have the smallest number of dependencies possible, so that it can be applied in the broadest variety of applications. So, from this pull request:

I don't intend to pull the GUI code. I think it deserves to be its own separate project, which can have python-dali as a dependency.

hasseb commented 4 years ago

Hi,

Thank you for your message. I understand that you don't want to merge the graphical user interface to your project. I will fix the issues from the pull request review. Maybe I will then close the pull request and make a new fork including only the wanted modifications. Maybe I can also contribute straight to your project.

There were only few modifications to your code. The biggest modifications I made to the bus.py file. My fist idea was to include the functionality to the hasseb driver, but decided to modity the bus.py file instead. But let's see, I first need to solve the issues from the review comments.

I had to change the hid library as the library you used, did not work with Windows. hasseb device is now using hidapi and a separate hid.dll (compiled from open source) is required for windows. I also removed the async part from the driver, because I used QT for asynchronous receive.

BR, Hans

Stephen Early kirjoitti 21.1.2020 01:41:

Thank you for all your work on this! The new firmware is a huge, huge improvement over the original firmware.

I have to choose which parts of this pull request to accept into the project -- and before I can do that, I need to clear up what this project is all about, because I have never really been explicit about it before now.

I wrote python-dali so that people could make use of DALI hardware without having to possess a copy of IEC-62386. When I found myself in possession of a building with DALI lighting, it is the library that I searched for and could not find. I made use of the resources I could find -- in particular, daliserver [1] enabled me to make use of interface hardware I was able to buy at the time -- but eventually I became frustrated, bought copies of some of the parts of IEC-62386, and tried to do a proper job.

python-dali is intended as a reference, and as a base for other projects. It's not intended to be an application in and of itself. I want it to have the smallest number of dependencies possible, so that it can be applied in the broadest variety of applications. So, from this pull request:

  • the driver and the description of the USB protocol to talk to the new hasseb firmware will definitely be pulled
  • I also intend to write an async version of the driver that works using hidraw
  • the driver's dependency on Qt has to go. (It looks like a register/callback situation anyway.)

I don't intend to pull the GUI code. I think it deserves to be its own separate project, which can have python-dali as a dependency.

-- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [2], or unsubscribe [3].

Links:

[1] https://github.com/onitake/daliserver [2] https://github.com/sde1000/python-dali/pull/60?email_source=notifications&email_token=ACFLBFEMBM3NNWAVIJN764LQ6YZBVA5CNFSM4KI3MPLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJOBWMQ#issuecomment-576461618 [3] https://github.com/notifications/unsubscribe-auth/ACFLBFEAUURGQA5SX6U2GIDQ6YZBVANCNFSM4KI3MPLA

dgomes commented 4 years ago

The Gui dir should go :(

rnixx commented 4 years ago

@hasseb please create a hasseb-ui package - or name it as you like - in your account containing the GUI code.

hasseb commented 4 years ago

Yes, I will remove the gui folder and finalize the other comments hopefully very soon

rnixx commented 4 years ago

@hasseb Another minor thing. I'm not sure whether python-dali is the right place for the device firmware binary and the protocol documentation either. IMO this should go to the hasseb related package as well. Anyway the hasseb_firmware folder must be moved out of the driver directory since this is a python package. Also, having the device firmware and docs in your own repo makes maintenance way easier since you can just handle it the way you want. @dgomes, @sde1000