openHAB 4.0 Milestone discussion

@laursen Where you able to solve this? I am running into the same issue, installed OH4 snapshot over OH3.

I just tried again with build 3500 and now it worked.

It still doesn’t work for me with build 3500.

If I am going to migrate to the new version 4.0 from 3.4.4 and all my rules are javascript ECMS 5.1 will there be a conversion script for the new format or can I just restore a backup to the new version or will I have to start all over again?
Starting over would not be a good option.
I did try to restore onto version 4.0 latest stable but had lots of errors.
Is there a migrate pathway to follow?
Thanks

Nothing has changed for Nashorn JS ECMAScript 5.1. You’ll just need to install the Nashorn JS Scripting add-on.

But the same caution still exists. Typically you cannot restore a backup to a different version of OH. If the backup is 3.4, you have to restore to a 3.4 OH and only then upgrade to 4.0. This is mostly for installed Linux versions (e.g. apt, openHABian, yum, etc.).

Docker detects when there is a difference inversions between the config versions and the software and performs upgrade steps automatically.

Manual installs have an upgrade script which needs to be run when the version of OH changes (see the installation instructions for your OS for details).

And finally, in OH 4 there is now an upgrade tool (upgradetool.jar) which can be run independently but it has also been added to the apt/yum/upgrade scripts and docker upgrade processes (I need to verify that’s correct but it should be done before OH 4 comes out). This will do some migration steps for you such as adjusting the Things JSONDB and applying unit metadata to Items where it’s apparent that is what is required.

But there is not and never will be an upgrade tool that support migrating from one rules language to another. And Nashorn JS and GraalVM JS are different enough they may as well be different languages.

Kris,

To add what Rick said, I would ask you to be nice with your words as it really can hurt people’s feelings who are doing openHAB in their leisure time (like me, and calling blockly a “joke” did hurt me
)

I can easily understand that you are not in favor of writing rules in a visual style and you don’t have to. I have been a programmer for over 30 years and I love all kinds of languages, though, today I do more than 80 percent in blockly, not only because I am maintaining it (I want to make sure that everything I want to can be done in blockly) but really because many rules I have are rather simple and I can put them together in blockly in seconds without thinking too much about syntax which I am (that is me) often failing in written languages. I know, for example, that @florian-h05, who is the maintainer of JS(-rules) and who I am working with together on blockly and the UI would always directly jump on writing a JS-rule because he is so experienced of javascript that blockly would be just standing in his way. So both is right.

Btw, to add something from my own history. More than two decades ago I used Labview, which is a visual programming tool for instrumentation and science labs, to develop our setup - I quickly abandoned it because the visual representation stood in my way in efficiently (not effectively) doing my job and here I am, still and even, promoting blockly 
 :wink:

I still hope that blockly helps many people here to be able to write simple rules fairly easily and quickly and even use the generated code to learn from it (often in the forum we also hint people to put some blocks together and see what the result is) and then maybe try javascript directly. To me blockly was always meant to be an entry point for new people to make openHAB even more attractive.

All an all, all approaches have their right to exist and I do my very best that blockly allows to write rules from a beginner level up to pretty complex ones.

15 Likes

I am sorry Stefan. Didn’t mean to hurt you. I really appreciate your hard work and others.
Then I will have to check how it works now.
You know how it is. Last time when I tried it it was not to friendly.
Thanks again for your commitment!

1 Like

Hi everyone,
Is there any expectation about the release date of the 4.0 stable?

Usually one could expect it before the end of June. But there are a number of new features which are still being worked which would be wonderful to have as part of OH 4 (e.g. UI support for custom semantic tags, UI support for persistence configuration, new persistence configuration filters, etc.) so I would expect the first release candidates in early July.

But that’s just a guess.

4 Likes

Hi, @stefan.hoehn.

Have you seen this Advanced Flow?
There was also a great competitor (Stringify) of IFTTT back in 2017 that was sold to another company and later shut down. I started using OpenHAB because of that. Their tool looked a lot like this one.

I think that would make OpenHAB more attractive as it’s more user-friendly and easier to understand.

Most likely blocky can do the same or even more, I don’t know because I don’t use it, but it definitely looks simpler. I believe the flow structure is easier for the human brain to process.

I look forward to the day when OpenHAB has a similar visual rules tool.

I agree that this might be easier in some situations similar like some people like flow diagrams more than block diagrams such as structograms. Most likely it explodes rather fast in covering much more space pretty quickly with more complex rules.

To me it looks at least similar to what Node Red can do (which some openHAB user already used afaik).

Nevertheless, Homey seems to have implemented it pretty nicely.

I doubt that we have the capacity to do that or is someone willing to jump in for a proof of concept?

Hi,
I updated from OH 3.4.4 to OH 4.0.0 Milestone 3.
Im running a ZWAVE Controller on my production system. On my testsystem no ZWave Controller is present.
After restarting the testsystem I got the following error:

