diff --git a/bundles/org.openhab.binding.clementineremote/NOTICE b/bundles/org.openhab.binding.clementineremote/NOTICE index 38d625e349232..279b3297dd6ad 100644 --- a/bundles/org.openhab.binding.clementineremote/NOTICE +++ b/bundles/org.openhab.binding.clementineremote/NOTICE @@ -8,6 +8,16 @@ 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 diff --git a/bundles/org.openhab.binding.clementineremote/README.md b/bundles/org.openhab.binding.clementineremote/README.md index 7fa077fae4443..0c53d55733cea 100644 --- a/bundles/org.openhab.binding.clementineremote/README.md +++ b/bundles/org.openhab.binding.clementineremote/README.md @@ -1,7 +1,7 @@ # Clementine Remote Binding Screenshot -This binding shall bring the benefits of over-the-network control of the [Clementine-Player] to openHAB! +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: @@ -11,13 +11,15 @@ It allows control of playback, position and volume and allows display of various * current position within track * Album cover - -[→ useful Links][links] - ## Discovery -This thing does (currently) not provide auto-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 @@ -39,17 +41,17 @@ If you set a password in the Clementine configuration, you will have to provide 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 | system.volume | read/write | Playback volume | +| 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 | @@ -57,20 +59,21 @@ The binding provides the following channels: ### Thing -``` +```yaml UID: clementineremote:clementine:0590462b5b label: Clementine thingTypeUID: clementineremote:clementine configuration: port: 5500 hostname: 192.168.1.6 + authCode: 123456 ``` ### Widget based on https://community.openhab.org/t/universal-remote-widget/118423 -``` +```yaml uid: clementine_remote tags: [] props: diff --git a/bundles/org.openhab.binding.clementineremote/doc/useful links.md b/bundles/org.openhab.binding.clementineremote/doc/useful links.md deleted file mode 100644 index f10bf59177d85..0000000000000 --- a/bundles/org.openhab.binding.clementineremote/doc/useful links.md +++ /dev/null @@ -1,7 +0,0 @@ -# Documentation links - -* Clementine - * [Developer Docs for Clementine Remote Control](https://github.com/clementine-player/Android-Remote/wiki/Developer-Documentation) -* OpenHab - * [Developer Docs for OpenHAB plugins (Getting started)](https://www.openhab.org/docs/developer/#develop-a-new-binding) - * [Binding development walk-through](https://www.openhab.org/docs/developer/bindings/#the-thinghandler) diff --git a/bundles/org.openhab.binding.clementineremote/pom.xml b/bundles/org.openhab.binding.clementineremote/pom.xml index 7e009a29a933d..d5ccc8a816453 100644 --- a/bundles/org.openhab.binding.clementineremote/pom.xml +++ b/bundles/org.openhab.binding.clementineremote/pom.xml @@ -12,7 +12,7 @@ org.openhab.binding.clementineremote - openHAB Add-ons :: Bundles :: ClementineRemote Binding + openHAB Add-ons :: Bundles :: Clementine Remote Binding diff --git a/bundles/org.openhab.binding.clementineremote/src/main/feature/feature.xml b/bundles/org.openhab.binding.clementineremote/src/main/feature/feature.xml index e746caa558590..1471cf38e8ba3 100644 --- a/bundles/org.openhab.binding.clementineremote/src/main/feature/feature.xml +++ b/bundles/org.openhab.binding.clementineremote/src/main/feature/feature.xml @@ -2,7 +2,7 @@ mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features - + openhab-runtime-base mvn:org.openhab.addons.bundles/org.openhab.binding.clementineremote/${project.version} diff --git a/bundles/org.openhab.binding.clementineremote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java b/bundles/org.openhab.binding.clementineremote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java index 29b79e141d182..9f2f0daeeb2bd 100644 --- a/bundles/org.openhab.binding.clementineremote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java +++ b/bundles/org.openhab.binding.clementineremote/src/main/java/org/openhab/binding/clementineremote/internal/ClementineRemoteHandler.java @@ -70,6 +70,9 @@ * The {@link ClementineRemoteHandler} is responsible for handling commands, which are * sent to one of the channels. * + * It uses Clementine's own, protocol buffers based communication sheme: + * https://github.com/clementine-player/Android-Remote/wiki/Developer-Documentation + * * @author Stephan Richter - Initial contribution */ @NonNullByDefault diff --git a/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/i18n/clementineremote.properties b/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/i18n/clementineremote.properties index 0c2f44015a92d..838ed23c42daf 100644 --- a/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/i18n/clementineremote.properties +++ b/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/i18n/clementineremote.properties @@ -1,3 +1,34 @@ -# FIXME: please add all English translations to this file so the texts can be translated using Crowdin -# FIXME: to generate the content of this file run: mvn i18n:generate-default-translations -# FIXME: see also: https://www.openhab.org/docs/developer/utils/i18n.html +# binding + +binding.clementineremote.name = Clementine Remote Control +binding.clementineremote.description = This is a binding to remotely control Clementine Player instances. + +# thing types + +thing-type.clementineremote.clementine.label = Clementine Remote +thing-type.clementineremote.clementine.description = Remote control binding for Clementine Player + +# thing types config + +thing-type.config.clementineremote.clementine.authCode.label = Auth Code +thing-type.config.clementineremote.clementine.authCode.description = Authentication code to access the Clementine player +thing-type.config.clementineremote.clementine.hostname.label = Hostname/IP +thing-type.config.clementineremote.clementine.hostname.description = Hostname or IP address of Clementine player +thing-type.config.clementineremote.clementine.port.label = Port +thing-type.config.clementineremote.clementine.port.description = Port to access the Clementine player + +# channel types + +channel-type.clementineremote.current-album.label = Current Album +channel-type.clementineremote.current-album.description = Album the currently playing title belongs to +channel-type.clementineremote.current-cover.label = Album Cover +channel-type.clementineremote.current-cover.description = Cover of the current album +channel-type.clementineremote.current-position.label = Current Position +channel-type.clementineremote.current-position.description = Current position within the playing track +channel-type.clementineremote.current-position.state.pattern = %1$tT +channel-type.clementineremote.current-state.label = Current State +channel-type.clementineremote.current-state.description = Current state of clementine player +channel-type.clementineremote.current-track.label = Current Track +channel-type.clementineremote.current-track.description = Number of the title within the current album +channel-type.clementineremote.playback-control.label = Playback Control +channel-type.clementineremote.playback-control.description = Common control of playback and position diff --git a/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/i18n/clementineremote_de.properties b/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/i18n/clementineremote_de.properties index c5eba8a35a43a..488568745361a 100644 --- a/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/i18n/clementineremote_de.properties +++ b/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/i18n/clementineremote_de.properties @@ -1,35 +1,34 @@ -# FIXME: please substitute the xx with a proper locale, ie. de -# FIXME: please do not add the file to the repo if you add or change no content # binding + binding.clementineremote.name = Clementine-Fernsteuerung binding.clementineremote.description = Fernsteuerung für den Clementine-Player # thing types + thing-type.clementineremote.clementine.label = Clementine-Player -thing-type.clementineremote.clementine.description = integriert einen Clementine-Player ins OpenHAB +thing-type.clementineremote.clementine.description = integriert einen Clementine-Player ins openHAB -# thing type config description -thing-type.config.clementineremote.sample.hostname.label = Hostname/IP -thing-type.config.clementineremote.sample.hostname.description = Hostname oder IP-Adresse des Computers, auf dem Clementine läuft -thing-type.config.clementineremote.sample.password.label = Password -thing-type.config.clementineremote.sample.password.description = (Optionales) Passwort für die Fernsteuerung von Clementine -thing-type.config.clementineremote.sample.port.label = Port -thing-type.config.clementineremote.sample.port.description = Port, auf welchem Clementine Verbindungen annimmt. Standard: 5500 +# thing types config + +thing-type.config.clementineremote.clementine.authCode.label = Passwort +thing-type.config.clementineremote.clementine.authCode.description = Hostname oder IP-Adresse des Computers, auf dem Clementine läuft +thing-type.config.clementineremote.clementine.hostname.label = Hostname/IP +thing-type.config.clementineremote.clementine.hostname.description = Hostname oder IP-Adresse des Computers, auf dem Clementine läuft +thing-type.config.clementineremote.clementine.port.label = Port +thing-type.config.clementineremote.clementine.port.description = Port, auf welchem Clementine Verbindungen annimmt. Standard: 5500 # channel types -channel-type.clementineremote.playback-control.label = Wiedergabe-Steuerung -channel-type.clementineremote.playback-control.description = Zur Steuerung der Wiedergabe + channel-type.clementineremote.current-album.label = aktuelles Album channel-type.clementineremote.current-album.description = Name des Albums, auf dem der gerade gespielte Titel ist -channel-type.clementineremote.current-artist.label = aktueller Interpret -channel-type.clementineremote.current-artist.description = Name des Interpreten des aktuell gespielten Titels +channel-type.clementineremote.current-cover.label = Cover-Bild +channel-type.clementineremote.current-cover.description = Cover-Bild des aktuell gespielten Titels channel-type.clementineremote.current-position.label = Position channel-type.clementineremote.current-position.description = Aktuelle Position der Wiedergabe im gespielten Titel -channel-type.clementineremote.current-title.label = aktueller Titel -channel-type.clementineremote.current-title.description = Name des aktuell gespielten Stücks -channel-type.clementineremote.current-track.label = aktuelle Titel-Nummer -channel-type.clementineremote.current-track.description = Nummer des gerade gespielten Titels innerhalb des Albums +channel-type.clementineremote.current-position.state.pattern = %1$tT channel-type.clementineremote.current-state.label = Zustand channel-type.clementineremote.current-state.description = Aktueller Zustand von Clementine (paused, playing, stopped, unknown) -channel-type.clementineremote.current-cover.label = Cover-Bild -channel-type.clementineremote.current-cover.description = Cover-Bild des aktuell gespielten Titels +channel-type.clementineremote.current-track.label = aktuelle Titel-Nummer +channel-type.clementineremote.current-track.description = Nummer des gerade gespielten Titels innerhalb des Albums +channel-type.clementineremote.playback-control.label = Wiedergabe-Steuerung +channel-type.clementineremote.playback-control.description = Zur Steuerung der Wiedergabe diff --git a/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/thing/thing-types.xml index 49d0b3272dc16..7f8b46bff7742 100644 --- a/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.clementineremote/src/main/resources/OH-INF/thing/thing-types.xml @@ -11,11 +11,11 @@ - + - + @@ -24,7 +24,7 @@ network-address - + Hostname or IP address of Clementine player @@ -54,13 +54,6 @@ - - String - - Artist of the currently playing title - - - Number:Time @@ -68,13 +61,6 @@ - - String - - Name of the currently playing title - - - String