Album cover art doesn't always appear

At times, album cover art doesn’t appear in Dashboard, even when the music source (in this example, Sonos) has it and displays it.

In the pic below, you can see a corner of a Sharptools dashboard over the Sonos app. The Sonos app shows the cover art, but the dashboard tile shows the default headphones.

Is this a new bug with today’s release, or something I just haven’t noticed over time?

Thanks for posting! Is this on Hubitat or SmartThings?

With SmartThings, we are able to use the local artwork exposed by the Sonos device. If that artwork isn’t available, then we search two other album art sources and try to find an exact match.

Hubitat doesn’t expose the full link to the local album art, so the tile relies on searching for the artwork. For modern popular Albums this usually works well, though there are some cases where it can’t find a good enough match.

It’s Hubitat. The art works well with the more popular artists, but what surprised me was that the music player (Sonos) could find it, but the Sharptools tile couldn’t.

In the first example above, the source was Amazon Music. But it exhibits the same behavior when the source is Sirius/XM.

It’s less that the Sonos device ‘finds’ it… more that the Sonos device is provided the artwork from whatever source it’s playing.

With Sonos on SmartThings, we get a copy of that same artwork that was provided by the service to Sonos. The Hubitat driver doesn’t expose the full URL to the artwork, so we have to search for it. :slightly_smiling_face:

If you have some examples of artwork that can’t be found, I’d love to see details of those examples. Specifically, I would be looking for the exact text of the trackData attribute that’s reported. Feel free to send them to support@sharptools.io - the more examples we have, the better chance we can refine things. :grin:

1 Like

I’ll work on some examples tomorrow- thanks!

1 Like

Hi Josh,

Here’s a track_data result for a track that showed cover data in Sonos, but didn’t in the Sharptools dash:

