One little-recognized facet of images hosted by Google Docs (e.g. a graph of data from a spreadsheet, or a tabular list on Docs, or a doodle in Draw), is that they update with each client refresh. Imagine a background image that is “live” in this way, thus reflecting whatever it is you were charting back in Google Sheets?!
As long as it “really is” an img url, and not a bit of JS/HTML that is massaging the DOM to look like an image… if you are viewing this in a browser, a good way to check is right-click and see if you can Open Image in New Tab (as per how Chrome shows this below)… if you can’t do that / or if that doesn’t work, then the page/link you have open isn’t an IMG url (its probably dynamically generated in a browser)
Point well taken. For instance, here is such an image, coming straight from the “Publish to Web” feature of Google Drawings. Yet I cannot (without first downloading the static image and re-uploading it to your Discord server) get it to appear “live” here as I could on a served webpage. But isn’t a hubiVue background just that?
The link is:
The embed code is:
Thanks for providing a link and example.
I’ll look into this a let you know.
I tested the link and you are correct. It should have worked and doesn’t !?!?
Turns out there is a bug in the app whereby I limited (for reasons I cannot imagine why) the length of the string to 100 characters. It wasn’t working because the URL was cut off !!!
It works now in the next release…
Nicely done. Now, lemme go fiddle with the color/foreground of the (served) image, to see whether it updates in-place for your dash…
I didn’t have it loaded, but when I added it back, it updated. So try again and I’ll let you know as I’ll have it running for the next few hours.
Done. Is 3 the charm?
It fails to update, but then again the background images are cached locally, so that an online connection isn’t needed 100% of the time - so it would seem I need to look into how to check/update the content even though the url has not changed. I will check to see what is going wrong.
Okay - so I have added a cache max age - but what would be a reasonable time period to expire and recheck for a new image ? 1 hour ?
Actually, it is a little more challenging - if we expire cache in 1 hour, then your device will always be refreshing the background image every 1 hour !!
So, I’m now thinking I’ll make a change that only refreshes the background image when you successfully refresh the dashboard using the refresh button on the bottom menu…
Thoughts on that?
Tough call(s), as thus far I’ve just been discussing this entirely in theory (no dashboard set up to test anything on… yet). If you established a user-selectable “update image every __ hr/min/sec” then you let them set the parameters correctly of avoiding API call limits, server burden, etc.
It would be nice if Google Docs could somehow signal updates to one’s image, but knowing that will not happen, pulling from the client-side makes complete sense. One might elect to update, say, an energy usage graph hourly or daily; a kid’s lunch menu daily (but only on weekdays, lol); a list of House Modes as they change (this isn’t really an image element, though, is it? sorry); the possibilities are kinda endless.
PRO TIP: You run into the same “already loaded it” caching issue inside Google Spreadsheets all the time, when you pull JSON or XML date in through one of their fancy =XML() functions. My work-around on those is to append a made-up parameter at the end of the GET’s URL (e.g. &upd=C5) where ‘C5’ is a numeric cell that I (or some other process) update periodically. Whenever that cell updates, Google Sheets is forced to refresh the URL, thus pulling in the latest JSON/XML data, lol!
OK, back to business… I am going to update the graphic (manually, mind you!!) in mere seconds, so see if you don’t get a 4th rendition. But I shan’t touch it again until we speak again tomorrow. (I can only do this from PC, NOT FROM MOBILE, btw.)