OH3 files or GUI

I just asked for help :frowning: My English is very bad, maybe that’s why I didn’t find the information I needed. I’m not aware that model building was available in OH2, maybe there were equipment and points, but I could not formulate the correct search request, sorry. Of course, before asking a question, I spent more than one hour searching for the information I needed and from hopelessness, asked for help. If you find it difficult to help me, ignore my question, there may be another person who can help me 

Thank you for understanding.

1 Like

Just to be preceise. Model Building is nothing special used in OH2. A model consist of tagged groups.

I.e. A Living room in the model ist a group called “Living room” with the tag “LivingRoom” and Groups and Tag are used in OH2 too.

If you like to learb modeling just try it in the ui and see waht happens and then try to build it with a file definition. The most complex parts is to catch all the ideas behind the model

You asked about groups and tags that are documented on the Items page. I answered on that basis. Sorry.

I am still trying to understand the current usefulness of semantic tags.

An argument for programming via the UI is for me, especially since 3.0, that everything can be done via “myopenHAB”. That works really well.
Of course we can also use VPN, but it works without creating a back door into the rest of the network.

You cannot add items there I thought.

Entities added through files are still accessible from myopenhab.

“Add Link to Item” and “create new Item” in things works her and “add new Item” also.

1 Like

OK. you can manage remotely then.

https://community.openhab.org/t/wiki-getting-started-with-oh3-rewriting-the-tutorial-6-model-your-home-with-items-link-channels/101008\

2 Likes

OK I have not used HABot

first link doesn’t open:
image
second, it looks like it is exactly what I was looking for, thanks a lot!

URL has added character. Here is the correct one.

Yes!
Better even, OH3 does no longer seem to recompile the rules when you change items that were in use in those rules, and even where it does, it’s blazingly fast.
If I’m not mistaken all of that is likely thanks to the next gen rules engine which replaced the old one as the default starting with OH3 (it was available before but not used for .rules files).

If you never ran on a RPi with rules taking on the order of 2-3 minutes to recompile, you cannot appreciate how much of an improvement that is !
(Hopefully my enthusiasm lasts, I haven’t tested much and am still wary of running into that situation again.)

Another plus I noticed is that items sourced from files (things, too? haven’t checked) are now marked with a lock icon in GUI so even to combine UI and files has become an option.
I still wouldn’t recommend to mix them except in special cases but it’s a lot safer/less prone to error to use now.

I did when I first started. When I hit the 7 minute mark to be fully loaded I decided it was time to move off the Pi.

1 Like

I now have a few new rules made in OH 3 UI and I like it a now. Thanks for the tip to copy the code from one rule to the other, it saves a lot of time.
In general, I think that the programming of the rules was solved very well and clearly.
My statement that less is possible here was based on my lack of understanding.

1 Like

Hi all,

before I start I have to give a big “Thanks” :ok_hand: to @ysc !!!
Just started playing around with OH3.0.0.M2 and the new MainUI is just awesome. Incredible work and IMO a big step for openhab.

I’m coming from a completely text-conf based setup in OH2.5. Never used PaperUI. I was always a big fan of a pure textual config because of different reasons like version control, speed of bulk modifications, structuring in different files and so
 Don’t won’t to start the dissucion about pros and cons here.

With the new UI I already switched all the service configs and things to MainUI. Only I’m not sure how to handle items :thinking:

The metadata configuration is so easy in the new UI
 love it


This is what I’m missing or just didn’t find yet. I found the option to bulk import items but no option to edit them later on. Is there a code view for items as for things or metadata (@ysc)??

And what’s about further bulk options besides deleting with the “Select” feature for items? Is there something planned like “add to Group” e.g.?

Maybe someone has some input to get my head around this.

1 Like

(edit: just realized you’re on Milestone 2 so most of what I said below is too recent and not available
)

You have 3 ways to access this screen:

  • the Items page, the blue “+” button has a “Add Items from Textual Definition”.
  • the Developer Tools menu, you have a shortcut there.
  • the Developer Sidebar (if you have screen wide enough to display it, >1280px): you open it from the Developer Tools or with Shift+Alt+D from anywhere, and you’ll find shortcut buttons to create new stuff on the last tab. “Add items (textual)” is the one you want.

Then you can paste chunks of your .items files to recreate the items in the internal DB. There is no equivalent for things.

Yes.
Although to bulk add items to groups you can also go to the group itself, under “Direct Group Members” you have a “Change” button. This will transform the list into a items picker, you check or uncheck items accordingly and click “Apply”. It will ask you to confirm.

By the way, in case you missed it, you can now Ctrl+click in lists where you have bulk operations available to switch to select mode (or back to normal if you uncheck everything). So you don’t have to reach that tiny Select button hidden in the corner anymore.

1 Like

You must do that on a list item, not the background of the frame though.

Thanks for your fast reply.

Maybe I was not clear enough
 I’m aware of this option and already used it. It is already there in M2. What I’m missing is a similar option for items already in JSONDB. If I edit a Thing I can use the Code tab to get the YAML representation of this thing and modify it there. This is what I couldn’t find for items.

Great :+1:

One of the challenges with Items is that there are actually three separate concepts involved which are all combined into one in .items files:

  • the Item definition which is everything up to the { } part
  • the Links to Channels/Profiles which are wholly managed separately
  • Item metadata which also is wholly managed separately and, unfortunately, the REST API makes it challenging to show all the metadata on a given Item.

So, even if there were a code view for the Item, it’s probably not going to contain everything you expect. You’d still have to create Links and modify metadata separately.

2 Likes

I saw a PR go by that allows regex style wildcards for metadata fetching. Not sure if that also applies to internal calls.