Bluesound Art URI

Hi..

Can anyone help me?

I have made a driver for Bluesound which is helped by @tomw.

I made it like this.

def refresh()
{
    unschedule(refresh)
    
    def status = httpGetExec("Status")
    
    if(status)
    {
        events = [[:]]
        events += [name: "volume", value: status.volume.toInteger()]
        events += [name: "mute", value: (status.mute.toInteger() == 1) ? "muted" : "unmuted"]
        events += [name: "status", value: status.state]
        events += [name: "trackData", value: status.streamUrl]
        events += [name: "trackDescription", value: "${status.title1} - ${status.artist} - ${status.album}"]
        events += [name: "trackArt", value: status.currentImage]
        
        switch(status.inputId)
        {
            case "input4":
                events += [name: "MediaInputSource", value: "HDMI"]
                break
            case "Spotify":
                events += [name: "MediaInputSource", value: "Spotify"]
                break
            case "input5":
                events += [name: "MediaInputSource", value: "Bluetooth"]
                break
        }
        
        
        events.each
        {
            sendEvent(it)
        }        
    }
       
    
    runIn(refreshInterval ?: 60, refresh)
}

It works on Hubitat, but why when i connect on The Home Remote. The Album Art Uri is not working.

Can anyone help me?

thank you

Can you use some other image by URL? I think the issue is that it is not clear what format The Home Remote requires. If it needs raw image bytes that is going to require some more processing. But since the image works correctly on the Hubitat device page it seems the issue is formatting it for The Home Remote app. Do you have an example that does work correctly (some other image from the internet for example)?

@tomw If I copy and paste the url address in the browser, the image appears.

this is the url address that appears on Hubitat. https://i.scdn.co/image/ab67616d0000b2731d0f21a3ea7b55d7d9b2ab9f

here's a sample code I took from Bose. And it works on The Home Remote

if((null == np) || ([np.track, np.artist, np.album].contains(null)))
    {
        sendEvent(name: "trackDescription", value: "unknown")
    }
    else
    {
        sendEvent(name: "trackDescription", value: "${np.track} by ${np.artist} from ${np.album}")
    }
    
    if("IMAGE_PRESENT" == np.art.@artImageStatus.text())
    {
        sendEvent(name: "trackArt", value: "<img src=\"${np.art.text()}\">")
    }
    else
    {
        sendEvent(name: "trackArt", value: "unknown")
    }

Thank you @tomw for your reply.

The main difference I see is that the example in your Bose post includes HTML image tags, while the Bluesound code snippet seems to just have the URL directly.

Try this:

events += [name: "trackArt", value: "<img src=\"${status.currentImage}\">"]