[volumio] Adjust thing/channels label and description (#16925)

* [volumio] Adjust thing/channels label and description

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
lolodomo 2024-06-29 15:44:35 +02:00 committed by Ciprian Pascu
parent 9b01c43471
commit 11894871b5
3 changed files with 39 additions and 55 deletions

View File

@ -4,45 +4,27 @@ This binding integrates the open-source Music Player [Volumio](https://www.volum
## Supported Things ## Supported Things
All available Volumio (playback) modes are supported by this binding. All available Volumio (playback) modes are supported by this binding.
## Discovery ## Discovery
The Volumio devices are discovered through mDNS in the local network and all devices are put in the Inbox. 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 ## 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. | Parameter name | Type | Description | Default | Required | Advanced |
Additionally, a connection timeout (in ms) can be configured. |-----------------|---------|---------------------------------------|---------|----------|----------|
In the thing file, this looks e.g. like | 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 ```java
Thing volumio:player:VolumioLivingRoom "Volumio" @ "Living Room" [hostname="volumio.local", protocol="http"] 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 ## Channels
The devices support the following 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. | | artist | String | R | Name of the artist currently playing. |
| album | String | R | Name of the album currently playing. | | album | String | R | Name of the album currently playing. |
| volume | Dimmer | RW | Set or get the master volume. | | 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. | | 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-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. | | clear-queue | Switch | RW | Clear the current queue. |
| play-uri | Switch | RW | Play the stream at given uri. | | play-uri | String | 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-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. | | random | Switch | RW | Activate random mode. |
| repeat | Switch | RW | Activate repeat 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.| | system-command | String | RW | Sends a system command to shutdown or reboot the Volumio device. Use "shutdown" or "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. | | stop-command | String | RW | Sends a Stop command to stop the player. Use "stop" as string command. |
## Full Example ## Full Example

View File

@ -5,8 +5,8 @@ addon.volumio.description = This is the binding for Volumio devices.
# thing types # thing types
thing-type.volumio.player.label = Volumio Binding Thing thing-type.volumio.player.label = Volumio Device
thing-type.volumio.player.description = A Volumio Instance thing-type.volumio.player.description = A Volumio device
# thing types config # 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.http = http
thing-type.config.volumio.player.protocol.option.https = https thing-type.config.volumio.player.protocol.option.https = https
thing-type.config.volumio.player.timeout.label = Timeout 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 # 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.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-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.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.label = Play Radio Stream
channel-type.volumio.play-radiostream.description = Play the given radio stream channel-type.volumio.play-radiostream.description = Play the given radio stream
channel-type.volumio.play-random.label = Random 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-repeat.description = Activate repeat mode
channel-type.volumio.play-uri.label = Play URI channel-type.volumio.play-uri.label = Play URI
channel-type.volumio.play-uri.description = Play the stream at given URI channel-type.volumio.play-uri.description = Play the stream at given URI
channel-type.volumio.player.label = State channel-type.volumio.player.label = Media Control
channel-type.volumio.player.description = The State channel contains state of the Volumio Player channel-type.volumio.player.description = Control the state of the Volumio Player
channel-type.volumio.stop-command.label = Stop 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.stop-command.state.option.stop = Stop
channel-type.volumio.system-command.label = Send System Command 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.shutdown = Shutdown
channel-type.volumio.system-command.state.option.reboot = Reboot channel-type.volumio.system-command.state.option.reboot = Reboot
channel-type.volumio.title.label = Current Title channel-type.volumio.title.label = Current Title
channel-type.volumio.title.description = Title of the song currently playing channel-type.volumio.title.description = Title of the song currently playing
channel-type.volumio.track-type.label = Track Type 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.label = Volume
channel-type.volumio.volume.description = Set or get the master volume channel-type.volumio.volume.description = Set or get the master volume

View 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"> 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"> <thing-type id="player">
<label>Volumio Binding Thing</label> <label>Volumio Device</label>
<description>A Volumio Instance</description> <description>A Volumio device</description>
<channels> <channels>
<channel id="title" typeId="title"/> <channel id="title" typeId="title"/>
@ -31,12 +31,12 @@
<label>Hostname</label> <label>Hostname</label>
<description>The hostname of your Volumio device</description> <description>The hostname of your Volumio device</description>
</parameter> </parameter>
<parameter name="port" type="integer" required="true"> <parameter name="port" type="integer" required="false">
<label>Port</label> <label>Port</label>
<description>The port of your Volumio device (default is 3000)</description> <description>The port of your Volumio device (default is 3000)</description>
<default>3000</default> <default>3000</default>
</parameter> </parameter>
<parameter name="protocol" type="text" required="true"> <parameter name="protocol" type="text" required="false">
<label>Protocol</label> <label>Protocol</label>
<description>The protocol of your Volumio device (default is http)</description> <description>The protocol of your Volumio device (default is http)</description>
<limitToOptions>true</limitToOptions> <limitToOptions>true</limitToOptions>
@ -44,10 +44,11 @@
<option value="http">http</option> <option value="http">http</option>
<option value="https">https</option> <option value="https">https</option>
</options> </options>
<default>http</default>
</parameter> </parameter>
<parameter name="timeout" type="integer" required="true"> <parameter name="timeout" type="integer" required="false">
<label>Timeout</label> <label>Timeout</label>
<description>Connection-Timeout in ms</description> <description>Connection timeout in milliseconds (default is 5000)</description>
<default>5000</default> <default>5000</default>
<advanced>true</advanced> <advanced>true</advanced>
</parameter> </parameter>
@ -58,7 +59,8 @@
<channel-type id="system-command" advanced="true"> <channel-type id="system-command" advanced="true">
<item-type>String</item-type> <item-type>String</item-type>
<label>Send System Command</label> <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> <state>
<options> <options>
<option value="shutdown">Shutdown</option> <option value="shutdown">Shutdown</option>
@ -70,7 +72,7 @@
<channel-type id="stop-command" advanced="true"> <channel-type id="stop-command" advanced="true">
<item-type>String</item-type> <item-type>String</item-type>
<label>Stop</label> <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> </description>
<state> <state>
<options> <options>
@ -110,9 +112,9 @@
<channel-type id="player"> <channel-type id="player">
<item-type>Player</item-type> <item-type>Player</item-type>
<label>State</label> <label>Media Control</label>
<description>The State channel contains state of the Volumio Player</description> <description>Control the state of the Volumio Player</description>
<category>Player</category> <category>MediaControl</category>
</channel-type> </channel-type>
<channel-type id="album-art" advanced="true"> <channel-type id="album-art" advanced="true">
@ -125,7 +127,7 @@
<channel-type id="track-type" advanced="true"> <channel-type id="track-type" advanced="true">
<item-type>String</item-type> <item-type>String</item-type>
<label>Track Type</label> <label>Track Type</label>
<description>Tracktype of the currently played track</description> <description>Track type of the currently played track</description>
<state readOnly="true"/> <state readOnly="true"/>
</channel-type> </channel-type>
@ -138,7 +140,7 @@
<channel-type id="play-playlist" advanced="true"> <channel-type id="play-playlist" advanced="true">
<item-type>String</item-type> <item-type>String</item-type>
<label>Play Playlist</label> <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>
<channel-type id="clear-queue" advanced="true"> <channel-type id="clear-queue" advanced="true">