Skip to content
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

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8eb6f87
Preparation for tag creation (Tag name: '3.3.0').
Jun 26, 2022
c4f2cab
Added new _Clementine Remote_ binding.
Dec 17, 2022
012c368
back-ported code from ClementineRemote (4.0.0) branch
Dec 30, 2022
6aaa528
restored pom.xml (i.e. removed blank lines)
Jan 6, 2023
3dfed03
bugfix in thing-types.xml
Jan 6, 2023
dcbad4d
removed comments as requested
Jan 6, 2023
a08102e
working on suggestions fro Isiepel
Jan 6, 2023
8e150fb
fixing issues as requestef from maintainer
Jan 8, 2023
32a5718
fixed READMED, NOTICE and added dev link to ClementineRemoteHandler.java
Jan 8, 2023
c004b1a
made enum values (ClementineRemoteHandler) uppercase
Feb 7, 2023
de9c5d2
now handling refresh command
Feb 7, 2023
870462b
fixed verbosity level
Feb 7, 2023
9d22d6d
added @Nullable
Feb 7, 2023
9c8093f
added dedicated methods updatePlayerStateChannels and updateTrackInfo…
Feb 7, 2023
1ec99c4
squashed all changes into on commit - this time signing it off
Jan 8, 2023
2fd1a21
improved README
Jan 8, 2023
1ddd5d6
dropped german translation
Jan 8, 2023
915635f
Preparation for tag creation (Tag name: '3.3.0').
Jun 26, 2022
a1901ea
Added new _Clementine Remote_ binding.
Dec 17, 2022
e3d1648
fixing issues as requestef from maintainer
Jan 8, 2023
9b14165
fixed class header comments
Feb 7, 2023
88a2496
Refactored update handling: now reacting to refreshCommand on specifi…
Feb 8, 2023
0573a48
Merge branch 'ClementineRemote-3.3.0' into ClementineRemote
Feb 8, 2023
6b8e6c9
removed clementineremote_de.properties
Feb 8, 2023
26cbb88
worked on Nullable handles
Feb 8, 2023
99735f3
worked on Nullable handles
Feb 8, 2023
cae3084
formatting introduced by spotless:apply
Feb 8, 2023
fc177d3
Merge branch 'ClementineRemote-3.3.0' into ClementineRemote
Feb 8, 2023
8c08d5c
fixing possible null pointer access
Feb 8, 2023
dcc79f8
handling null pointer access
Feb 9, 2023
38d4b93
improved behaviour on disconnect
Feb 9, 2023
dbc91a7
dropped state channel (was redundant to playback channel)
Feb 9, 2023
d9312b8
Merge branch 'ClementineRemote-3.3.0' into ClementineRemote
Feb 9, 2023
a83eeb9
updated README: added demo.things
Feb 9, 2023
2f26ad4
Merge branch 'ClementineRemote-3.3.0' into ClementineRemote
Feb 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
/bundles/org.openhab.binding.caddx/ @jossuar
/bundles/org.openhab.binding.cbus/ @jpharvey
/bundles/org.openhab.binding.chromecast/ @kaikreuzer
/bundles/org.openhab.binding.clementineremote/ @StephanRichter
/bundles/org.openhab.binding.cm11a/ @BobRak
/bundles/org.openhab.binding.comfoair/ @boehan
/bundles/org.openhab.binding.coolmasternet/ @projectgus
Expand Down
5 changes: 5 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@
<artifactId>org.openhab.binding.chromecast</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.clementineremote</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.cm11a</artifactId>
Expand Down
23 changes: 23 additions & 0 deletions bundles/org.openhab.binding.clementineremote/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
This content is produced and maintained by the openHAB project.

* Project home: https://www.openhab.org

== Declared Project Licenses
Copy link
Contributor

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.

Copy link
Contributor Author

@StephanRichter StephanRichter Jan 8, 2023

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jlaur can you advice?

Copy link
Contributor

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


This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.

The included protobuf definition file emerged from the Clementine-Player Android-Remote project
and is licensed under the Apache License, Version 2.0.

The file src/main/java/de/qspool/clementineremote/backend/pb/ClementineRemote.java is generated from the
protocol buffers description files using Googles `protoc`.

Usage of protocol buffers within this project is limited to the inclusion of the com.google.protobuf library.

Protoc is *not* part of this project.

== Source Code

https://github.com/openhab/openhab-addons
83 changes: 83 additions & 0 deletions bundles/org.openhab.binding.clementineremote/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Clementine Remote Binding

<img style="float: right; margin: 0 0 5px 5px" src="doc/screenshot.png" alt="Screenshot" />
This binding brings the benefits of over-the-network control of the [Clementine-Player] to openHAB!

It allows control of playback, position and volume and allows display of various title information:

* Artist
* Album
* Title
* current position within track
* Album cover

## Discovery

This thing does not provide auto-discovery.
You will have to manually configure clementine to allow remote connections.

Detailed instructions how to configure Clementine's remote functions are provided here:

https://github.com/clementine-player/Android-Remote/wiki/How-to-use-the-Android-Remote

And you will have to manually configure the Thing instances to talk to your player:

## Thing Configuration

Configuring the connection to Clementine is quite easy:

Normally you only need to set the hostname your Clementine player is running at.
If you set a password in the Clementine configuration, you will have to provide it to the configuration, too.

| Name | Type | Description | Default | Required | Advanced |
|----------|---------|-------------------------------------------------------------------|---------|----------|----------|
| hostname | text | Hostname or IP address of the device | N/A | yes | no |
| password | text | Password to access the device | N/A | no | no |
| port | integer | Port at which Clementine is listening for remote control commands | 5500 | yes | no |

## Channels

The binding provides the following channels:

| Channel | Type | Read/Write | Description |
|------------------|-------------|-------------|----------------------------------------------|
| album | String | read-only | Album the currently playing song belongs to |
| artist | String | read-only | Artist of the currently playing title |
| cover | Image | read-only | Cover of the current album |
| playback-control | String | read/write | Common control of playback and position |
| position | Number:Time | read-only | Current position within the playing track |
| state | String | read-only | Current state of Clementine player |
| title | String | read-only | Name of the currently playing track |
| track | String | read-only | Number of the title within the current album |
| volume-control | Dommer | read/write | Playback volume |



## Full Example

### Thing

#### YAML
```yaml
UID: clementineremote:clementine:myplayer
label: "Music Player"
thingTypeUID: clementineremote:clementine
configuration:
port: 5500
hostname: 192.168.1.158
authCode: 123456
```

#### demo.things:

```
Thing clementineremote:clementine:myplayer "Music Player" @ "Living Room" [ hostname="192.168.1.158", authCode="12345", port="5500" ]
```

### Widget

You may find a nice widget to use with this plugin at [Widget.md]

[Clementine-Player]: https://www.clementine-player.org/
[Links]: doc/useful%20links.md
[Widget.md]: Widget.md
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions bundles/org.openhab.binding.clementineremote/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>4.0.0-SNAPSHOT</version>
Copy link
Member

@wborn wborn Jul 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<version>4.0.0-SNAPSHOT</version>
<version>4.3.0-SNAPSHOT</version>

</parent>

<artifactId>org.openhab.binding.clementineremote</artifactId>

<name>openHAB Add-ons :: Bundles :: Clementine Remote Binding</name>

<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.15.8</version>
</dependency>
</dependencies>
</project>
Loading