trackData : {"audioSource":"Sonos Q","station":null,"name":"Verdi: Il Trovatore \\/ Act 2 - \\\"Vedi! le fosche notturne spoglie\\\" (Anvil Chorus) ((From \\\"D2: The Migh","artist":"The London Opera Chorus, The National Philharmonic Orchestra & Richard Bonyn","album":"Hollywood Classics: Music From The Movies","trackNumber":"2","status":"playing","level":"8","mute":"unmuted","uri":"x-rincon-queue:RINCON_7828CAF5B77801400#0","trackUri":"x-sonosapi-hls-static:catalog%2ftracks%2fB00EPDYY0K%2f?sid=201&flags=0&sn=2","transportUri":"x-rincon-queue:RINCON_7828CAF5B77801400#0","enqueuedUri":"x-rincon-cpcontainer:100e206ccatalog%2frecs%2ftracks%2f%23recs_tracks_desc?sid=201&flags=8300&sn=2","metaData":"Tracks Just for You<\\/dc:title>object.container.playlistContainer<\\/upnp:class>https:\\/\\/s3.amazonaws.com\\/redbird-icons\\/blue_icon_songs-80x80.png<\\/upnp:albumArtURI>Recommended<\\/r:description>SA_RINCON51463_X_#Svc51463-0-Token<\\/desc><\\/item><\\/DIDL-Lite>","trackMetaData":"x-sonosapi-hls-static:catalog%2ftracks%2fB00EPDYY0K%2f?sid=201&flags=0&sn=2<\\/res><\\/r:streamContent><\\/r:radioShowMd>\\/getaa?s=1&u=x-sonosapi-hls-static%3acatalog%252ftracks%252fB00EPDYY0K%252f%3fsid%3d201%26flags%3d0%26sn%3d2<\\/upnp:albumArtURI>Verdi: Il Trovatore \\/ Act 2 - "Vedi! le fosche notturne spoglie" (Anvil Chorus) ((From "D2: The Migh<\\/dc:title>object.item.audioItem.musicTrack<\\/upnp:class>The London Opera Chorus, The National Philharmonic Orchestra & Richard Bonyn<\\/dc:creator>Hollywood Classics: Music From The Movies<\\/upnp:album><\\/item><\\/DIDL-Lite>"}

Here’s another (actually the one that I first noticed recently):

trackData : {"audioSource":"Sonos Q","station":null,"name":"Mozart: Requiem in D minor, K.626 - 1. Introitus: Requiem","artist":"Sylvia McNair, Academy of St. Martin in the Fields Chorus, Academy of St. Ma","album":"Mozart: Requiem","trackNumber":"5","status":"playing","level":"8","mute":"unmuted","uri":"x-rincon-queue:RINCON_7828CAF5B77801400#0","trackUri":"x-sonosapi-hls-static:catalog%2ftracks%2fB000V6Q26O%2f?sid=201&flags=0&sn=2","transportUri":"x-rincon-queue:RINCON_7828CAF5B77801400#0","enqueuedUri":"x-rincon-cpcontainer:100e206ccatalog%2frecs%2ftracks%2f%23recs_tracks_desc?sid=201&flags=8300&sn=2","metaData":"Tracks Just for You<\\/dc:title>object.container.playlistContainer<\\/upnp:class>https:\\/\\/s3.amazonaws.com\\/redbird-icons\\/blue_icon_songs-80x80.png<\\/upnp:albumArtURI>Recommended<\\/r:description>SA_RINCON51463_X_#Svc51463-0-Token<\\/desc><\\/item><\\/DIDL-Lite>","trackMetaData":"x-sonosapi-hls-static:catalog%2ftracks%2fB000V6Q26O%2f?sid=201&flags=0&sn=2<\\/res><\\/r:streamContent><\\/r:radioShowMd>\\/getaa?s=1&u=x-sonosapi-hls-static%3acatalog%252ftracks%252fB000V6Q26O%252f%3fsid%3d201%26flags%3d0%26sn%3d2<\\/upnp:albumArtURI>Mozart: Requiem in D minor, K.626 - 1. Introitus: Requiem<\\/dc:title>object.item.audioItem.musicTrack<\\/upnp:class>Sylvia McNair, Academy of St. Martin in the Fields Chorus, Academy of St. Ma<\\/dc:creator>Mozart: Requiem<\\/upnp:album><\\/item><\\/DIDL-Lite>"}

And one more:

trackData : {"audioSource":"Sonos Q","station":null,"name":"Orff: Carmina Burana \\/ Fortuna Imperatrix Mundi - 1. O Fortuna","artist":"Orchester der Deutschen Oper Berlin, Eugen Jochum, Chor der Deutschen Oper B","album":"Orff: Carmina Burana","trackNumber":"7","status":"playing","level":"8","mute":"unmuted","uri":"x-rincon-queue:RINCON_7828CAF5B77801400#0","trackUri":"x-sonosapi-hls-static:catalog%2ftracks%2fB0015S5QR8%2f?sid=201&flags=0&sn=2","transportUri":"x-rincon-queue:RINCON_7828CAF5B77801400#0","enqueuedUri":"x-rincon-cpcontainer:100e206ccatalog%2frecs%2ftracks%2f%23recs_tracks_desc?sid=201&flags=8300&sn=2","metaData":"Tracks Just for You<\\/dc:title>object.container.playlistContainer<\\/upnp:class>https:\\/\\/s3.amazonaws.com\\/redbird-icons\\/blue_icon_songs-80x80.png<\\/upnp:albumArtURI>Recommended<\\/r:description>SA_RINCON51463_X_#Svc51463-0-Token<\\/desc><\\/item><\\/DIDL-Lite>","trackMetaData":"x-sonosapi-hls-static:catalog%2ftracks%2fB0015S5QR8%2f?sid=201&flags=0&sn=2<\\/res><\\/r:streamContent><\\/r:radioShowMd>\\/getaa?s=1&u=x-sonosapi-hls-static%3acatalog%252ftracks%252fB0015S5QR8%252f%3fsid%3d201%26flags%3d0%26sn%3d2<\\/upnp:albumArtURI>Orff: Carmina Burana \\/ Fortuna Imperatrix Mundi - 1. O Fortuna<\\/dc:title>object.item.audioItem.musicTrack<\\/upnp:class>Orchester der Deutschen Oper Berlin, Eugen Jochum, Chor der Deutschen Oper B<\\/dc:creator>Orff: Carmina Burana<\\/upnp:album><\\/item><\\/DIDL-Lite>"}

****I note that the problems seem to occur with what I suppose are the more obscure tracks, which is to say mostly classical. My other tastes seem to be mostly satisfied (old rock, some country, some new age).

Thanks for checking into this, I appreciate the work you all do,

-Will

2 Likes

Been Playing around with premium album art and notice many times the album art isnt passed thru on Sonos via Hubitat. Any ideas?


image

Hey @Greg_Cole I merged your post into a related thread. See the quote below for a bit of detail on how the Album Art Tile works. In particular, we aren’t provided the full URL to the album art from Hubitat’s Sonos driver, so we have to search for album art online.

If you could provide the details noted below that would help us see if there are any improvements that could be made.

Looking at your screenshot, it seems like even the metadata that Hubitat’s Sonos device driver is reporting is coming in odd which may be why it couldn’t find a proper match when it searched for the album art.

Josh - it feels it has gotten worse since the latest Sonos update (Ver 10.5.1). I can’t find any documentation showing that Sonos has made any changes recently on how or if the Metadata format has changed. I did notice with the latest Sonos update I had to go refresh all the speakers in HE to even get them to work.

FWIW - I just took advantage of the cyber Monday sale and upgraded to premium…couldn’t wait to try out the new Album art but it doesn’t appear to be working with my Tune-In stations streams I have setup with Hubitat. Any thoughts? Screenshot below.

Can you share the details of the trackData attribute while playing a TuneIn station as noted in the quote below?

trackData : {"audioSource":"Radio Stream","station":"WONE-FM","name":"Black Sabbath - Iron Man","artist":"Steve Hammond","album":null,"trackNumber":null,"status":"playing","level":"15","mute":"unmuted","uri":"aac://http://17553.live.streamtheworld.com:80/WONEFMAAC_SC?TGT=TuneIn&ttag=Sonos&DIST=TuneIn&ua=Sonos","trackUri":"aac://http://17553.live.streamtheworld.com:80/WONEFMAAC_SC?TGT=TuneIn&ttag=Sonos&DIST=TuneIn&ua=Sonos","transportUri":"x-sonosapi-stream:s21758?sid=254&flags=8224&sn=0","enqueuedUri":"x-sonosapi-stream:s21758?sid=254&flags=8224&sn=0","metaData":"WONE-FM<\\/dc:title>object.item.audioItem.audioBroadcast<\\/upnp:class>SA_RINCON65031_<\\/desc><\\/item><\\/DIDL-Lite>","trackMetaData":"x-sonosapi-stream:s21758?sid=254&flags=8224&sn=0<\\/res>Black Sabbath - Iron Man<\\/r:streamContent>Steve Hammond,p1154577<\\/r:radioShowMd>\\/getaa?s=1&u=x-sonosapi-stream%3as21758%3fsid%3d254%26flags%3d8224%26sn%3d0<\\/upnp:albumArtURI>x-sonosapi-stream:s21758?sid=254&flags=8224&sn=0<\\/dc:title>object.item<\\/upnp:class><\\/item><\\/DIDL-Lite>"}

Here’s a quick example…seems at least on this Tune-In station that the name of the song and artist are combined in the same field and the DJ is labeled as artist…I’ll see if I can find another one and see if it’s the same.

and another…same scenario:

trackData : {"audioSource":"Unknown","station":"Mix 94.1","name":"ADELE - SET FIRE TO THE RAIN","artist":"Sarah Quinn","album":null,"trackNumber":"1","status":"playing","level":"15","mute":"unmuted","uri":"x-sonosapi-stream:s29240?sid=254&flags=8224&sn=0","trackUri":"aac://https://prod-54-202-182-73.wostreaming.net/alphacorporate-whbcfmaac-ibc4?session-id=aa0584fcd02ceb3b2d35eb8c7808b61c&source=TuneIn","transportUri":"x-sonosapi-stream:s29240?sid=254&flags=8224&sn=0","enqueuedUri":"x-sonosapi-stream:s29240?sid=254&flags=8224&sn=0","metaData":"Mix 94.1<\\/dc:title>object.item.audioItem.audioBroadcast<\\/upnp:class>SA_RINCON65031_<\\/desc><\\/item><\\/DIDL-Lite>","trackMetaData":"x-sonosapi-stream:s29240?sid=254&flags=8224&sn=0<\\/res>ADELE - SET FIRE TO THE RAIN<\\/r:streamContent>Sarah Quinn,p1208371<\\/r:radioShowMd>\\/getaa?s=1&u=x-sonosapi-stream%3as29240%3fsid%3d254%26flags%3d8224%26sn%3d0<\\/upnp:albumArtURI>x-sonosapi-stream:s29240?sid=254&flags=8224&sn=0<\\/dc:title>object.item<\\/upnp:class><\\/item><\\/DIDL-Lite>"}
1 Like

It’s been a while since I used the dashboard with album art for my Echo speaker. The album art used to appear, but no longer does. I get the headphone icon and the four bars in the lower-left corner - but no album art.

Any idea of what I’ve done to mess up a (formerly) perfectly good dashboard?

Hi @Stan_Silverman, can you verify in Hubitat if audioTrackData attribute’s value is updated for your echo device when you play music? If so, can you verify if its value is synced to SharpTools by going to Authorized Location → tap ... next to your location and select the echo device, and find the audioTrackData attribute?

If all were updated as expected, can you please post (or pm me) the audioTrackData value so we can take a look? I am wondering if it was caused by the Echo Speaks smart app/server not reporting the attribute value to Hubitat, and then SharpTools or the album art image couldn’t be found.

James, the audioTrackData attribute is not being updated. It shows as a pair of braces {} in both hubitat and SharpTools, and the timestamp is weeks ago, when I last used it.

Just rebooted the Echo device, No joy.

Stan

It looks like the issue was coming from Echo Speaks, and I’d probably suggest you to check the Echo Speaks server as the first step, and go through the setup process to make sure the Echo Speaks is working properly. See the guide in the link below for more details.

Thanks. I went through the Echo Speaks setup again. Of course that created second instances of the app and drivers. I don’t know which set is being used - or know how to change them - so my thought is to delete everything from hubitat and start from scratch. Or perhaps I should give the hubitat community a chance to weigh in.

I have another dashboard that displays two Echo devices side-by-side. In addition to the one unresponsive device mentioned above, the other device displays album art when the first track is played, but never changes afterward.

Weird stuff. Especially considering it all worked before!

Hi @Stan, you may want to verify the device/smartapp creation or the last modified time to determine which set was created before, and start from there. And don’t forget to check if there was additional server instance created in Heroku. Assuming you are using the free Heroku tier, you don’t want to consume your free dyno hours.

When you say the album art works for you for the first track, did you wait a bit to check if the image changed after the song changed? I sometimes noticed the image didn’t get updated until a few moments later due to the audioTrackData delayed updated in SmartThings.

Thanks, James. I do believe there’s another Heroko instance. Will check.

Not only waited a bit, waited lots of them. About a half-hour’s worth…

Update: James, do you know a way to delete a Heroko build? There are two in my account - as suspected.

You can delete the Heroku instance by clicking on that instance in your Heroku dashboard → “settings” at top → and scroll down to the bottom and hit “delete”.

Delete option is at the bottom.
image