Skip to content

Commit 4cb1768

Browse files
authored
[volumio] Adjust thing/channels label and description (openhab#16925)
* [volumio] Adjust thing/channels label and description Signed-off-by: Laurent Garnier <[email protected]>
1 parent 519a039 commit 4cb1768

File tree

3 files changed

+39
-55
lines changed

3 files changed

+39
-55
lines changed

bundles/org.openhab.binding.volumio/README.md

+15-33
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,27 @@ This binding integrates the open-source Music Player [Volumio](https://www.volum
44

55
## Supported Things
66

7-
87
All available Volumio (playback) modes are supported by this binding.
98

109
## Discovery
1110

1211
The Volumio devices are discovered through mDNS in the local network and all devices are put in the Inbox.
1312

14-
15-
## Binding Configuration
16-
17-
The binding has the following configuration options, which can be set:
18-
19-
| Parameter | Name | Description | Required |
20-
| ----------- | ---------------- | -------------------------------------------------------------------------- | -------- |
21-
| hostname | Hostname | The hostname of the Volumio player. | yes |
22-
| port | Port | The port of your volumio2 device (default is 3000) | yes |
23-
| protocol | Protocol | The protocol of your volumio2 device (default is http) | yes |
24-
| timeout | Timeout | Connection-Timeout in ms | no |
25-
26-
2713
## Thing Configuration
2814

29-
The Volumio Thing requires the hostname, port and protocol as a configuration value in order for the binding to know how to access it.
30-
Additionally, a connection timeout (in ms) can be configured.
31-
In the thing file, this looks e.g. like
15+
| Parameter name | Type | Description | Default | Required | Advanced |
16+
|-----------------|---------|---------------------------------------|---------|----------|----------|
17+
| hostname | text | The hostname of your Volumio device. | N/A | yes | no |
18+
| port | integer | The port of your Volumio device. | 3000 | no | no |
19+
| protocol | text | The protocol of your Volumio device. | http | no | no |
20+
| timeout | integer | Connection timeout in milliseconds. | 5000 | no | yes |
21+
22+
### `sample` Thing Configuration
3223

3324
```java
3425
Thing volumio:player:VolumioLivingRoom "Volumio" @ "Living Room" [hostname="volumio.local", protocol="http"]
3526
```
3627

37-
### `sample` Thing Configuration
38-
39-
| Name | Type | Description | Default | Required | Advanced |
40-
|-----------------|---------|---------------------------------------|---------|----------|----------|
41-
| hostname | text | The hostname of the Volumio player. | N/A | yes | no |
42-
| port | text | The port of your Volumio device. | 3000 | yes | no |
43-
| protocol | text | The protocol of your Volumio device. | http | yes | no |
44-
| timeout | integer | Connection-Timeout in ms. | 5000 | no | yes |
45-
4628
## Channels
4729

4830
The devices support the following channels:
@@ -54,18 +36,18 @@ The devices support the following channels:
5436
| artist | String | R | Name of the artist currently playing. |
5537
| album | String | R | Name of the album currently playing. |
5638
| volume | Dimmer | RW | Set or get the master volume. |
57-
| player | Player | RW | The State channel contains state of the Volumio Player. |
39+
| player | Player | RW | Control the state of the Volumio Player. |
5840
| albumArt | Image | R | Cover Art for the currently played track. |
59-
| track-type | String | R | Tracktype of the currently played track. |
41+
| track-type | String | R | Track type of the currently played track. |
6042
| play-radiostream | String | RW | Play the given radio stream. |
61-
| play-playlist | String | RW | Playback a playlist identified by its name. |
43+
| play-playlist | String | RW | Play a playlist identified by its name. |
6244
| clear-queue | Switch | RW | Clear the current queue. |
63-
| play-uri | Switch | RW | Play the stream at given uri. |
64-
| play-file | Switch | RW | Play a file, located on your Volumio device at the given absolute path, e.g."mnt/INTERNAL/song.mp3" |
45+
| play-uri | String | RW | Play the stream at given uri. |
46+
| play-file | String | RW | Play a file, located on your Volumio device at the given absolute path, e.g."mnt/INTERNAL/song.mp3" |
6547
| random | Switch | RW | Activate random mode. |
6648
| repeat | Switch | RW | Activate repeat mode. |
67-
| system-command | Switch | RW | Sends a system command to Volumio. This allows to shutdown/reboot Volumio. Use "Shutdown"/"Reboot" as String command.|
68-
| stop-command | Switch | RW | Sends a Stop Command to Volumio. This allows to stop the player. Use "stop" as string command. |
49+
| system-command | String | RW | Sends a system command to shutdown or reboot the Volumio device. Use "shutdown" or "reboot" as string command. |
50+
| stop-command | String | RW | Sends a Stop command to stop the player. Use "stop" as string command. |
6951

7052

7153
## Full Example

bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/i18n/volumio.properties

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ addon.volumio.description = This is the binding for Volumio devices.
55

66
# thing types
77

8-
thing-type.volumio.player.label = Volumio Binding Thing
9-
thing-type.volumio.player.description = A Volumio Instance
8+
thing-type.volumio.player.label = Volumio Device
9+
thing-type.volumio.player.description = A Volumio device
1010

1111
# thing types config
1212

@@ -19,7 +19,7 @@ thing-type.config.volumio.player.protocol.description = The protocol of your Vol
1919
thing-type.config.volumio.player.protocol.option.http = http
2020
thing-type.config.volumio.player.protocol.option.https = https
2121
thing-type.config.volumio.player.timeout.label = Timeout
22-
thing-type.config.volumio.player.timeout.description = Connection-Timeout in ms
22+
thing-type.config.volumio.player.timeout.description = Connection timeout in milliseconds (default is 5000)
2323

2424
# channel types
2525

@@ -34,7 +34,7 @@ channel-type.volumio.clear-queue.description = Clear the current queue
3434
channel-type.volumio.play-file.label = Play File
3535
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"
3636
channel-type.volumio.play-playlist.label = Play Playlist
37-
channel-type.volumio.play-playlist.description = Playback a playlist identified by its name
37+
channel-type.volumio.play-playlist.description = Play a playlist identified by its name
3838
channel-type.volumio.play-radiostream.label = Play Radio Stream
3939
channel-type.volumio.play-radiostream.description = Play the given radio stream
4040
channel-type.volumio.play-random.label = Random
@@ -43,18 +43,18 @@ channel-type.volumio.play-repeat.label = Repeat
4343
channel-type.volumio.play-repeat.description = Activate repeat mode
4444
channel-type.volumio.play-uri.label = Play URI
4545
channel-type.volumio.play-uri.description = Play the stream at given URI
46-
channel-type.volumio.player.label = State
47-
channel-type.volumio.player.description = The State channel contains state of the Volumio Player
46+
channel-type.volumio.player.label = Media Control
47+
channel-type.volumio.player.description = Control the state of the Volumio Player
4848
channel-type.volumio.stop-command.label = Stop
49-
channel-type.volumio.stop-command.description = Sends a Stop Command to Volumio. This allows to stop the player. Use "stop" as string command.
49+
channel-type.volumio.stop-command.description = Sends a Stop command to stop the player. Use "stop" as string command.
5050
channel-type.volumio.stop-command.state.option.stop = Stop
5151
channel-type.volumio.system-command.label = Send System Command
52-
channel-type.volumio.system-command.description = Sends a system command to Volumio. This allows to shutdown/reboot Volumio
52+
channel-type.volumio.system-command.description = Sends a system command to shutdown or reboot the Volumio device. Use "shutdown" or "reboot" as string command.
5353
channel-type.volumio.system-command.state.option.shutdown = Shutdown
5454
channel-type.volumio.system-command.state.option.reboot = Reboot
5555
channel-type.volumio.title.label = Current Title
5656
channel-type.volumio.title.description = Title of the song currently playing
5757
channel-type.volumio.track-type.label = Track Type
58-
channel-type.volumio.track-type.description = Tracktype of the currently played track
58+
channel-type.volumio.track-type.description = Track type of the currently played track
5959
channel-type.volumio.volume.label = Volume
6060
channel-type.volumio.volume.description = Set or get the master volume

bundles/org.openhab.binding.volumio/src/main/resources/OH-INF/thing/thing-types.xml

+15-13
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
66

77
<thing-type id="player">
8-
<label>Volumio Binding Thing</label>
9-
<description>A Volumio Instance</description>
8+
<label>Volumio Device</label>
9+
<description>A Volumio device</description>
1010

1111
<channels>
1212
<channel id="title" typeId="title"/>
@@ -31,23 +31,24 @@
3131
<label>Hostname</label>
3232
<description>The hostname of your Volumio device</description>
3333
</parameter>
34-
<parameter name="port" type="integer" required="true">
34+
<parameter name="port" type="integer" required="false">
3535
<label>Port</label>
3636
<description>The port of your Volumio device (default is 3000)</description>
3737
<default>3000</default>
3838
</parameter>
39-
<parameter name="protocol" type="text" required="true">
39+
<parameter name="protocol" type="text" required="false">
4040
<label>Protocol</label>
4141
<description>The protocol of your Volumio device (default is http)</description>
4242
<limitToOptions>true</limitToOptions>
4343
<options>
4444
<option value="http">http</option>
4545
<option value="https">https</option>
4646
</options>
47+
<default>http</default>
4748
</parameter>
48-
<parameter name="timeout" type="integer" required="true">
49+
<parameter name="timeout" type="integer" required="false">
4950
<label>Timeout</label>
50-
<description>Connection-Timeout in ms</description>
51+
<description>Connection timeout in milliseconds (default is 5000)</description>
5152
<default>5000</default>
5253
<advanced>true</advanced>
5354
</parameter>
@@ -58,7 +59,8 @@
5859
<channel-type id="system-command" advanced="true">
5960
<item-type>String</item-type>
6061
<label>Send System Command</label>
61-
<description>Sends a system command to Volumio. This allows to shutdown/reboot Volumio</description>
62+
<description>Sends a system command to shutdown or reboot the Volumio device. Use "shutdown" or "reboot" as string
63+
command.</description>
6264
<state>
6365
<options>
6466
<option value="shutdown">Shutdown</option>
@@ -70,7 +72,7 @@
7072
<channel-type id="stop-command" advanced="true">
7173
<item-type>String</item-type>
7274
<label>Stop</label>
73-
<description>Sends a Stop Command to Volumio. This allows to stop the player. Use "stop" as string command.
75+
<description>Sends a Stop command to stop the player. Use "stop" as string command.
7476
</description>
7577
<state>
7678
<options>
@@ -110,9 +112,9 @@
110112

111113
<channel-type id="player">
112114
<item-type>Player</item-type>
113-
<label>State</label>
114-
<description>The State channel contains state of the Volumio Player</description>
115-
<category>Player</category>
115+
<label>Media Control</label>
116+
<description>Control the state of the Volumio Player</description>
117+
<category>MediaControl</category>
116118
</channel-type>
117119

118120
<channel-type id="album-art" advanced="true">
@@ -125,7 +127,7 @@
125127
<channel-type id="track-type" advanced="true">
126128
<item-type>String</item-type>
127129
<label>Track Type</label>
128-
<description>Tracktype of the currently played track</description>
130+
<description>Track type of the currently played track</description>
129131
<state readOnly="true"/>
130132
</channel-type>
131133

@@ -138,7 +140,7 @@
138140
<channel-type id="play-playlist" advanced="true">
139141
<item-type>String</item-type>
140142
<label>Play Playlist</label>
141-
<description>Playback a playlist identified by its name</description>
143+
<description>Play a playlist identified by its name</description>
142144
</channel-type>
143145

144146
<channel-type id="clear-queue" advanced="true">

0 commit comments

Comments
 (0)