sde1000 / python-dali

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

Add DALI DT8 colour gear support #106

Closed sl-wallace closed 2 years ago

sl-wallace commented 2 years ago

Based on a fork I'd found by Petr Ilgner I've added support for IEC 62386-208 DALI-2 DT8 colour temperature control gear. I've kept his original commits by cherry-picking them, so that the correct attribution remains in the commit history.

As well as the dali.gear.colour module, there's a new dali.gear.sequences module, which contains SetDT8ColourValueTc() and QueryDT8ColourValue() sequences.

I only have access to colour temperature gear, so support isn't completed for other types (e.g. RGBWAF, x-y coordinate). These should be easy enough to add in by someone who has such hardware to test with. All command opcodes have been implemented, even though I am not able to test all of them. (Note that opcodes 239, 244, 253 and 254 are "reserved" by the standard).

sde1000 commented 2 years ago

Although I see there are still a couple of TODO items (QueryRBGWAFControl and QueryAssignedColour) I'm happy to merge this.

sl-wallace commented 2 years ago

OK, thanks for that. I'll take a quick look at sorting out some of the TODO items to see how much work it would be and if it's possible to meaningfully implement it without hardware - then submit and mark as ready.

sl-wallace commented 2 years ago

I'm happy with this now, I haven't been able to test the QueryAssignedColour and QueryRBGWAFControl messages, but I have unit tests for them and they seem like they ought to work with appropriate control gear. If anyone uses it and it doesn't work then they'll just have to file a bug report! :grinning: