openHAB3: First Feedback on editing entities

Today i worked with the new UI that looks very nice. I created a group structure and started to add things and items to have a basic setup to try the new pages feature.

While editing i found the following topics:

  • It is not possible to change the name of an entity. If there is a typo, you have delete the entity and start over
  • I am missing a duplicate entity button - Yes i know i can do that with the REST api, but using an editor i am able to use copy & paste. So i am missing that feature
  • I do not understand the edit button concept. Sometimes i need to click on ā€œEditā€ some times not. What is the logic behind that?
  • When i setup the model the system iterates every time downward. Typically i would work on the same level first and then go down. Example: Created a living room on the groundfloor, next step would be creating a kitchen on the gound floor and than a bathroom. Currently the editor stay on living room and if i press addlocation than a location in the living room is created. Is it only me who has this workstyle?

Thats enough for today in general it works fine, but i am not sure if i will move from config files over to ui based configuration

I have run into this as well. Instead of deleting and recreating you can simply edit the parent group.

Didnā€™t get this. If a typo is in an Entities name the only way is to create it new or did i miss something?

I was talking about the topology. If you named the entity wrong, you need to delete and recreate it. Only workaround I can imagine ist to stop openhab and fix the typo in the databaseā€¦ It should be editable as nowadays.

1 Like

Gave it another thought. I think there is no rename endpoint for items or things in REST API today,ā€¦

1 Like

In paper ui it is working :slight_smile:

Hm, then there was some kind of a workaround in PaperUI. I just checked, there is no rename endpoint in REST API.

@ysc is there a chance to adopt the rename functionality from PaperyUI to MainUI?

Where did you find it in PaperUI, I only see the possibility to change the label and some config parameters. This can be done in MainUI as well. Wenn entering edit mode for an entity, the label field is editable.

Just create an item or try it with a thing created in paper ui

Nope, just created a testitem in PaperUi. When entering edit mode, I am not allowed to edit the name, just the label.

Sorry, you are right the wording between label and name is a little bit confusing.

At the end i think this is a problem compared to textual configuration

No, has nothing to do with textual config.
Renaming an entity (in both worlds) would need some steps:

  • read complete entity configuration (links, metadata, ā€¦) and store it somewhere
  • delete all entity config (links etcā€¦)
  • create a new entity with the stored config and new nameā€¦

This is just a rough description of the needed workflow.

1 Like

You are right. The big difference ist within the textual configuration you just change the name and save the file and the rest is done by the system. In UI configuration i have to delete the entity with all the other values and create it from scratch. This is the name, the label, the icon, group assignments, ā€¦ this could be a lot of things

1 Like

Another question: How do i assign persistence to an item

To be honest, I have no clue, did not figure it out yet.
I thought it would be enabled for several entity types by default.

@ysc any hint ?

Setting persistences strategies in the UI is still not supported, but in OH3 persistence is way easier if you donā€™t have specific needs because most of it is handled for you - namely RRD4j is installed by default with a comprehensive default strategy - so for compatible items (Numbers, Switches and some others) you get persistence without doing anything. If you need to override it or define your own, of course you still are able to.

About changing JSON DB entity names: itā€™s not that trivial, but I suppose it could be done, as well as other entities, normally you donā€™t change their IDs, thatā€™s asking for trouble but if you have to maybe there could be some logic to delete & recreate. Itā€™s not high on the backlog though.
Currently the UI instructs you do to it yourself in most cases:

image

1 Like

Thanks Yannick, but is it already enabled ?
When I analyze my Temperature sensors, I donā€˜t see any historicarl data.

Seems that persistence has some problems

2020-09-15 22:09:24.888 [WARN ] [ence.mapdb.internal.StateTypeAdapter] - Couldn't deserialize state 'org.openhab.core.library.types.QuantityType@@@18.6 Ā°C': org.openhab.core.library.types.QuantityType cannot be found by org.openhab.persistence.mapdb_3.0.0.202009110353
2020-09-15 22:09:24.917 [WARN ] [pdb.internal.MapDbPersistenceService] - Deserialized invalid item: [FAILED toString()]
2020-09-15 22:09:25.093 [WARN ] [ence.mapdb.internal.StateTypeAdapter] - Couldn't deserialize state 'org.openhab.core.library.types.QuantityType@@@59.0 %': org.openhab.core.library.types.QuantityType cannot be found by org.openhab.persistence.mapdb_3.0.0.202009110353
2020-09-15 22:09:25.112 [WARN ] [pdb.internal.MapDbPersistenceService] - Deserialized invalid item: [FAILED toString()]
2020-09-15 22:09:25.768 [WARN ] [ence.mapdb.internal.StateTypeAdapter] - Couldn't deserialize state 'org.openhab.core.library.types.QuantityType@@@27.3 Ā°C': org.openhab.core.library.types.QuantityType cannot be found by org.openhab.persistence.mapdb_3.0.0.202009110353
2020-09-15 22:09:25.798 [WARN ] [pdb.internal.MapDbPersistenceService] - Deserialized invalid item: [FAILED toString()]
2020-09-15 22:09:25.838 [WARN ] [ence.mapdb.internal.StateTypeAdapter] - Couldn't deserialize state 'org.openhab.core.library.types.DateTimeType@@@2020-09-15T22:07:27.000+0200': org.openhab.core.library.types.DateTimeType cannot be found by org.openhab.persistence.mapdb_3.0.0.202009110353
2020-09-15 22:09:25.855 [WARN ] [pdb.internal.MapDbPersistenceService] - Deserialized invalid item: [FAILED toString()]
2020-09-15 22:09:25.974 [WARN ] [ence.mapdb.internal.StateTypeAdapter] - Couldn't deserialize state 'org.openhab.core.library.types.OnOffType@@@ON': org.openhab.core.library.types.OnOffType cannot be found by org.openhab.persistence.mapdb_3.0.0.202009110353
2020-09-15 22:09:25.985 [WARN ] [pdb.internal.MapDbPersistenceService] - Deserialized invalid item: [FAILED toString()]

Thought so, like I tried to explained above.
There was a misunderstanding leading me to that question, but it is clear now that there is no difference between PaperUI and MainUI.