From 22978950b0ae18dad98837313eba377ecee0c9f4 Mon Sep 17 00:00:00 2001 From: LeeC77 Date: Thu, 18 Jun 2020 19:37:25 +0100 Subject: [PATCH] [squeezebox] Add some examples to the .items file example (#7925) * Add some example for the .items file As I struggled to sort out exactly how to set up the .items file for the item type 'image' and define the album art channel I though the documentation could be clarified with an example or 3. * Update README.md --- bundles/org.openhab.binding.squeezebox/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.squeezebox/README.md b/bundles/org.openhab.binding.squeezebox/README.md index 05ebe0a973a96..41de13e1d93c4 100644 --- a/bundles/org.openhab.binding.squeezebox/README.md +++ b/bundles/org.openhab.binding.squeezebox/README.md @@ -115,6 +115,16 @@ All devices support some of the following channels: | numberPlaylistTracks | Number | Number of playlist tracks | | playFavorite | String | ID of Favorite to play (channel's state options contains available favorites) | +## Example .Items File + +Add the items you want to the .items file. A few examples are shown below, the power, volume and album art channels are connected here to the items by copying across the channel discriptions from the Paper UI. Make suure each channel is linked for your needs See [openHAB New User Configuration documentation](https://www.openhab.org/docs/tutorial/configuration.html) for further details on linking and channels. + +``` +Switch YourPlayer_Power "Squeezebox Power" {channel="squeezebox:squeezeboxplayer:736549a3:00042016e7a0:power"} +Dimmer YourPlayer_Volume "Squeezebox Volume" {channel="squeezebox:squeezeboxplayer:736549a3:00042016e7a0:volume"} +Image YourPlayer_AlbumArt "Squeezebox Cover" {channel="squeezebox:squeezeboxplayer:736549a3:00042016e7a0:coverartdata"} +``` + ## Playing Favorites Using the **playFavorite** channel, you can play a favorite from the *Favorites* list on the Logitech Media Server (LMS). @@ -128,7 +138,7 @@ Currently, only favorites from the root level of the LMS favorites list are expo - Add some favorites to your favorites list in LMS (local music playlists, Pandora, Slacker, Internet radio, etc.). Keep all favorites at the root level (i.e. favorites in sub-folders will be ignored). -- If you're on an older openHAB build, you may need to delete and readd your squeezebox server and player things to pick up the new channels. +- If you're on an older openHAB build, you may need to delete and re-add your squeezebox server and player things to pick up the new channels. - Create a new item on each player