Openhab4 M1 - earlybird?

Thanks for your reply.

I totally understand. i guess its fine to test but not to complain in the end that the system itself is not behaving 100% like it should and also not to expect the community to fix all issues that arise by sending a few threat messages.

My most generic question…does Java17 force to have a 64bit OS or its fine and works with Bullseye 32bit on Raspi4 ?

Language i’m not sure, but the old old style…like:

rule "Speedtest init"
when
    System started
then
........
end

That’s DSL rules, so not affected.

No, if you have a 32bit OS with a 32bit Java 17 version, that’s fine.

I´ve got another one. I´m still with 2.5. Does it make sense to wait a few weeks to transfer to 4.x or is it better to transer initially to 3.4. and then to 4.x as I wouldn´t understand nothing any more going straight to 4.x?

4.x is months away, not weeks away.

I strongly recommend moving off of 2.5, because there’s a security vulnerability that was patched two years ago in OH3. So to answer your question directly, you should move up to 3.4 now. I’d probably suggest that even without the security issue, because you’ll benefit from past discussions about moving from OH2 to OH3 (particularly breaking changes).

You can try doing an in-place upgrade (after cloning your system to ensure a fallback path), but I’m of the opinion that it’s best to start with a completely fresh OH3 and build it to match what you’re doing with your OH2 system. This enables you to see how things have changed and take advantage of OH3’s capabilities, as opposed to just importing your OH2 config files and making them work. It will also prepare you more for OH4; you’ll be able to do an upgrade and focus on OH4’s breaking changes.

It’s going to be a huge jump either way.

It probably wouldn’t be too bad to start the transition to the OH 4 milestones, and gradually move your system over little by little. But keep in mind that there are lots of changes and there will be regressions as you go that you’ll have to keep up with.

You’ll probably want to review all the announcements for 3.0, 3.1, 3.2, 3.3, and 4.0 M1 for any additional breaking changes which might impact you.

Right OH, OH 4 is no where near as different from 3.0 as 2.5 was from 3.0 nor as different as 2.0 was from 1.8 so the docs are still pretty accurate.

If you decide to initially upgrade to 3.4.2, pay attention to the OS and Java requirements. You don’t want to upgrade to OH 3.4.2 only to have to install a new OS because Java 17 isn’t available on it.

Do not skip the Getting Started Tutorial no matter what you choose. The people who have the hardest time migrating are those who skip that.

it will be a relieve for the experts here as i will first time in my life (after many years with OH starting at 1.x) to give openhabian a try. I have some customizations but over the years they become less and less…so i guess it could work…

For Openhabian, as its 3.4.2, i guess i have to set the installation path or similar to testing and it will upgrade to OH4? as the standard Dec’22 image will come with 3.4 on it.

Cheers,
Norbert

In openhabian-config there’s a menu option to choose between the release (3.4.2), testing (4.0 M1) and snapshots. Once up you can change between versions from there.

But be aware that restoring a backup must be performed on same-version to same-version. You cannot restore a 3.4.2 backup on a 4.0 M1 server. Restore does not go through the automated upgrade steps and potentially leaves your configs incompatible. So restore first, then upgrade (if you plan to do an in place upgrade of an existing system).

thanks for telling me. still uncertain and most likely i wait till easter bunny is visiting town. so i have more time to go back and forward…and most likely its already M2 or M3

Don’t forget there is a Remote openHAB addon and the MQTT EventBus rule template. If you have the hardware (it’s easier to do on separate machines) it makes a lot of sense to run both in parallel, moving stuff over Thing by Thing, Item by Item, and Rule by Rule.

1 Like

Russ, Rich, thanks a lot for your quick reply.

Understand the security issue. However time is the bigger factor for me. I have very little time compared to the time of first setting up OH without kids and without work during lockdowns. That’s why I try to figure out the most efficient way. Even thought of moving to a different system like HomeAssistant but the changes are probably even worse with different logic.

Tough. Either way it’s probably best to get another raspberry and do it step by step.

hm, i updated to OH4 M1 during easter and surprisingly it ran way more smooth than any other major update.

HOWEVER…now i switched to OH4 M2 and many issues in the sitemap that seem to be related to these error logs. i do not get it as this was not an issue with M1, i also did CLEAN-CACHE twice via openhab-cli and reboot the whole system.

and hint is highly appreciated…

