OH3: Location Tab: badges not shown / icon missing but reaction on state change

Thanks so much, Rich, this is so valuable and helpful information! I took notes into my private little installation guide and I guess for the first time I feel I kind of understand where all the different configs sit. You also convinced me now that I should get away from the .items and .things files at least and I will dig into that topic as soon as possible (and, if necessary, will potentially open a new thread in case there is no matching other thread about it).

Two thoughts / feedback on the backup topic Iā€™d like to share in addition:

  1. I generally was aware before that for the docker installation, a backup of conf/ and userdata/ folders will give you a full backup (I just didnā€™t understand where the different config files sit). The concern with that backup menthod that I still have is that I had, with OH 2.5.x, a strange situation where something got corrupted (donā€™t remember the details, I think it was related to a binding) and I could not fix it any more, not even by reinstalling it. Those folder backups also have not helped any more. So I did the ā€œforward strategyā€ and did a clean install with OH 3.0, just using my .items, .things, etc. files that basically saved my OpenHAB setup at the end, did the reconfig of the rest (bindings, etc.) and it worked again. It was quite some work, though, and it burnt into my brain that the fact of having these .items, .things text files (away from any OpenHAB installation related config files) prevented a major disaster. Hence my reluctance to get away from them.

  2. This is related to point 1. and to the question of platform dependent configuration backups, plus the question around the famous ā€œBackup / Restoreā€ button in the MainUI (and I understand now we first need to extend the REST API for that anyway). To come back to my ā€œdreamā€, it would be fantastic to have one day a platform independent configuration backup feature. One where you donā€™t need to know where which config files are and where it does not matter on which platform you are. It would be such a magic ā€œBackupā€ button in the MainUI that would create e.g. one large json backup file with everything in it, from basic configurations like timezones, language, users, bindings, transformations up to everything else (things, items, metadata, custom widgets, persistence config, etc.). Then you could take this one file, restore it onto another clean OpenHAB instance and you would have the same system running again. This would make the backup (and restore) platform independent and also the required documentation would be platform independent. I would not expect this feature to backup data in internal or external persistence services, of course, this would be separate steps one would need to do, depending on the persistence service.
    Such a one-file platform independent configuration backup would be my ā€œdream backup featureā€ somewhen in the future. It would provide confidence that in case my OpenHAB instance gets messed up for any reason, I can remove everything, incl. the userdata and conf directories, spin-up a fresh container and load this one-file backup through the ā€œRestoreā€ feature in the MainUI, and would have exactly my OpenHAB instance running again. I know, this would be a lot of work but I guess it would massively improve, well it would actually remove what I consider one of the major painpoints of OpenHAB.

1 Like

Definitely review the Getting Started Tutorial at least as far as the Semantic Model page (though the full tutorial is worth review, especially for users coming from older versions of OH.

To a large extent, the runtime/bin/backup and restore scripts are this. They just need to be run from the command line. For an installed on Linux OH, these scripts are also made available through openhab-cli, but they exist on all platforms.

But from what you described, this or any other implementation of this would not have addressed your problem in 1. Something weird was going on there and without more details we canā€™t get any more there is no way to tell what happened.

Note that you can, for example, take a backup using that backup script or openhab-cli on an apt installed Linux instance, copy the zip file to a Windows machine and run the restore script and it will work.

Docker is a little weird because itā€™s Docker; you have to run the backup script from inside the container. And that alone is going to make any documentation for this not be platform independent. Also, the location of the backup/restore scripts and the presence or not of openhab-cli is going to be different too.

The current backup and restore scripts do handle the internal persistence since that data resides in userdata/persistence.

We are a lot closer to what you want already (and have been for quite some time). The backup and restore scripts that already exist on every OH instance already creates a single file (zip file) platform independent backup that includes everything to instantiate the exact same config on a fresh OH install (or overwrite an existing config on a non-fresh OH install). Thereā€™s just the one command to create the backup and the other command to restore it. The backup and restore scripts are also exposed through openhab-cli and through openhbaian-config for those running on those platforms.

1 Like

Thank you very much, Rich.

Note that you can, for example, take a backup using that backup script or openhab-cli on an apt installed Linux instance, copy the zip file to a Windows machine and run the restore script and it will work.

Ah, I was not aware of that either. Agree that OpenHAB is actually surprisingly close to what I would love to have, indeed. It seems the missing part is obviously mostly some visible documentation in the ā€œAdministration Guideā€ and maybe some ā€œconvenience treatmentā€ (clicking a button in the MainUI instead of command line; but you already explained why it is not possible at this stage).

Regarding the Semantic Model, I studied it in detail when I upgraded to OH3 and applied it to all (most) of my items to my best knowledge. Defined the locations, etc. via groups in .items file, will be fun to see how I get that into the UI without re-doing it. But letā€™s reserve that for another thread Iā€™m going to open :slight_smile:

Thanks again, Rich, this was very enlightening and helped a lot for my next steps. I am sure a lot of users would benefit massively from all this information when made available e.g. in the ā€œAdministration Guideā€.

By the way: Didnā€™t know that either, cool, although Iā€™m using InfluxDB and manage my data backup there.

I have exactly the same problem here.
The GUI does not show the badge for an open door.
But installing the feature with

feature:install openhab-iconset-classic

Does not work because the console answers with:

Error executing command: No matching features for openhab-iconset-classic/0  

How can I get this feature installed or this icon to show up?
I am on 4.0.0.M1 running in a docker container.

I have found the problem
I had previously added my own door icon (black line drawing) and it was not visible well with my colorful location cards.