]> git.basschouten.com Git - openhab-addons.git/commitdiff
[volumio] Adjust thing/channels label and description (#16925)
authorlolodomo <lg.hc@free.fr>
Sat, 29 Jun 2024 13:44:35 +0000 (15:44 +0200)
committerGitHub <noreply@github.com>
Sat, 29 Jun 2024 13:44:35 +0000 (15:44 +0200)
* [volumio] Adjust thing/channels label and description

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.volumio/README.md
bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/i18n/volumio.properties
bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/thing/thing-types.xml

index 7242de0cbe2c12adeccb323ae1e84a5fc572c290..eab075dc54a879c54d9834e19ac9fefe0b8bc2a1 100644 (file)
@@ -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
index 51e6159a64d14445d4f0bbfc4d3f2311e432c5c5..6a4d6993261aaa14a1e1707821800ad7f2c9e936 100644 (file)
@@ -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
index c3ab7a677df7baf6eff1ac02464b5fb8642caecf..22b4a243190664843570cb0e0f8b86b6673b75e3 100644 (file)
@@ -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">
 
        <thing-type id="player">
-               <label>Volumio Binding Thing</label>
-               <description>A Volumio Instance</description>
+               <label>Volumio Device</label>
+               <description>A Volumio device</description>
 
                <channels>
                        <channel id="title" typeId="title"/>
                                <label>Hostname</label>
                                <description>The hostname of your Volumio device</description>
                        </parameter>
-                       <parameter name="port" type="integer" required="true">
+                       <parameter name="port" type="integer" required="false">
                                <label>Port</label>
                                <description>The port of your Volumio device (default is 3000)</description>
                                <default>3000</default>
                        </parameter>
-                       <parameter name="protocol" type="text" required="true">
+                       <parameter name="protocol" type="text" required="false">
                                <label>Protocol</label>
                                <description>The protocol of your Volumio device (default is http)</description>
                                <limitToOptions>true</limitToOptions>
                                        <option value="http">http</option>
                                        <option value="https">https</option>
                                </options>
+                               <default>http</default>
                        </parameter>
-                       <parameter name="timeout" type="integer" required="true">
+                       <parameter name="timeout" type="integer" required="false">
                                <label>Timeout</label>
-                               <description>Connection-Timeout in ms</description>
+                               <description>Connection timeout in milliseconds (default is 5000)</description>
                                <default>5000</default>
                                <advanced>true</advanced>
                        </parameter>
@@ -58,7 +59,8 @@
        <channel-type id="system-command" advanced="true">
                <item-type>String</item-type>
                <label>Send System Command</label>
-               <description>Sends a system command to Volumio. This allows to shutdown/reboot Volumio</description>
+               <description>Sends a system command to shutdown or reboot the Volumio device. Use "shutdown" or "reboot" as string
+                       command.</description>
                <state>
                        <options>
                                <option value="shutdown">Shutdown</option>
@@ -70,7 +72,7 @@
        <channel-type id="stop-command" advanced="true">
                <item-type>String</item-type>
                <label>Stop</label>
-               <description>Sends a Stop Command to Volumio. This allows to stop the player. Use "stop" as string command.
+               <description>Sends a Stop command to stop the player. Use "stop" as string command.
                </description>
                <state>
                        <options>
 
        <channel-type id="player">
                <item-type>Player</item-type>
-               <label>State</label>
-               <description>The State channel contains state of the Volumio Player</description>
-               <category>Player</category>
+               <label>Media Control</label>
+               <description>Control the state of the Volumio Player</description>
+               <category>MediaControl</category>
        </channel-type>
 
        <channel-type id="album-art" advanced="true">
        <channel-type id="track-type" advanced="true">
                <item-type>String</item-type>
                <label>Track Type</label>
-               <description>Tracktype of the currently played track</description>
+               <description>Track type of the currently played track</description>
                <state readOnly="true"/>
        </channel-type>
 
        <channel-type id="play-playlist" advanced="true">
                <item-type>String</item-type>
                <label>Play Playlist</label>
-               <description>Playback a playlist identified by its name</description>
+               <description>Play a playlist identified by its name</description>
        </channel-type>
 
        <channel-type id="clear-queue" advanced="true">