2.3.9.150 new easy dashboard audio device tile

I could swear it looked fine at first... then it didn't....

The sqDownLo is a squeezeplayer added using the Squeezebox Connect User app in case that matters.

image

The Device seems to be using "level" rather than volume... The app is no longer supported by Ben so I'm a bit stuck... the device code likely just needs a little tweek... Odd that it worked at first. I know it did, I tested volume adjustment right away using the new dashboard tile. Any suggestions?

1 Like

Additional info:
Change type to 'light' or 'switch'... then turn back to music player and controls are back.... (and volume adjustments work fine)... Until a page refresh... then gone again to the sad face.
image

1 Like

Should be simple enough exercise to add a volume attribute, and to modify the setLevel command to set volume to level.

1 Like

Sure it is... says u! :wink:

But i think the real issue may be that the tile is fine on first load, is broken on a refresh....etc.

Ill post a link to Ben's abandoned code tomorrow incase "someone" is willing to help with that edit, it seems like a good long term compatability fix. Then it would work with dimmer or molusic player tile (ive historically used dimmer tile, basic on/off and louder/softer is all i ever use via dashboards)

1 Like

Here's the link to Ben's squeezebox project... as mentioned now unsupported. Any help would be HUGE as I know there's a population still using it...

In the Squeezebox player driver, method updateVolume insert

sendEvent(name: "volumeLevel", value: absVolume, displayed: true)  

at about line 306

Thx...! Unfortunately didn't fix the tile behavior.
behavior is:
initially set as music player, save, lock, looks good, works good.
refresh browser (opera in my setup in case that matters, unlikely imo)
broken tile as screen grabbed above.
unlock, set as light, save, lock... looks light, on/off works.
refresh
still works fine.
unlock, set to music player, save, lock. looks right, works fine. volume is fine.
refesh - tile dies... per above screen shot. Rebooted HE to make sure driver is being read w/update....

Code update looks like:

private updateVolume(volume) {
String absVolume = Math.abs(Integer.valueOf(volume)).toString()
sendEvent(name: "level", value: absVolume, displayed: true)
sendEvent(name: "mute", value: volume.startsWith("-") ? "muted" : "unmuted")
sendEvent(name: "volumeLevel", value: absVolume, displayed: true)
}

Is the volumeLevel showing in the Current States? If not, adjusting the volume should make it display and stay after refresh.

First screen cap is just going to device page.
Then I tapped the 'volume up' button in the device page...
Second screen cap has the volume added at the bottom...
However, the dashboard still shows the broken tile... missing attribute volume. and still behaves the same after the above as described a couple posts up.

Interesting, the Music Player capability calls for volumeLevel but the Audio Volume wants volume. Add a line identical to the last one with volume instead of volumeLevel.

1 Like

You cracked it!
like fixed, not broke...
calling it solved. Thanks so much for the help!

Now we have this code:

private updateVolume(volume) {
  String absVolume = Math.abs(Integer.valueOf(volume)).toString()
  sendEvent(name: "level", value: absVolume, displayed: true)
  sendEvent(name: "mute", value: volume.startsWith("-") ? "muted" : "unmuted")
  sendEvent(name: "volumeLevel", value: absVolume, displayed: true)  
  sendEvent(name: "volume", value: absVolume, displayed: true)    
}
1 Like

Glad to be of assistance.