Announcement

Collapse
No announcement yet.

Setting a device to refresh it's status graphic?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Setting a device to refresh it's status graphic?

    I've got a Heos script which I use to interface with to my NuVo system, and I've recently been working on adding cover-art support. Downloading the graphics file to the Image directory is very straightforward, but I'm hoping there's a simple way to automatically refresh the status graphic on my image device. So far, if I download and convert the Cover Art to a single known file called "NowPlaying.jpg", the image on the home device screen will not update with the new image, but instead retains the old cached image, until I do a browser page refresh.

    I've tried resetting and then setting the DeviceString to the proper "<img>" tag on disk, and I've also tried refitting the device to work as a control, and setting the DeviceValueByRef. In each case, it will only call up the first downloaded image, which will then be cached in the browser window. When the image changes on disk, the image on the Home Devices screen remains the original cached image. When I reload the devices in the browser, the new image shows up.

    Is there an image html "expire" attribute I can set, or a series of script commands I can use, which will cause the status graphic to be updated with each new image download, without manually refreshing? I know I can probably just create a new file for each downloaded CoverArt file, and set the DeviceString with a new and unique <img> tag, but I was hoping there was a method which did not result in a proliferation of orphaned graphics files on disk, which I'll have to clean up later. Am I missing something simple?
Working...
X