-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[ClementineRemote] Initial contribution #14110
Conversation
This is a squash commit to tidy up experiments. Signed-off-by: Stephan Richter <github@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, did a basic review. Didn't look at the ...lementineremote/src/main/java/de/qspool/clementineremote/backend/pb/ClementineRemote.java 36k lines :-) and two other files, Maybe look at that later.
There also has to come a solution for the auto-generated files as the current build fails due to these files.
note: im not an addons maintainer
bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/thing/thing-types.xml
Show resolved
Hide resolved
|
||
* Project home: https://www.openhab.org | ||
|
||
== Declared Project Licenses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No license expert here, just want to mention that i see a different license for the auto generated files like: /src/main/java/de/qspool/clementineremote/backend/pb/ClementineRemote.java
The dependency on com.google.protobuf might need to be mentioned, but as said, i'm no expert here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the NOTICE file in a recent commit. But I'm no expert in these things. Again, I would be grateful for any suggestion how to improve this text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jlaur can you advice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this to the end of this file
== Third-party Content
protobuf-java
* License: BSD License
* Project: https://developers.google.com/protocol-buffers
* Source: https://github.com/protocolbuffers/protobuf
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
I fixed all suggestions by lsiepel – with on exception: I did not change the channel type of playback-control to the predefined system.media-control, as that does not seem to support STOP command. |
d0f01b4
to
ba03039
Compare
Great, some small issues left. Maybe look at some other binding regarding the player / media control. Don't have a real opinion on it, juist know there is a dedicated control for such tasks. I leave this now for a real maintainer to review. :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have also commented on some parts that could improve in the handler, one of the files
i skipped earlier.
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
<?xml version="1.0" encoding="UTF-8"?> | ||
<binding:binding id="clementineremote" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0" | ||
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd"> | ||
|
||
<name>Clementine Remote Control</name> | ||
<description>This is a binding to remotely control Clementine Player instances.</description> | ||
|
||
</binding:binding> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please convert to the new addon.xml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This addon.xml
is not yet common knowledge and the PR to adapt the developer docs is not merged yet, so if you need more details, the corrosponding issue is here: openhab/openhab-core#2058
But you can also update your branch and look at another binding's addon.xml
and adapt it to this initial contribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details are documented here: https://next.openhab.org/docs/developer/addons/addon.html#add-on-definitions
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
…Channels Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This is a squash commit to tidy up experiments. Signed-off-by: Stephan Richter <github@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
8331fa3
to
e3d1648
Compare
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
...enhab.binding.clementineremote/src/main/resources/OH-INF/i18n/clementineremote_de.properties
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the improvements. There are some builds warnings left (Potential null pointer access). Hopefully @jlaur can advice how to exclude the 3rd party generated file from SAT analysis. as it is currently cluttering the build log.
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteConfiguration.java
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
...ote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java
Outdated
Show resolved
Hide resolved
…c channel (for all channels). Refactored connection methods, implemented failover by using sheduler Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
Hm, any progress here? Did I miss something when fixing the denoted issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was probably added by mistake, can you remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @StephanRichter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, I'm a bit short in time. I will look into this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should probably be moved to bundles/org.openhab.binding.clementineremote/src/3rdparty/proto/remotecontrolmessages.proto
since it belongs to a different namespace with a difference license.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should probably be moved to bundles/org.openhab.binding.clementineremote/src/3rdparty/java/backend/pb/ClementineRemote.java
since it belongs to a different namespace with a difference license.
<parent> | ||
<groupId>org.openhab.addons.bundles</groupId> | ||
<artifactId>org.openhab.addons.reactor.bundles</artifactId> | ||
<version>4.0.0-SNAPSHOT</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<version>4.0.0-SNAPSHOT</version> | |
<version>4.3.0-SNAPSHOT</version> |
@StephanRichter there has been some time without any updated / commits to this PR. Do you think you will be able to finish this or did you abandon this PR? At some time we will close this PR due to inactivity. |
Sorry for the late answer. I'm currently completely overloaded and have no spare time to invest here. The code is working (I use it on a daily base) – if anyone can make editions to fulfill your requirements: feel free to do so. |
Thank you for your reply. While this PR is not that far from being merged, i hope you finish it somewhere in the future. But as you said to give up at this moment i think it is better to close it here. Obvious the code remains available in your branch, so whenever you or another contributer want to move this forward the code can be re-used. |
ClementineRemote Binding
This new binding allows controlling Clementine Player from OpenHAB.
The binding is located @
bundles/org.openhab.binding.clementineremote
.Description
Connection between Handler and Clementine Player is done via Google Protocol Buffers.
The protobuf definition file is included in the folder
proto
.Based on this definition file, a class
ClementineRemote.java
has been generated in the packagebundles/org.openhab.binding.clementineremote/src/main/java/de/qspool/clementineremote/backend/pb
via the commandbundles/org.openhab.binding.clementineremote$> protoc --java_out=src/main/java/ proto/remotecontrolmessages.proto
OpenHAB version
As per request from Maintainer, this commit is now based on lastest 4.0.0 main.
Static Code Analysis
All code in
org/openhab/binding/clementineremote
should conform to the requirements given in the Coding Guidelines.However the code in
de/qspool/clementineremote/backend/pb
does not! As this class is script-generated, I think it should be excluded from code analysis.There already is a thread for discussion of that topic.