2023-04-19 19:34:39.605 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-5' failed: The name 'TempAlert_Timer' cannot be resolved to an item or type; line 88, column 7, length 15 in default
2023-04-19 19:34:39.657 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-5' failed: The name 'TempAlert_Timer' cannot be resolved to an item or type; line 88, column 7, length 15 in default
2023-04-19 19:34:41.879 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-9' failed: The name 'MyTapStamp' cannot be resolved to an item or type; line 147, column 24, length 10 in default
2023-04-19 19:34:43.471 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-18' failed: The name 'PVng5sum' cannot be resolved to an item or type; line 327, column 5, length 8 in default
2023-04-19 19:34:46.462 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-18' failed: The name 'PVng5sum' cannot be resolved to an item or type; line 327, column 5, length 8 in default
2023-04-19 19:34:48.879 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-9' failed: The name 'MyTapStamp' cannot be resolved to an item or type; line 147, column 24, length 10 in default
2023-04-19 19:34:50.880 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-9' failed: The name 'MyTapStamp' cannot be resolved to an item or type; line 147, column 24, length 10 in default
2023-04-19 19:34:51.021 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-5' failed: The name 'TempAlert_Timer' cannot be resolved to an item or type; line 88, column 7, length 15 in default
2023-04-19 19:34:51.886 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-9' failed: The name 'MyTapStamp' cannot be resolved to an item or type; line 147, column 24, length 10 in default
2023-04-19 19:34:53.612 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'tempminmax-2' failed: The name 'RainToday' cannot be resolved to an item or type; line 27, column 12, length 9 in tempminmax
2023-04-19 19:34:56.879 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-9' failed: The name 'MyTapStamp' cannot be resolved to an item or type; line 147, column 24, length 10 in default
2023-04-19 19:34:58.124 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'tempminmax-2' failed: The name 'RainToday' cannot be resolved to an item or type; line 27, column 12, length 9 in tempminmax
2023-04-19 19:35:00.023 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'default-5' failed: The name 'TempAlert_Timer' cannot be resolved to an item or type; line 88, column 7, length 15 in default

as an example - this is a rule that now shows issues…


rule PVng5sum_Builder
when
  Item PVng5Sunrise_Power changed or
  Item PVng5Barn_Power changed

then
  if (PVng5Sunrise_Power.state instanceof DecimalType && PVng5Barn_Power.state instanceof DecimalType) {
    PVng5sum.postUpdate ((PVng5Sunrise_Power.state as DecimalType) + (PVng5Barn_Power.state as DecimalType))
    PVng5sum_avg.postUpdate (PVng5sum.averageSince(now.minusMinutes(15)))
  }

All of those errors indicate that the Items referenced by those rules do not exist.

I have seen issues where after a cleaning of the cache, some things take longer to load than normal (as expected since it needs to install and activate all the add-ons. So I often see errors like these (and others) on that first boot after clearing the cache. So I let things settle and then restart and usually get a clean boot.

And in fact, often even after a non-clean boot, things start working after everything settles down.

If that’s not your problem, you need to look into why these Items do not exist when these rules are running.

@rlkoshak , as always - my hero.

Can it be that M2 suddenly is more sensitive than M1…dont think that there will be any major changes.

Looking at the bootup:


2023-04-19 19:06:38.863 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'smartlock.items' has errors, therefore ignoring it: [4,30]: mismatched input '"lock-closed"' expecting RULE_ID

2023-04-19 19:06:38.865 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'zwave.items'
2023-04-19 19:06:39.040 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'zigbee.items'
2023-04-19 19:06:39.159 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'victron.items'
2023-04-19 19:06:39.211 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'miac.items'
2023-04-19 19:06:39.234 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.items'
2023-04-19 19:06:39.252 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'default.items' has errors, therefore ignoring it: [27,41]: mismatched input '"router"' expecting RULE_ID
[86,69]: mismatched input '"time"' expecting RULE_ID

it seems there are two issues with apostrophes

the first issue looks like this:

Switch LockON "NG5 Lock []" <"lock-closed"> (SmartLOCK) { channel="mqtt:topic:mosquitto:smartlock:LockON" }

the second

Switch RTonline_Switch "Router Online" <"router"> (Misc)

honestly i do not remember why i used the “” for icons, …i remember it had a reason. :slight_smile:

Not a safe assumption. OH 4 is a chance for breaking changes. There can be huge changes from one snapshot to the next right now. Just as an example, OH M1 eliminated JS as a transform, using SCRIPT instead. As of M2, JS is back and SCRIPT is gone.

RULE_ID? Your .items files are in the items folder and not rules, right?

If so, report this on the milestone thread. openHAB 4.0 Milestone discussion - #194 by Andrew_Rowe

@rlkoshak
thanks, the items are of course in a .items file

Did you see the specific .items file above…i removed the " " and now at least the default items file works again…

But any idea why it was useful to have <" "> and now its not required or makes problems with M2.

In the items folder is the key point. For some reason it’s looking for a RULE_ID when loading the .items file which makes no sense.

As far as I know it was never officially supported to have quotes for the icon field. It’s definitely redundant. But M2 has some new changes to support more icon sources than just those built into OH itself (material, f7, iconify) and there was probably some changes or tightening of the parser as part of that. The relevant PRs (listed in the release notes) are Extend sitemap syntax for icon by lolodomo · Pull Request #3378 · openhab/openhab-core · GitHub and Extend item syntax for category/icon by lolodomo · Pull Request #3539 · openhab/openhab-core · GitHub

1 Like

The changes for the extra icon sources dropped supporting double quotes around the icon name, but did introduce supporting - (dash) in the icon name (some icon sets have this). That is probably why you needed double quotes before. That was an undocumented feature I believe, and assumed not to be used much. It simplified things by dropping it.