Plex binding cover

Followed the binding wiki and managed to get some data working well when playing.

But I thought for giggles if might be nice to have the playing cover showing.

The Example has
String PlexTVCover “Cover” {plex=“playerid#playback/cover”}

I switched this to:
String chrome_tvcover “Cover [%s]”
In the hope I could see the URL

But nothing comes out.

I assume for the sitemap I can just use:
Image chrome_tvcover? Or do I need to use Image url=chrome_tvcover

Any update to this? I’m looking to do the same thing and using the following syntax in item file

String PlexTVCover "Cover" {plex="playerid#playback/cover"}

and the following in the sitemap

Image item=PlexTVCover visibility=[PlexTVStatus!="Stopped"]

but it doesn’t work

Should I be using something like this?

Image item=PlexTVCover url=PlexTVCover visibility=[PlexTVStatus!="Stopped"]

or even

Image url=PlexTVCover visibility=[PlexTVStatus!="Stopped"]


I got the same problem. I am using openhab2 beta4 and the 1.8.3 plex binding.

However i tried the SNAPSHOT Version of the plex binding from here

This will fetch the Cover URL correctly.

Can you please share some more details about your setup to get the cover url? I have the following:

String PlexTVCover "Cover [%s] " {plex=“6ee97b0c02d52626-com-plexapp-android#playback/cover”}

Sitemap: Just trying to see the URL
Text item=PlexTVCover visibility=[PlexTVStatus!=“Stopped”]

I get a blank line in my sitemap with the label Cover.

Did you use the Snapshot Version of the Binding?

Sorry. Yes, I’ve tried both the most recent snapshot and the 1.8.3 binding.

Are you using the IP of the Plex Server or the DNS Name? For me the binding works only with the DNS Name.

I tried localhost, and the dynamic dns address that I have set up. None of those worked but using the address that is assigned by my router lets all the other functions of the binding work except getting the cover url. I did have to add to the list of IPs that can bypass authentication in Plex. Just to be clear Plex and OpenHAB run on the same PC so I expected localhost to work.


I’ve managed to get a cover URL in the String item, but the only way to use it (as far as I know) is making a web page with javascript that will retrieve URL from the item, insert it in the img object on the web page and then display that web page in the Webview widget. I’ve tried that approach, but it doesn’t look nice, so I’ve ditched it. Regarding the information I’ve found on this forum and OpenHAB github, there is no way to use dynamic URL for the Image or Webview widget (security issues), and you can’t replace static image once you open it (you need to restart OH server), so, I guess, the web page approach is the only one at the moment.

Best regards,

It is not ideal but the following should work too.

Image url=“http://localhost:8080/static/Plex_Cover.png” refresh=90000 visibility=[Plex_Status!=“Stopped”]

String Plex_Cover {plex=“xxxxx#playback/cover”}

rule "Download Plex cover "
Item Plex_Cover changed
executeCommandLine("wget -O /etc/openhab2/html/Plex_Cover.png " + Plex_Cover.state.toString)


As far as I’m aware, you can’t replace image file once OH lock it. You have to stop OH, replace the image, then start it again.

Best regards,

just tested on a PI3 with OH2 latest snapshot and it’s working. Web ui doesn’t refresh automatically (I think it is a known problem anyway) so you have to manually refresh in order to display a new cover.


Thank you for the information. I actually haven’t tried doing it from the rule, but I’ve tried simply replacing the file in Windows, and it wouldn’t let me do it. I’ll try your approach, because it looks much better to have the cover in Image widget, than displaying web page in Webview widget.

Best regards,

No openHAB/ESH UI currently does anything with the item= attribute on an Image widget in the sitemap, but it would be great to finally add support for string items providing the URL dynamically to the image to display. This would make the url= attribute optional. In ESH, there is a new Image item that is to contain raw image data, but I see potential issues tunnelling this through HTTP instead of using HTTP as the native transport.

I think both should be supported: Image item=StringItem would interpret the item’s state as a URL, but proxy the image through the server so it can be viewed everywhere that the current url= attribute does. Whenever the item’s state is changed or the refresh cycle has come around again, the image would update in the client. There are a few more bindings besides the Plex binding that could immediately benefit from this enhancement.

Image item=ImageItem would convey the raw image payload to the client as it changed, but would ignore the refresh= attribute as it would be meaningless.

There is some discussion here. Thoughts?

I just spent the best part of a day getting something to work and Rod’s ‘rules’ nearly worked but I’m on osx and no wget caused me no end of problems (until I found out no wget on osx). So instead this does work:

rule "DownloadPlexcover "
Item PlexPCover changed
executeCommandLine("curl -o /Users/richardjohn/openhab2/conf/html/Plex_Cover.png " + PlexPCover.state.toString

Now I just need to resize the image!

rule "Download Spotify Cover "
Item Spotify_urlCover changed
executeCommandLine("curl -O/LightEASY/conf/html/CoverSpoty.png " + Spotify_urlCover.state.toString)
but no work