Does Anyone Still Use Text-Based Items, Rules, and Things?

I don’t think Scripts have a way to change their tags though the UI. We can’t even get to a code tab for them.

Scripts have a way for this as well … I’m just not sure since when, I think I contributed that one day when I refactored the script setting into a component that can is reused.

I use the UI to create things.
For single items I also use the UI, but for multiple items I use the text based config. It feels much better than the UI, for example if I want to change the icon of all items. That is a pain in the UI.
My scripts are also in the text based config.
I would like to have a more integrative config: for example to convert UI config to GUI and vice versa.

Hi,
I joined this forum on the summer of 2019 to integrate KNX (lights and hvac) solution of the newly bought apartment at the time. Current OH version was 2 dot something I think.
Configured everything in files.
Got immediately addicted to the smart home, started purchasing and integrating many other Things :slight_smile:
Currently I have 65 Things (20 are exec binding commands, 45 “real” things), 352 Items and 106 rules (99% DSL).
My setup is a mix of text and UI, lets say 50% of Things are in text, because when OH3 came out, I started adding new stuff via UI.
Honestly, if there was a magic button “import text to ui” I would do it, but this way it looks like a tedious manual job of rediscovering, readding things and items that are already working. for sure something will go wrong and I won’t be able to add something without wasting the entire afternoon on troubleshooting. Sounds like looking for trouble :slight_smile:
So I just leave it be. (The good old don’t fix it if it ain’t broken)
I also did my semantic model on text file just out of habit, somehow writing it “on paper” made it more clear then UI :slight_smile:
Same story with rules, I would have to invest a massive amount of time to convert them.
I should force myself to start adding new rules in UI.
Same story with sitemap, I still use the old “ugly” sitemap, even though I have 80% of stuff configured in MainUI.
At least I migrated the sitemap to the MainUI, created new Page - > Sitemap and pasted my sitemap there, so it no longer resides in .sitemap file, but in internal OH database

This migration of stuff does not sound like a fun project at all :slight_smile:

When I catch some time for tech stuff, I always have higher priority tasks and projects, like upgrade openwrt routers/aps, upgrade oh version, upgrade some machine with old hardware to a new metal, integrate new stuff/develop new functionality/rule, pull the cable of the projector through the false ceiling etc etc…or other non tech stuff around the house.

Who knows, maybe in the years to come I will become so bored and with extra time on my hands (when kids get bigger and start slamming the doors in my face rather then asking for my attention) that I will end up doing it.

For Items you have Developer Tools → Add Items from Textual Definition. You can paste the contents of your .items files into that to import them into OH to become managed Items.

For Things, autodiscovery is usually the way to go. If they are not auto-discoverable Things (e.g. the Exec stuff) one approach you could use would be:

  1. Using the REST API query for a Thing and copy the JSON to the clip board
  2. Remove the Thing from the .thigns file
  3. From the REST API POST the JSON you saved to the clip board to recreate the Thing
  4. Repeat 1-3 as often and when ever desired until your Things are migrated.

It might be easier to past the JSON and edit it and rePOST to create the Things if they are all very similar and all you need to do is change the command or something like that.

And of course leaving them as is is good too. I just don’t want you to be afraid of importing stuff becuase it’s not as hard as it seems. Items can be done exaclty as you did with sitemaps. Things take a little more work and need to be done one-by-one but it’s not super hard. In both cases it’s just copy and paste.

If you take a backup, if you run into trouble then cut your losees and restore the backup. Don’;t spend a whole afternoon on it. You can spend 10-15 minute on it at a time and know you are always just a minute or two away from being back to where you started.

I always encourage trying stuff out over being afraid to mess with it for fear of messing up. You learn a lot more that way.

This is 100% my recommendation. You don’t have to change the rules you’ve already written. But it is well worth the effort to learn any one of the other options going forward with new rules.

Why do the semantic model if not using MainUI? It has some minor uses in rules but otherwise doesn’t do much for you if not using the Overview tabs of MainUI.

That’s great info, I was convinced I’ll have to get them discovered again, but If I can shove them all in by copy paste the json, sounds painless, I prefer to do it even for discoverable items

I created the semantic model to start configuring mainUI overview page, and then stopped after getting all the lights, hvac and sensors (for which semantic did most of the job)
So, the stuff I need to recreate “manually” is all the multimedia controls.
Basically spend few hours in picking the nice widgets from the store (or marketplace, whatever its called) and configuring all the stuff I need
That “project” will probably be expedited when I install some screen on the wall…I just cannot have the old sitemap displayed on the wall :slight_smile:

I like the text files from the very beginning of OH for: items, transformation mapping, binding config, rules and only few scripts

Why ?
Because somehow at least the items just had to get the linking replaced (channel notation) and I managed to upgrade from the legacy to the most recent major versions whithout starting from scratch (at least for items and only adjustments in the rule files).

The part which worried me most has been addressed meanwhile: The mad DSL implementation for time/date conversion.

I’ve only picked a few bits from each thing (Homematic, Hue, Shelly, and other) and that’s been in place with marginal adjustments or extensions.
Building on text config and only add minimal extra time to adjust.

If the OH maintainers keep this OH engine in a state that allows the users to only spend minimal time to upgrade, you will have a growing base of users.

So if I find a way to add, link and automate things in a simple way and that effort would then pay off by unbroken operation from major version upgrades:
That’s how I would like to maintain my OH automation!

OH should simply do it’s job and I don’t want to spend too much time on updates/upgrades or spend hours re-reading docs or this forum to gather understanding of how it’s supposed to solve specific tasks.

1 Like

I still use DSL rules. Everything else is ui based.
It makes life easier using the UI.
If I had time and inclination to move rules and learn how, I probably would.