[RELEASE] Conditional Image Server --> for dynamic dashboard background

Conditional Image Server
Serve different images from your Hubitat Elevation hub according to rules in Rule Machine

Example use cases:
Dynamic Dashboard Background
Set different background images for your smart home dashboard based upon device state, weather, holidays, location mode, or any other condition. For instance, set your dashboard background to a rainy landscape or an umbrella when it's raining, to a sunny meadow when it's clear skies, a Christmas tree on Christmas, a birthday cake on your birthday, etc.
Custom Icon Tile
Use completely custom icons for displaying device state, location mode, etc. For example, use an icon of an open garage door when your garage door is open and use an icon of a closed garage door when your garage door is closed. No need to display redundant “open” or “closed” text like some dashboards force, so your dashboard can be cleaner yet convey just as much info.

Supported Image Types

  1. JPG
  2. SVG
  3. PNG
  4. GIF

Install Instructions

  1. Install Conditional Image Server app and Dynamic Image URL Device driver, either manually or via Hubitat Package Manager
  2. Enable OAth if installed manually
  3. Configure different URLs with different images, e.g., by uploading different images to gitHub or some other image repository accessible via URLs
  4. Within the app, select to use the included custom device or a Rule Machine Global Variable Connector
  5. Set up rules in Rule Machine that set the value of the custom device or a Global Variable Connector to different ones of the configured URLs under different conditions
  6. Point your dashboard background, image tile, etc. to the local URL in the Conditional Image Server app. Your different images will dynamically load from this single URL under the different conditions you established in Rule Machine.

URL Requirements
The URLs should have a file extension, like .jpg, at the end, so that the app knows how to render the image. If the URL does NOT have a file extension, the app renders it as a jpg image by default.

Local Only
Note this only works locally. Hubitat does not currently support rendering of images at a cloud endpoint for remote access.


Thanks to dman2306 for the help getting jpg rendering code right!


Wow, nice. Great job!
Please get your app in HPM!


I about did but realized it wasn’t really a “package” since it is a standalone app. Guess you are suggesting it is appropriate nonetheless?

Although it occurs to me now that another option would be to create a custom device within the app and then it would be a package. Would make install simpler at the expense of another driver. Any thoughts on whether it would be preferred to use global variable connector or custom device?

yeah, it makes it easier for the user to track any changes made, update it, even find it in the first place etc. I do appreciate it's a bit of work to include into HPM but I think definitely worth it, although of course it is up to you as the developer! :slight_smile:

Anything that makes set-up and speed better is preferred. I guess a custom driver would be best but I'm not that qualified to say to be honest. Maybe others will chip in on this...

Not much, really, from my perspective. Wasn't hard with my Rachio Community app. Worth the benefits.

omg i love this idea.

I still havent setup my tablet dashboard with Hubitat 3 months later. But when I do, I'm gonna use this alot!

1 Like

btw, you should create a manifest and get this listed in the Hubitat Package Manager

I will. Especially if I decide to go the custom device route. What's your preference between using a global variable connector vs. a custom device?

Well like I said I have only played with the Dashboard stuff so far, so I dont know all the in's and outs.

However as I understand it a custom device might give flexibility because you could use the Tile templates with properties of the device? Like I'm imagining a custom device with multiple URL's and a title that can cycle through them.

But again I'm guessing at functionality, and that would probably be alot more work.

IMHO custom device is easier for new user to understand and deploy. If you want the app to be extra users friendly custom device. If you want the app to to super duper user friendly, make either an option.

Nice work!

The new version does this. It also supports PNG and SVG file types

1 Like

App is in HPM


Sweet job Justin, thank you.

Hi - this looks very interesting and I was able to get it installed via HPM. I looked through Rule machine but nothing appears to have changed.

Can you please post an example of how to use it?

Thanks! :slight_smile:

The app doesn't change anything in Rule Machine, so not sure what you mean by this. If you select to store the URL in a custom device, use Rule Machine to access that custom device.

If you select to store the URL in a Global Connector, create the Global Connector in Rule Machine. See here for more info on that. Then open the app and select that created Global Connector from the dropdown menu, and then use Rule Machine to change the value of the Global Connector under different conditions.

So in the Conditional Image Server it will look like this:

And in Rule Machine it will look like this:

Then just set up rules in Rule Machine to change the value of the Global Connector however you'd like

1 Like

@JustinL its going to feel like I'm bombarding you today with questions on different threads ! Sorry wasn't targeting, just happened to be working on apps you have made. I have struck out a second time.
Getting the following in the logs:

It seems to pickup the right image based on RM. I'm using a Dynamic URL device

Edit: I'm storing the URL's on my hubitat. If that is not a good idea please let me know.

Hmm. I don't know. I haven't tried that. Does it work if you store the image elsewhere, with say a normal URL on the internet?

Normal internet URL


Also tried using global variable connectors. Same issue.

Is anyone else having the same issue of receiving a “Bad Request” in the log?