Hi, I am new to Openhab and have started by installing the binding for Spotify Connect and have some issues I would like advice on. I followed this advice BInding for Spotify Connect Devices and managed to get a working sitemap.
sitemap spotify label="Spotify"{
Frame label="Spotify Player Info" {
Text item=trackDuration label="Track duration: [%s]" icon="none"
Text item=trackName label="Track Name: [%s]" icon="none"
Text item=albumName label="Album Name: [%s]" icon="none"
Text item=artistName label="Artist Name: [%s]" icon="none"
Selection item=trackPlay label="Playlist"
mappings=["spotify:user:tc4hhdz0...9kcel:playlist:3pbg...WJEh3aziqhmb"="first List",
"spotify:user:tc4hhdz0...9kcel:playlist:77SE...NJwdP1dzBJZL"="second List",
"spotify:user:tc4hhdz0...9kcel:playlist:4f65C...1RWgYRFOmrok"="third List",
"spotify:user:tc4hhdz0...9kcel:playlist:5LF...OgeCzWx1qzXVSRaM"="fourth List"]
Text item=deviceName label="Current Device Name" icon="none"
Slider item=deviceVol label="Current Device Volume" icon=soundvolume
Switch item=trackShuffle label="Current Device Shuffle"
//Player item=track1Player
Switch item=device1Player label="GOLD Control"
Switch item=device2Player label="David's Tablet Control"
Switch item=device3Player label="Living Room TV"
Switch item=device4Player label="Douglas' Room TV"
}
}
If I try to use the Player item to insert a control the sitemap does not get created. I used the Switch type as mentioned in the instructions and a sitemap is created. On my mobile this gives me a switch icon with no control. In PaperUI control a play control is present which allows me to skip tracks etc.
I had to guess the bridge set up - this and the items map is shown below.
Bridge spotify:player:SpotBridge [ clientId="92c........ba1d8e87ade95f0",clientSecret="6a1...e08ee32ad77b", refreshPeriod=5]
{Thing device "GOLD" [id="28ef61684...6679f0576e13", is_restricted="false"]
Thing device "Tablet David" [id="b3a4c2f6b5cb...1ca49811f", is_restricted="false"]
Thing device "Living Room TV" [id="0e52127724f...ec50c4e", is_restricted="false"]
Thing device "Douglas' Room TV" [id="8dffc16...60e953377d4a", is_restricted="false"]
}
//Player track1Player "Control" {channel="spotify:player:SpotBridge:trackPlayer"}
String deviceName "Active Device" {channel="spotify:player:SpotBridge:deviceName"}
String trackPlay "Track" {channel="spotify:player:SpotBridge:trackPlay"}
String trackProgress "Progress" {channel="spotify:player:SpotBridge:trackProgress"}
String trackDuration "Track Duration" {channel="spotify:player:SpotBridge:trackDuration"}
String trackName "Track Name" {channel="spotify:player:SpotBridge:trackName"}
String albumName "Album Name" {channel="spotify:player:SpotBridge:albumName"}
String artistName "Artist Name" {channel="spotify:player:SpotBridge:artistName"}
Slider deviceVol "Volume" {channel="spotify:player:SpotBridge:deviceVolume"}
Switch trackShuffle "Shuffle" {channel="spotify:player:SpotBridge:trackShuffle"}
Player device1Player "GOLD" {channel="spotify:device:SpotBridge:28ef6.....13:devicePlayer"}
Player device2Player "Tablet David" {channel="spotify:device:SpotBridge:b3.......11f:devicePlayer"}
Player device3Player "Living Room TV" {channel="spotify:device:SpotBridge:0e52...50c4e:devicePlayer"}
Player device4Player "Douglas' Room TV" {channel="spotify:device:SpotBridge:8dff...53d4a:devicePlayer"}
Can anyone give me some advice as to why the track1Player on the Spotify bridge is not working, and why there is a difference in the Mobile and PaperUI?
Thanks.