# Configuration of openHAB

**URL:** <https://community.openhab.org/t/configuration-of-openhab/64682>\
**Category:** Development\
**Created:** [January 18, 2019, 2:20pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682 "2019-01-18T14:20:53Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [January 21, 2019, 9:48am UTC](https://community.openhab.org/t/configuration-of-openhab/64682/41 "2019-01-21T09:48:21Z")

</div>

> [@Spaceman\_Spiff](#):
>
> these are the users that drive developement and contribute to the project.

Clearly … no. Speak for yourself, but it’s ~~foo~~ nonsense that power-users=text-users.

> [@Spaceman\_Spiff](#):
>
> Why not use a similar configuration system?

Diversity. Nobody stops you from leaving openHAB and start using Home Assistant 😉 You are really here just because of ZWave. Sigh.

> [@Spaceman\_Spiff](#):
>
> Yes - I was talking about the gui that is used to display values and interact with openhab.

Now I get you. Please use proper terms. I was talking about [Next generation design: A Paper UI replacement proposal](https://community.openhab.org/t/next-generation-design-paper-ui-design-study/64930), so the maintenance GUI. And you are talking about Habpanel. Please contribute to Habpanel then with your ideas, this is the wrong topic.

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [January 21, 2019, 9:51am UTC](https://community.openhab.org/t/configuration-of-openhab/64682/42 "2019-01-21T09:51:59Z")

</div>

> [@David\_Graeff](#):
>
> but it’s foo that power-users=text-users.

foo? Do you mean true?  
Not all… I use the paperUI exclusively to manage my things. It’s pretty much error proof and you can’t mess up the syntax. Once a thing is created and online there is no need to fiddle with it so it’s a one time job.

I, of course use text for items and rules because there are no real alternatives yet.

---

<div class="post-metadata">

**Author:** ![Spaceman\_Spiff](https://community.openhab.org/user_avatar/community.openhab.org/spaceman_spiff/32/56883_2.png) [@Spaceman\_Spiff](https://community.openhab.org/u/Spaceman_Spiff)\
**Post date:** [January 21, 2019, 9:53am UTC](https://community.openhab.org/t/configuration-of-openhab/64682/43 "2019-01-21T09:53:54Z")

</div>

> [@David\_Graeff](#):
>
> Speak for yourself, but it’s foo that power-users=text-users.

In every thread about UI there are users with many items which ask for textual configuration.

> [@David\_Graeff](#):
>
> Diversity.

So let’s just be different just for the sake of being different?  
I would have at least expected some logical or technical reasons.

---

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [January 21, 2019, 9:55am UTC](https://community.openhab.org/t/configuration-of-openhab/64682/44 "2019-01-21T09:55:08Z")

</div>

> [@Spaceman\_Spiff](#):
>
> In every thread about UI there are users with many items which ask for textual configuration.

Because our documentation ONLY shows textual configuration because Paper UI was a total mess. If there’s a actual good UI nobody will ever ask for textual files again. Pretty sure.

> [@Spaceman\_Spiff](#):
>
> So let’s just be different just for the sake of being different?  
> I would have at least expected some logical or technical reasons.

No you misunderstood. OH decided to do it like it is doing it now, and it would be a huge effort to turn that around. And just for the sake of HA uses it that we should use YAML as well is also not exactly fruitful. They have their own problems with YAML if you skim through the developer forum.

---

<div class="post-metadata">

**Author:** ![Spaceman\_Spiff](https://community.openhab.org/user_avatar/community.openhab.org/spaceman_spiff/32/56883_2.png) [@Spaceman\_Spiff](https://community.openhab.org/u/Spaceman_Spiff)\
**Post date:** [January 21, 2019, 10:05am UTC](https://community.openhab.org/t/configuration-of-openhab/64682/45 "2019-01-21T10:05:04Z")

</div>

> [@David\_Graeff](#):
>
> Because our documentation ONLY shows textual configuration because Paper UI was a total mess. If there’s a actual good UI nobody will ever ask for textual files again. Pretty sure.

If you have to manage multiple openhab instances and have transfer things/items from one to another without transferring the whole config textual is still the way to go.  
Textual configuration provides flexibility because it can be distributed and modified very easy.  
Everything can created without the need for the openhab instance.

> [@David\_Graeff](#):
>
> OH decided to do it like it is doing it now, and it would be a huge effort to turn that around. And just for the sake of HA uses it that we should use YAML as well is also not exactly fruitful

That was never the reason nor the intention. It is a possible (future) solution to the given problem and I think a good one. It provides flexibility and everything discussed so far can achieved with it.

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [January 21, 2019, 3:08pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/46 "2019-01-21T15:08:14Z")

</div>

> [@Spaceman\_Spiff](#):
>
> The cron discussion should be postponed. I see little benefit in making creation of rules available through the UI.

Except new users are demanding it. Despite the “Experimental” in the name, new users are using it. The demand for this is high.

But it won’t be fine at the expense of JSR223. It will become the new default replacement for Rules DSL.

> [@Spaceman\_Spiff](#):
>
> A proper (optional) integration of third-party rule engines like Node-Red would be less difficult and less time consuming.

We already have this and it is used by some. OpenHABian will install NodeRed and there is a fully functional NodeRed node for openHAB. But I think outsourcing something as vital as Rules would be very much to the detriment of OH. We’re I starting fresh, I pick something else besides OH if it required instalation and configuration of since other service to implement automatons.

> [@Spaceman\_Spiff](#):
>
> Why not serialize configurations through the gui into one big yaml file

If you read the thread I linked to above you will see that is pretty much the consensus. Except instead of watching the file have a manual trigger to import or export so we have more contril over how they get loaded.

> [@Spaceman\_Spiff](#):
>
> This way everyone should be happy:

Also don’t forget that we need a migration path so users can switch from GUI to text and back without starting over.

> [@Spaceman\_Spiff](#):
>
> Yes - I was talking about the gui that is used to display values and interact with openhab. For me configuration and display/using are two different things. On the Tablet in the living room I don’t need to configure my instance - there I want a nice, fancy layout I can configure to my needs.

Right, for now we have PaperUI for configuration and administration and for display we have sitemap based UIs, habpanal, and Habot. It sounds like you are proposing what we already have.

> [@Spaceman\_Spiff](#):
>
> and these are the users that drive developement and contribute to the project.

So e should ignore me users and less technically skilled users?

> [@David\_Graeff](#):
>
> nonsense that power-users=text-users.

I can concur. Many of not most of the most active contrubutors on the forum use the UIs almost exclusively due Things. I’d use it for Items too if the UI were complete. And when the NGRE matures I’ll use the UIs for Rules.

But nowhere are we saying that we don’t want to accomodate those who prefer text.

> [@David\_Graeff](#):
>
> If there’s a actual good UI nobody will ever ask for textual files again. Pretty sure.

I don’t know about that much. There are reasons such as source control that will make some users airways want the option. As discussed on that other thread, if the db file changes the order when it saves things the history will become mangled and unusable.

---

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [January 21, 2019, 4:30pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/47 "2019-01-21T16:30:57Z")

</div>

> [@rlkoshak](#):
>
> As discussed on that other thread, if the db file changes the order when it saves things the history will become mangled and unusable.

Yeah true. I came to the conclusion that the internal JsonDB is not suitable for backups. I imagine to have a backup service in OH3 that exports to yaml (or whatever we have settled for by then) with a stable order, suitable for revision control. And that is also used for to trigger imports and restores.

---

<div class="post-metadata">

**Author:** ![Spaceman\_Spiff](https://community.openhab.org/user_avatar/community.openhab.org/spaceman_spiff/32/56883_2.png) [@Spaceman\_Spiff](https://community.openhab.org/u/Spaceman_Spiff)\
**Post date:** [January 21, 2019, 5:18pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/48 "2019-01-21T17:18:31Z")

</div>

> [@rlkoshak](#):
>
> Right, for now we have PaperUI for configuration and administration and for display we have sitemap based UIs, habpanal, and Habot. It sounds like you are proposing what we already have.

No - since there is no possibility to freely create complex layouts in the sitemaps and there is no possibility to create custom widgets. This is what I was trying to say with my HomeAssistant example:  
Users can create, use and configure widgets using the existing configuration syntax.

> [@rlkoshak](#):
>
> But nowhere are we saying that we don’t want to accomodate those who prefer text.

It may not be intentionally but It sure feels that way since openhab2.

> [@rlkoshak](#):
>
> So e should ignore me users and less technically skilled users?

I never said that. I acknowledge and support gui based configuration **if everything** that is available in the gui is possible through some clean, textual configuration.

> [@David\_Graeff](#):
>
> I imagine to have a backup service in OH3 that exports to yaml (or whatever we have settled for by then) with a stable order, suitable for revision control. And that is also used for to trigger imports and restores.

So why the need for the import/export and not serialize directly from/into the files?  
I had two far openhab instances running which synced their configuration through my cloud service. It was nice and easy to configure and run them from my machine at home. I hat no access to the gui or the machine but once it was set up it still worked flawlessly. There should be at least the option to watch for file changes (and may it only be in the central config file).

---

<div class="post-metadata">

**Author:** ![hakan](https://community.openhab.org/user_avatar/community.openhab.org/hakan/32/70815_2.png) [@hakan](https://community.openhab.org/u/hakan)\
**Post date:** [January 21, 2019, 6:06pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/49 "2019-01-21T18:06:27Z")

</div>

> [@David\_Graeff](#):
>
> If there’s a actual good UI nobody will ever ask for textual files again. Pretty sure.

Really? Could we at least agree to disagree?

---

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [January 21, 2019, 6:21pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/50 "2019-01-21T18:21:34Z")

</div>

> [@hakan](#):
>
> Really? Could we at least agree to disagree?

Hm, why do you need textual files? I mean real files on a filesystem. You probably have seen the Paper UI design study already. If you assume that would be the status quo.

---

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [January 21, 2019, 6:25pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/51 "2019-01-21T18:25:34Z")

</div>

> [@Spaceman\_Spiff](#):
>
> So why the need for the import/export and not serialize directly from/into the files?

Because openHAB internally uses a json based database and that is not going away any soon as it is not even two years old by now. And people don’t like that json file at all, why do you think they like yaml better. There is a longer heated discussion about this topic existing.

> [@Spaceman\_Spiff](#):
>
> There should be at least the option to watch for file changes

Please see that mentioned discussion with a lot of technical background why that is a bad idea.

---

<div class="post-metadata">

**Author:** ![mhilbush](https://community.openhab.org/user_avatar/community.openhab.org/mhilbush/32/56108_2.png) [@mhilbush](https://community.openhab.org/u/mhilbush)\
**Post date:** [January 21, 2019, 6:25pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/52 "2019-01-21T18:25:42Z")

</div>

> [@David\_Graeff](#):
>
> Hm, why do you need textual files?

I’ll chime in here…

In my case, I have multiple openHAB installations that share some of the same technologies. As a consequence, I often copy snippets of things, items, rules, sitemaps, services, transforms, etc. files between the installations. And, I like the fact that I can track/manage all my changes using VS Code and Git.

---

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [January 21, 2019, 6:27pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/53 "2019-01-21T18:27:09Z")

</div>

> [@mhilbush](#):
>
> I can track/manage all my changes using VS Code and Git.

But you have read about the import/export functionality that I mentioned above? In contrast to the status quo you would need to trigger an import/export, everything else is really like now. Please also read the mentioned discussion, because we are repeating ourselves here.

---

<div class="post-metadata">

**Author:** ![mhilbush](https://community.openhab.org/user_avatar/community.openhab.org/mhilbush/32/56108_2.png) [@mhilbush](https://community.openhab.org/u/mhilbush)\
**Post date:** [January 21, 2019, 6:34pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/54 "2019-01-21T18:34:22Z")

</div>

> [@David\_Graeff](#):
>
> because we are repeating ourselves here.

Sorry, I was simply responding to your recent post that suggests you still don’t see value in textual files.

> [@David\_Graeff](#):
>
> have read about the import/export functionality that I mentioned above

Yes, I did. From my perspective, those are just extra steps that I don’t have today.

---

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [January 21, 2019, 6:38pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/55 "2019-01-21T18:38:24Z")

</div>

> [@mhilbush](#):
>
> those are just extra steps that I don’t have today.

But when do you push your changed item/thing files? Isn’t that done manually or by a cron trigger or so. You would just need to add a `openhab-cli export` command. Is that really much more?

---

<div class="post-metadata">

**Author:** ![hakan](https://community.openhab.org/user_avatar/community.openhab.org/hakan/32/70815_2.png) [@hakan](https://community.openhab.org/u/hakan)\
**Post date:** [January 21, 2019, 6:45pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/56 "2019-01-21T18:45:56Z")

</div>

> [@David\_Graeff](#):
>
> Hm, why do you need textual files? I mean real files on a filesystem.

Keeping things compartementalized. And migration between deployments. And development. Basically what I already said at [Next generation design : Ideas & Discussions - #7 by hakan](https://community.openhab.org/t/next-generation-design-ideas-discussions/62575/7) on January 6th

> [@David\_Graeff](#):
>
> You probably have seen the Paper UI design study already.

Yes, I did. And it did more to convince me even more that text configurability is a sine qua non. I’ll comment my reasonings about it on that thread.

---

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [January 21, 2019, 6:49pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/57 "2019-01-21T18:49:05Z")

</div>

> [@hakan](#):
>
> that text configurability is a sine qua non

But this is not going away, there is just an import/export trigger mechanism on top of what there is now. Just from the technical aspect: You cannot have two sources of truth, that always leads to a disaster.

Because you don’t use the UI, you probably just haven’t seen all those 409-conflict errors that occur because of that exact problem.

I kind of like that you, in the mentioned post, absolutely dislike the one huge json db file while @Spaceman_Spiff suggests one big yaml file. Funny.

---

<div class="post-metadata">

**Author:** ![hakan](https://community.openhab.org/user_avatar/community.openhab.org/hakan/32/70815_2.png) [@hakan](https://community.openhab.org/u/hakan)\
**Post date:** [January 21, 2019, 7:03pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/58 "2019-01-21T19:03:30Z")

</div>

> [@David\_Graeff](#):
>
> But this is not going away, there is just an import/export trigger mechanism on top of what there is now.

See, if you could give people confidence in that statement, I belive many of us would be happy and wait and see what you come up with. But with statements like “nobody will ever ask for textual files again” you trigger alarm signs. I don’t want to wake up one day and see a pull request merged that breaks things “that nobody will ever ask again”. Not even intentionally removing something but breaking because you consider it “not to be important anyway”. Your statements after the MQTT binding are what have left a conflicting taste, even though the software itself is a nice piece of engineering.

> [@David\_Graeff](#):
>
> Just from the technical aspect: You cannot have two sources of truth, that always leads to a disaster.

We did not meet in person, so allow me to state this via forum. And maybe someday over a beer. I do have 25 years of experience in building complex IT systems in the Telco and Financial industries. Systems a little bit more complex than our itty bitty openHAB installations. I do know many a thing about multiple sources of truth and resulting chaos.

> [@David\_Graeff](#):
>
> Because you don’t use the UI, you probably just haven’t seen all those 409-conflict errors that occur because of that exact problem.

Sorry, but you again assume too much. Yes, I use the UI too. Yes, I know about the 409 conflicts. And they are there for a reason. I know.

---

<div class="post-metadata">

**Author:** ![mhilbush](https://community.openhab.org/user_avatar/community.openhab.org/mhilbush/32/56108_2.png) [@mhilbush](https://community.openhab.org/u/mhilbush)\
**Post date:** [January 21, 2019, 7:05pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/59 "2019-01-21T19:05:55Z")

</div>

> [@David\_Graeff](#):
>
> But when do you push your changed item/thing files? Isn’t that done manually or by a cron trigger or so. You would just need to add a `openhab-cli export` command. Is that really much more?

I commit right from VS Code once I’m happy with the change. My commits are typically pretty granular (a few lines) unless I’m adding something entirely new, in which case it could be several to many dozen lines across multiple files.

---

<div class="post-metadata">

**Author:** ![David\_Graeff](https://community.openhab.org/user_avatar/community.openhab.org/david_graeff/32/61322_2.png) [@David\_Graeff](https://community.openhab.org/u/David_Graeff)\
**Post date:** [January 21, 2019, 7:11pm UTC](https://community.openhab.org/t/configuration-of-openhab/64682/60 "2019-01-21T19:11:26Z")

</div>

> [@hakan](#):
>
> Your statements after the MQTT binding are what have left a conflicting taste,

I like to provoke although I sometimes share the same opinion. For widening the discussion and idea flow and to find more alternatives to problems. We are on the same side though as I get from your last post.

> [@mhilbush](#):
>
> I commit right from VS Code once I’m happy with the change.

Hm ok. I really don’t know how to make you happy in that case 😕 Everything in openHAB core must go through the jsondb, that is our runtime database. For compatibility reasons the old .thing and .items files were kept when OH 2 was released, but all Things and Items are specially marked and are basically not editable from any of the newer means of OH like the console or REST API (for UIs and Apps). So those files and the file watcher really need to go, there is no way around it.

What we need to make you happy as well is to extend the VS extension to automatically trigger the import as soon as you push your changes (equals: you are happy with changes).

[Previous page](https://community.openhab.org/t/configuration-of-openhab/64682.md?page=2)

[Next page](https://community.openhab.org/t/configuration-of-openhab/64682.md?page=4)
