From 11894871b5f2b842b90d6d36ef452a200c234619 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sat, 29 Jun 2024 15:44:35 +0200 Subject: [PATCH] [volumio] Adjust thing/channels label and description (#16925) * [volumio] Adjust thing/channels label and description Signed-off-by: Laurent Garnier Signed-off-by: Ciprian Pascu --- bundles/org.openhab.binding.volumio/README.md | 48 ++++++------------- .../resources/OH-INF/i18n/volumio.properties | 18 +++---- .../resources/OH-INF/thing/thing-types.xml | 28 ++++++----- 3 files changed, 39 insertions(+), 55 deletions(-) diff --git a/bundles/org.openhab.binding.volumio/README.md b/bundles/org.openhab.binding.volumio/README.md index 7242de0cbe2..eab075dc54a 100644 --- a/bundles/org.openhab.binding.volumio/README.md +++ b/bundles/org.openhab.binding.volumio/README.md @@ -4,45 +4,27 @@ This binding integrates the open-source Music Player [Volumio](https://www.volum ## Supported Things - All available Volumio (playback) modes are supported by this binding. ## Discovery The Volumio devices are discovered through mDNS in the local network and all devices are put in the Inbox. - -## Binding Configuration - -The binding has the following configuration options, which can be set: - -| Parameter | Name | Description | Required | -| ----------- | ---------------- | -------------------------------------------------------------------------- | -------- | -| hostname | Hostname | The hostname of the Volumio player. | yes | -| port | Port | The port of your volumio2 device (default is 3000) | yes | -| protocol | Protocol | The protocol of your volumio2 device (default is http) | yes | -| timeout | Timeout | Connection-Timeout in ms | no | - - ## Thing Configuration -The Volumio Thing requires the hostname, port and protocol as a configuration value in order for the binding to know how to access it. -Additionally, a connection timeout (in ms) can be configured. -In the thing file, this looks e.g. like +| Parameter name | Type | Description | Default | Required | Advanced | +|-----------------|---------|---------------------------------------|---------|----------|----------| +| hostname | text | The hostname of your Volumio device. | N/A | yes | no | +| port | integer | The port of your Volumio device. | 3000 | no | no | +| protocol | text | The protocol of your Volumio device. | http | no | no | +| timeout | integer | Connection timeout in milliseconds. | 5000 | no | yes | + +### `sample` Thing Configuration ```java Thing volumio:player:VolumioLivingRoom "Volumio" @ "Living Room" [hostname="volumio.local", protocol="http"] ``` -### `sample` Thing Configuration - -| Name | Type | Description | Default | Required | Advanced | -|-----------------|---------|---------------------------------------|---------|----------|----------| -| hostname | text | The hostname of the Volumio player. | N/A | yes | no | -| port | text | The port of your Volumio device. | 3000 | yes | no | -| protocol | text | The protocol of your Volumio device. | http | yes | no | -| timeout | integer | Connection-Timeout in ms. | 5000 | no | yes | - ## Channels The devices support the following channels: @@ -54,18 +36,18 @@ The devices support the following channels: | artist | String | R | Name of the artist currently playing. | | album | String | R | Name of the album currently playing. | | volume | Dimmer | RW | Set or get the master volume. | -| player | Player | RW | The State channel contains state of the Volumio Player. | +| player | Player | RW | Control the state of the Volumio Player. | | albumArt | Image | R | Cover Art for the currently played track. | -| track-type | String | R | Tracktype of the currently played track. | +| track-type | String | R | Track type of the currently played track. | | play-radiostream | String | RW | Play the given radio stream. | -| play-playlist | String | RW | Playback a playlist identified by its name. | +| play-playlist | String | RW | Play a playlist identified by its name. | | clear-queue | Switch | RW | Clear the current queue. | -| play-uri | Switch | RW | Play the stream at given uri. | -| play-file | Switch | RW | Play a file, located on your Volumio device at the given absolute path, e.g."mnt/INTERNAL/song.mp3" | +| play-uri | String | RW | Play the stream at given uri. | +| play-file | String | RW | Play a file, located on your Volumio device at the given absolute path, e.g."mnt/INTERNAL/song.mp3" | | random | Switch | RW | Activate random mode. | | repeat | Switch | RW | Activate repeat mode. | -| system-command | Switch | RW | Sends a system command to Volumio. This allows to shutdown/reboot Volumio. Use "Shutdown"/"Reboot" as String command.| -| stop-command | Switch | RW | Sends a Stop Command to Volumio. This allows to stop the player. Use "stop" as string command. | +| system-command | String | RW | Sends a system command to shutdown or reboot the Volumio device. Use "shutdown" or "reboot" as string command. | +| stop-command | String | RW | Sends a Stop command to stop the player. Use "stop" as string command. | ## Full Example diff --git a/bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/i18n/volumio.properties b/bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/i18n/volumio.properties index 51e6159a64d..6a4d6993261 100644 --- a/bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/i18n/volumio.properties +++ b/bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/i18n/volumio.properties @@ -5,8 +5,8 @@ addon.volumio.description = This is the binding for Volumio devices. # thing types -thing-type.volumio.player.label = Volumio Binding Thing -thing-type.volumio.player.description = A Volumio Instance +thing-type.volumio.player.label = Volumio Device +thing-type.volumio.player.description = A Volumio device # thing types config @@ -19,7 +19,7 @@ thing-type.config.volumio.player.protocol.description = The protocol of your Vol thing-type.config.volumio.player.protocol.option.http = http thing-type.config.volumio.player.protocol.option.https = https thing-type.config.volumio.player.timeout.label = Timeout -thing-type.config.volumio.player.timeout.description = Connection-Timeout in ms +thing-type.config.volumio.player.timeout.description = Connection timeout in milliseconds (default is 5000) # channel types @@ -34,7 +34,7 @@ channel-type.volumio.clear-queue.description = Clear the current queue channel-type.volumio.play-file.label = Play File channel-type.volumio.play-file.description = Play a file, located on your Volumio device at the given absolute path, e.g. "mnt/INTERNAL/song.mp3" channel-type.volumio.play-playlist.label = Play Playlist -channel-type.volumio.play-playlist.description = Playback a playlist identified by its name +channel-type.volumio.play-playlist.description = Play a playlist identified by its name channel-type.volumio.play-radiostream.label = Play Radio Stream channel-type.volumio.play-radiostream.description = Play the given radio stream channel-type.volumio.play-random.label = Random @@ -43,18 +43,18 @@ channel-type.volumio.play-repeat.label = Repeat channel-type.volumio.play-repeat.description = Activate repeat mode channel-type.volumio.play-uri.label = Play URI channel-type.volumio.play-uri.description = Play the stream at given URI -channel-type.volumio.player.label = State -channel-type.volumio.player.description = The State channel contains state of the Volumio Player +channel-type.volumio.player.label = Media Control +channel-type.volumio.player.description = Control the state of the Volumio Player channel-type.volumio.stop-command.label = Stop -channel-type.volumio.stop-command.description = Sends a Stop Command to Volumio. This allows to stop the player. Use "stop" as string command. +channel-type.volumio.stop-command.description = Sends a Stop command to stop the player. Use "stop" as string command. channel-type.volumio.stop-command.state.option.stop = Stop channel-type.volumio.system-command.label = Send System Command -channel-type.volumio.system-command.description = Sends a system command to Volumio. This allows to shutdown/reboot Volumio +channel-type.volumio.system-command.description = Sends a system command to shutdown or reboot the Volumio device. Use "shutdown" or "reboot" as string command. channel-type.volumio.system-command.state.option.shutdown = Shutdown channel-type.volumio.system-command.state.option.reboot = Reboot channel-type.volumio.title.label = Current Title channel-type.volumio.title.description = Title of the song currently playing channel-type.volumio.track-type.label = Track Type -channel-type.volumio.track-type.description = Tracktype of the currently played track +channel-type.volumio.track-type.description = Track type of the currently played track channel-type.volumio.volume.label = Volume channel-type.volumio.volume.description = Set or get the master volume diff --git a/bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/thing/thing-types.xml index c3ab7a677df..22b4a243190 100644 --- a/bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/thing/thing-types.xml @@ -5,8 +5,8 @@ xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd"> - - A Volumio Instance + + A Volumio device @@ -31,12 +31,12 @@ The hostname of your Volumio device - + The port of your Volumio device (default is 3000) 3000 - + The protocol of your Volumio device (default is http) true @@ -44,10 +44,11 @@ + http - + - Connection-Timeout in ms + Connection timeout in milliseconds (default is 5000) 5000 true @@ -58,7 +59,8 @@ String - Sends a system command to Volumio. This allows to shutdown/reboot Volumio + Sends a system command to shutdown or reboot the Volumio device. Use "shutdown" or "reboot" as string + command. @@ -70,7 +72,7 @@ String - Sends a Stop Command to Volumio. This allows to stop the player. Use "stop" as string command. + Sends a Stop command to stop the player. Use "stop" as string command. @@ -110,9 +112,9 @@ Player - - The State channel contains state of the Volumio Player - Player + + Control the state of the Volumio Player + MediaControl @@ -125,7 +127,7 @@ String - Tracktype of the currently played track + Track type of the currently played track @@ -138,7 +140,7 @@ String - Playback a playlist identified by its name + Play a playlist identified by its name