Configuration as code / GitOps

Hi all,

Just a quick question if there is a less ClickOps-y way to export/change/import configuration?

Can be official or community provided, even if it's hacky.

The reason i ask is i have some setup that i did for one room and i need to replicate 99% of it for every room on every floor. The difference would be mainly names of sensors, devices, charts, etc, all following naming conventions.

To do this by hand clicking through the UI it would take me hours over days, and i can't imagine needing to make a single click change across all rooms.

Anythyng better?

1 Like

Can you explain further?

1 Like

Can you explain further?

Definitely. I have a main dashboard, and from it a dashboard for 9 rooms that are pretty identical:

  • each dashboard has a button to go back to the main dashboard at position 1/1
  • temp and humidity tiles
  • a chart to visualize the humidity over 24 hours
  • a chart to visualize the temp over 24 hours
  • etc.

Those charts (webcore) have a huge amount of configuration options, and if i want to make a single change, i have to go to every chart UI and make the change.

I am a software developer, so i am used to exporting all the configuration as files (json/yaml/regardless) and even commit them to a source code versioning tool like Git.

That kind of a flow would make my life a magnitude of orders easier, so i wonder how to achieve it. Say i export one temp chart, i just change the sensor names to the ones of a different room, change the chart title and import it in Hubitat as a second chart. Or clone it and instead of charting temp, change the sensor parameter to humidity.

So far i want to see what is in the DB backup, but that would be a big risk to touch.
And i actually found some export/import buttons on some Apps, so i plan to explore what they give me.

I was hoping there is a simple API i can just push some Hubitat native files to and have the config reloaded.

This is pretty much how Home Assistant works.

Hope this clarifies my goal.

2 Likes

I just found a thread where it was made clear that there is no wish to enable this kind of a workflow.

So, it is either gonna be:

  • option 1: storing some "json looking" files that can't be formatted as json and doing some form posts to clone/create rules, apps, etc;
  • option 2: making a custom framework on top of the UI that uses something like selenium to click through the UI and fill in some controls. For this one we should wait for the UI rework.

I really wonder if the developers of Hubitat still have a valid reason to hide the database schema or if that was some old design decision that is not worth going back on.

In any case, too bad for the end users, and i can imagine a pretty big "selling point" for Home Assistant, which is completely config driven.

Unless the decision is changed, i would look into option 2. In the meantime, i am curious if anyone can see other options i am not seeing?

I kind of doubt this is a sticking point for the vast majority of Hubitat users.

But I think I can understand why some users would find value in what you’re describing.

4 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.