2023-06-27 16:30:23.040 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node27' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.042 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node27' because the thing type was not found in registry.
2023-06-27 16:30:23.053 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node26' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.055 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node26' because the thing type was not found in registry.
2023-06-27 16:30:23.066 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node29' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.068 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node29' because the thing type was not found in registry.
2023-06-27 16:30:23.079 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node28' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.081 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node28' because the thing type was not found in registry.
2023-06-27 16:30:23.114 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node23' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.116 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node23' because the thing type was not found in registry.
2023-06-27 16:30:23.127 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node24' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.128 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node24' because the thing type was not found in registry.
2023-06-27 16:30:23.140 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node21' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.141 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node21' because the thing type was not found in registry.
2023-06-27 16:30:23.165 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node18' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.168 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node18' because the thing type was not found in registry.
2023-06-27 16:30:23.224 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node53' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.227 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node53' because the thing type was not found in registry.
2023-06-27 16:30:23.238 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node50' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.240 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node50' because the thing type was not found in registry.
2023-06-27 16:30:23.253 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node49' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.255 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node49' because the thing type was not found in registry.
2023-06-27 16:30:23.267 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node48' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.269 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node48' because the thing type was not found in registry.
2023-06-27 16:30:23.280 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node45' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.282 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node45' because the thing type was not found in registry.
2023-06-27 16:30:23.292 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node44' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.294 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node44' because the thing type was not found in registry.
2023-06-27 16:30:23.305 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node47' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.306 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node47' because the thing type was not found in registry.
2023-06-27 16:30:23.317 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node46' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.319 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node46' because the thing type was not found in registry.
2023-06-27 16:30:23.329 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node41' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.331 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node41' because the thing type was not found in registry.
2023-06-27 16:30:23.342 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node40' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.344 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node40' because the thing type was not found in registry.
2023-06-27 16:30:23.354 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node43' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.356 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node43' because the thing type was not found in registry.
2023-06-27 16:30:23.367 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node42' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.369 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node42' because the thing type was not found in registry.
2023-06-27 16:30:23.389 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node38' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.391 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node38' because the thing type was not found in registry.
2023-06-27 16:30:23.402 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node37' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.404 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node37' because the thing type was not found in registry.
2023-06-27 16:30:23.415 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node39' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.417 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node39' because the thing type was not found in registry.
2023-06-27 16:30:23.428 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node34' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.429 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node34' because the thing type was not found in registry.
2023-06-27 16:30:23.440 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node33' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.442 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node33' because the thing type was not found in registry.
2023-06-27 16:30:23.453 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node36' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.455 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node36' because the thing type was not found in registry.
2023-06-27 16:30:23.471 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node35' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.473 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node35' because the thing type was not found in registry.
2023-06-27 16:30:23.485 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node30' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.488 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node30' because the thing type was not found in registry.
2023-06-27 16:30:23.505 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node32' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.507 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node32' because the thing type was not found in registry.
2023-06-27 16:30:23.521 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'zwave:shenzhen_doorwindowsensor_00_000' for thing 'zwave:device:020e4758:node31' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-06-27 16:30:23.523 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'zwave:device:020e4758:node31' because the thing type was not found in registry.

Is the root cause, as I don’t have Z-Wave controller on my testsystem?
Things in the Testsystem looks like this:

(Of course as no Z-Wave Controller is present)

For me it look’S like a problem in the zwave binding


Umm for me at least I am not sure I am following your question.
How would you expect your test system to communicate with your z-wave devices that got ported over during the upgrade process if you did not move your z-wave controller to the test system to communicate with those things?
Have you tried moving your z-wave controller to your test system and see if those warn messages clear?
And Yes I am running the z-wave binding just fine on openhab 4.0 version


After updating from 3.4.4 to 4.0.0 M3 i see this error during startup of OH:

2023-06-27 16:28:15.595 [WARN ] [core.karaf.internal.FeatureInstaller] - The transformation add-on 'javascript' does not exist - ignoring it.

Anyone an idea how I can fix it?

Will try it out, but will take a few days


Had the same problem

Solution is just below.

Sorry for asking againg:
I don’t find any Script Transformation:

I’m not sure how to fix it


Hi I was able to get rid of the error changing
/var/lib/openhab/config/org/openhab/addons.config

old: map,regex,xslt,exec,javascript,scale,xpath,jsonpath
new: map,regex,xslt,exec,scale,xpath,jsonpath

but now the question is:
Im using javascript transformations in my OH 3.4.4 environment:

Will they still work?

You have to install one of the JS Scripting add-ons. I recommend not installing the Nashorn one and instead install the GraalVM one.

I searched for GraalVM, but didn’t find a addon:

How can I install GraalVM?

If I look for “java” i find:

I currently have javascript transformations:
image

e.g.

will they work “automatically” after I install GraalVM or do I have to change something?

Thanks for your help!