eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
861 stars 784 forks source link

[RFC] Linux input (keyboard) binding #6686

Closed t-8ch closed 5 years ago

t-8ch commented 5 years ago

I would like to contribute a binding that exposes keyboard events (on Linux) via channel states and triggers. The current code is here: https://github.com/t-8ch/binding-linuxinput . There are a few things that have to change before the actual contribution:

The binding embeds code from headerfiles from libevdev which is licensed under the X11 license. The packaged binding contains code from the JNR project which is licensed under APL-2.0

If the contribution is rejected here I would try to get it into openhab. If you have any thoughts about this, I would be happy to hear them.

maggu2810 commented 5 years ago

AFAIK the licenses itself should not be a problem. See: https://www.eclipse.org/legal/licenses.php (linked from https://www.eclipse.org/legal/epl-2.0/faq.php#h.kozlxbolal4y)

davidgraeff commented 5 years ago

Tests would be super cool. Regarding the packaging. Personally I can't express how much I mislike the current build system. For getting this in, unfortunately you need to convert your simple, fast, working solution into what we have currently.

t-8ch commented 5 years ago

Yeah, im absolutely willing to migrate everything to the current status quo. I only want to make sure there is nothing more general from getting this in. (Because auf licensing, native code, platform specifity).

Do you think when these changes are implemented, an inclusion would be possible?

davidgraeff commented 5 years ago

Everything in this repo is platform agnostic, that hinders an inclusion into this repository. openHAB addons will be absolutely fine, no problem.

The GPL license is a bit disturbing. Is there any chance that the authors are willing to relicense their code under MIT/Apache/Eclipse? If not it is not an Issue for the openHAB addons repository, but it is in disharmony with most of the other bindings.

t-8ch commented 5 years ago

Ok. Then I will try it there. I am not sure where GPL gets involved, all dependencies and the project should be X11 or Apache-2.0.

t-8ch commented 5 years ago

(Also to be very pedantic: The bluez binding only works on linux, too)

davidgraeff commented 5 years ago

Oh I mean something different. The bluetooth binding itself is a shell and platform agnostic. And for all supported systems there is a sub bundle available.

So if you would add an "org.eclipse.binding.input" binding together with "org.eclipse.binding.input.libdev" (linux), "org.eclipse.binding.input.xinput" (windows) and "org.eclipse.binding.input.iokit" (mac) then an inclusion is likely for this repo.

t-8ch commented 5 years ago

Ah, I didn't check the other bluetooth bindings. If there will be a generic input binding abstraction I will port mine over to it. (I only have access to Linux boxes, so this would already be a blocker) Could you elaborate on the GPL license? I tried to make sure no GPL is involved.

davidgraeff commented 5 years ago

You are right, there is no GPL code. (Some files have no license header)

t-8ch commented 5 years ago

Superseded by https://github.com/openhab/openhab2-addons/pull/4629