openHAB 3.0 Milestone 4 discussion

Hello,
how can I clear the homekit Pairings?
in OH 2.5 it was posible with “smarthome:homekit clearPairings” in the the OSGi console.

On my first try OH3 was only a device in Homekit and not as a bridge.

Have found a solution now it’s “openhab:homekit clearPairings”

There are no plans or works going on beyond what has been the upgrade process in older versions.
(the wizard is what’s already there if you start from scratch.)

All of the devs are busy on other fronts. We’re looking for contributors to write a migration tutorial.
Any takers ?

Unfortunately I’m focusing my efforts on the getting started tutorial and I’m not actually migrating my config but instead rebuilding it from scratch on OH 3 so am not a good candidate this time around. But I’m happy to help out where I can. I can definitely provide lessons learned from writing the 1.8 to 2.0 migration tutorial way back when. :wink:

May I ask a very stupid question?

How to I open the new ui within openhab3 and how to design it is there any example?

The new ui can be opened by calling the following address in a webbrowser http://yourOH3ip:8080
(Replace yourOH3ip with the ip address of your openhab server). If you are running on docker the port might be different.

A good starting point on building the ui is here: [wiki] Building Pages in the OH3 UI: documentation draft (1/3)

It is difficult to set the auto-update property for an item to false when using the new UI.

  1. If no Auto-Update Metadata is defined for an item, auto-update defaults to active.
  2. By adding Auto-Update Metadata for an item and setting “Force auto-update” to ON you can set the auto-update property for an item to true.
  3. If “Force auto-update” is set to OFF the auto-update value is blank and auto-update defaults to active.
  4. It is (only?) possible to set auto-update for an item to false by using the Auto-Update Metadate code page and setting the auto-update value to “false”.

Rich, are going to use text files for 3.0 or are you going all in on the new UI? Given your long history and experience with OH I admit I’m curious!

Thanks,

~Mark

All in on the new UI. I still configuration control my configs in git, but my conf folder has next to nothing in it. Just three .persist files and a few JavaScript rules libraries that I import to use across multiple rule I’ve written in MainUI (and which I’m slowly making available for download and use at my openhab-rules-tools repo).

The code view for most stuff, the semantic model, and developers panel (alt-shift-d) make it so I’m as productive if not more productive than I ever was in VSCode. And there are some things that I really love that are unique to UI management of stuff. And everything loads so fast.

There are a few minor things I wish were easier but so far they are not deal breakers and I know why things are the way they are. The worst is dealing with my own custom Item metadata. I’ve had to resort to searching through the JSONDB file itself to figure out which Items have which metadata sometimes. If something doesn’t change there I can definitely see Item metadata developing cruft over time.

I’m also not planning on porting over my sitemap. I can create one or two simple Pages coupled with the automatically created ones based on the model eliminates the need.

1 Like

Please file an issue. If I understand correctly, what you are saying is that the only way turn off Force auto-update is through manually editing it in the code view. That would count as a bug in my book and it should be easily fixed.

One important usage of this forum is solution sharing. How can this be done if everything is migrated to the new UI ? For example, your design patterns.

Another aspect is migration. I’ve migrated from OH2 to OH3 with no problems besides DateTimes. If everything is in jsondb is it easy to migrate ? And take backup ?

I would love to also make the jump to the new UI.

One important usage of this forum is solution sharing. How can this be done if everything is migrated to the new UI ? For example, your design patterns.

In the main UI you can export the configuration and share this. On each rule, thing etc. you ahve a page “Code” that shows the configuration of your thing/rule. You can copy this and share it here with others. Also for old ITEM configuration files, theyy can be imported on OH3 on an admin page, so also the old design patterns can be shared.

Another aspect is migration. I’ve migrated from OH2 to OH3 with no problems besides DateTimes. If everything is in jsondb is it easy to migrate ? And take backup ?

Before updating to OH3 you should perform an backup in any case. So copy the userdata, conf and addons folder to another location in case you need them or the OH3 installation fails. As you mentioned the main change in the rules is the Joda time to ZonedDateTime. All other stuff from your rules should still run, unless if in jsondb or on a rules file.

1 Like

Just remember v1 & v2 addons do not work with OH3.

Design Patterns are a generic way to solve common problems in OH. As such they are, with only a couple of exceptions, independent of the programming language rules are written in and how the rules are written (text based or through the UI).

All of the DPs have a Pyton example already added and I’ve started providing JavaScript YAML examples (Time of Day is the only one I’ve posted so far). In each case I try to write the example in a way that shows off the strength of the Language so, for example, the YAML/JavaScript Time of Day example is written to use Ephemeris and uses Item metadata.

With the exception of Items right now, everything in MainUI has a code tab that shows the entity encoded as YAML for sharing in the forum and elsewhere. The entity can be edited in the code view by hand if desired as well (great fit cases where one needs to copy/paste/edit a bunch of Things for example).

I’m not migrating and am instead rebuilding so I don’t know. I think there are some namespaces in the JSONDB fingers that need to be changed.

Backups are the same as ever. In fact they are even better as the JSONDB file are backed up automatically for you on every change so if you encounter a corruption (e. g. the machine crashed while writing out one of the files) there will be a backup created a moment before the failed write.

And the JSONDB files are just text and can be checked in to source control. I do this myself.

1 Like

@buschif4 & @rlkoshak - would you be able to share how OH automatically generates the pages for the semantic model? Is it based on the item groups? In the past there have been two common approaches to group items together into a zone:

  1. Use of group.
  2. Use of the naming convention.

Is there any new changes to the item syntax?

Thanks,

1 Like

See Getting Started with OH3: rewriting the tutorial - 6. Model your home with Items & link Channels. The model is based on group membership and Item tags. And it’s way more involved, and subsequently way more powerful than the Group tag on sitemaps.

It would be great if you actually went through the whole Getting Stated tutorial and add comments and make edits as you go. Getting Started with OH3: rewriting the tutorial - 1. Introduction

No, not even for the model which was something supported even in OH 2.5 but was only used by HABot.

Any updates with:

EventHandler] - Dispatching event to subscriber ‘org.openhab.core.automation.internal.module.handler.ItemStateTriggerHandler@18c1509e’ takes more than 5000ms.

I’m still getting it with last snapshot - 2039
Openhab is almost unusable.

Cannot confirm it to be unusable. I have moved my productive environment to SNAPSHOT 2039 and see no issues so far…

After Openhab start, in few minutes I can’t change manually state of my lights :confused:, other rules also hangs.

Absolutely not my experience. Rules running as expected and response to switching lights is absolutely fine, even controlling them via Alexa skill…