openHAB 5.1 Milestone discussion

This topic can be used for any discussions around the openHAB 5.1 Milestone builds as it has been announced in openHAB 5.1 Milestone Builds.

4 Likes

(post deleted by author)

Hi,

I’m having trouble setting up profiles via the UI. The Profile Configuration section is empty. Existing profiles generate an error message. [ERROR] [.module.script.profile.ScriptProfile] - Failed to process script

E: After I performed the update again and saved the new “Configure JavaScript Scripting” file, the error with the empty settings disappeared. The error message disappeared after I re-saved the transformation and profile. :face_with_spiral_eyes:

1 Like

Since upgrading to 5.1.0.M1 I get this error message and can’t get rid of it: multiple restarts and deleting cache and tmp did not solve the issue.


2025-09-22 11:29:03.511 [ERROR] [.core.model.item.internal.GenericItemProvider] - bundle org.openhab.core.model.item:5.1.0.M1 (199)[org.openhab.core.model.item.internal.GenericItemProvider(232)] : The addBindingConfigReader method has thrown an exception
full log message
2025-09-22 11:29:03.511 [ERROR] [.core.model.item.internal.GenericItemProvider] - bundle org.openhab.core.model.item:5.1.0.M1 (199)[org.openhab.core.model.item.internal.GenericItemProvider(232)] : The addBindingConfigReader method has thrown an exception
java.util.ConcurrentModificationException: null
	at java.util.HashMap$HashIterator.nextNode(Unknown Source) ~[?:?]
	at java.util.HashMap$EntryIterator.next(Unknown Source) ~[?:?]
	at java.util.HashMap$EntryIterator.next(Unknown Source) ~[?:?]
	at org.openhab.core.model.item.internal.GenericMetadataProvider.removeMetadataByNamespace(GenericMetadataProvider.java:87) ~[?:?]
	at org.openhab.core.model.item.internal.GenericItemProvider.addBindingConfigReader(GenericItemProvider.java:151) ~[?:?]
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:245) ~[bundleFile:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[bundleFile:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:687) ~[bundleFile:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:531) [bundleFile:?]
	at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:2086) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:2061) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:443) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:336) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:304) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1232) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1152) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:959) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:895) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1184) [bundleFile:?]
	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:116) [bundleFile:?]
	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:123) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:961) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:937) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:874) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:141) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:262) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:500) [org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:929) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:915) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:984) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:752) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:437) [bundleFile:?]
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:671) [bundleFile:?]
	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:310) [bundleFile:?]
	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:593) [bundleFile:?]
	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:74) [bundleFile:?]
	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:460) [bundleFile:?]
	at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [bundleFile:?]
	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [bundleFile:?]
	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [bundleFile:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488) [osgi.core-8.0.0.jar:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:420) [osgi.core-8.0.0.jar:?]
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [osgi.core-8.0.0.jar:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) [osgi.core-8.0.0.jar:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:949) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:229) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:138) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:130) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:217) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.Module.publishEvent(Module.java:499) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.Module.start(Module.java:486) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.18.0.jar:?]

Edit: no rule is executed, no items are updated. I am back on 5.0.1., everything is working again.

Hi,
Even after the major errors have been resolved, warning messages remain in Blockly. Both in old (newly saved) rules and in a completely new rule.

Screenshot 2025-09-22 Fehler_51

2025-09-22 18:49:33.507 [WARN ] [penhab.automation.script.ui.Test_5_1] - event.itemState is deprecated, use event.receivedState for update triggers or event.newState for change triggers instead.
2025-09-22 18:49:33.508 [WARN ] [penhab.automation.script.ui.Test_5_1] - event.oldItemState is deprecated, use event.oldState instead. If you use Blockly, simply resave the script

Regarding java.util.ConcurrentModificationException, I don’t encounter it myself but it is in a code I changed and I believe I understand what could be wrong (removing a map entry while going through all map entries).

One of the changes in 5.1 M1 to JS scripting is a normalization between the event Object between file based and managed rules. But Blockly has not yet been changed to use the new properties on event. Until that gets implemented, these deprecation warnings will be logged. IO’m certain by 5.1 release ths will be addressed but it would be helpful if you file an issue to make sure it’s not forgotten.

In 5.1M1 I get the following errors from an ecma profile. It’s an inline profile (thing to item):
|(items.Balboa_Temperature_Range.state == “OFF”)? input : null

2025-09-22 21:42:32.912 [ERROR] [.module.script.profile.ScriptProfile] - Failed to process script '|(items.Balboa_Temperature_Range.state == "OFF")? input : null' in link 'Balboa_Target_Temp_low -> balboa:balboa-ip:Pool_Balboa:target-temperature': ReferenceError: "items" is not defined in <eval> at line number 1 at column number 2

I re-checked with 5.0.1 and there the problem doesnt’ exist. Is it possible that the helper library is not loaded during execution of a profile?

Another finding:
Add-Ons from the marketplace don’t show the version range in the title anymore:
In 5.0.1 it was e.g.:
The Doctor Binding helps find issues with your system [5.0.0;5.9.9]
In 5.1 it’s just:
The Doctor Binding helps find issues with your system

See here

And here

And here

Under MainUI → Settings → JavaScript Scripting is “Use Build-in variables” selected? That should autoimport openhab-js for rules and transformations.

I installed the update and get these errors:

[2025-09-23 08:25:09.710 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-persistence-mapdb, openhab-binding-fronius, openhab-core-config-discovery-addon-mdns, openhab-core-config-discovery-addon-upnp, openhab-binding-mail, openhab-core-config-discovery-addon-sddp, openhab-voice-picotts, openhab-transformation-regex, openhab-ui-habpanel, openhab-transformation-jsonpath, openhab-automation-jsscripting, openhab-binding-chromecast, openhab-binding-mqtt, openhab-persistence-rrd4j, openhab-ui-basic, openhab-binding-astro, openhab-binding-unifi, openhab-core-config-discovery-addon-usb, openhab-core-config-discovery-addon-ip': An error occurred trying to read the bundle
2025-09-23 08:25:30.319 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-persistence-mapdb, openhab-binding-fronius, openhab-core-config-discovery-addon-mdns, openhab-core-config-discovery-addon-upnp, openhab-binding-mail, openhab-core-config-discovery-addon-sddp, openhab-voice-picotts, openhab-transformation-regex, openhab-ui-habpanel, openhab-transformation-jsonpath, openhab-automation-jsscripting, openhab-binding-chromecast, openhab-binding-mqtt, openhab-persistence-rrd4j, openhab-ui-basic, openhab-binding-astro, openhab-binding-unifi, openhab-core-config-discovery-addon-usb, openhab-core-config-discovery-addon-ip': An error occurred trying to read the bundle

I haven’t had time to look at why yet.
It is on my test system so it isn’t that important at the moment.

EDIT:
Found out why I was getting the error: NO DISK SPACE!

Now I am getting:

2025-09-23 10:51:41.055 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'ba98d7a244': Failed to execute action: 2(Could not find option with name js.commonjs-require.)
2025-09-23 10:51:41.057 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'ba98d7a244': Failed to execute action: 2(Could not find option with name js.commonjs-require.)
2025-09-23 10:51:41.059 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'ba98d7a244': Failed to execute action: 2(Could not find option with name js.commonjs-require.)
2025-09-23 10:51:41.061 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'ba98d7a244': Failed to execute action: 2(Could not find option with name js.commonjs-require.)
2025-09-23 10:51:42.684 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'afb9f2c624': Failed to execute action: 4(Could not find option with name js.commonjs-require.)

Possibly this: Marketplace fixes by Nadahar · Pull Request #4929 · openhab/openhab-core · GitHub - perhaps the PR title could’ve been a bit more descriptive.

auto-injection is switched on.


btw: what are inline ecma-profiles? Do they belong to UI-based scripts and transformations?

maybe, but you cannot distinguish the different versions anymore. Both versions are shown, maybe because I got “show incompatible add-ons” switched on. But still you should be able to see the difference.

Yes, sorry that’s my fault. I wanted to do it but didn’t manage it in time for M1.
Filing an issue and pinging me there would be great as a reminder!

1 Like

Transformations, though I am not sure they are “recognised” as such by the code, what would cause the error.
Let me check and I will report back.

Where do you use that transformation? It it’s on the Balboa_Temperature_Range Item, a simple:

|input === “ON”

should to the trick (sorry for my wrong quotes).

no, it’s a different item. That’s why the helper is necessary. The profile decides based on the value of another item if the input should be used.

1 Like

I would expect the code to inject the library, can’t see an obvious issue (though it’s my own code so I might be “blind” finding an issue that I made).

@Larsen
Can you please turn on DEBUG logging for JS Scripting? We need the logs related to an engine ID that starts with openhab-transformation-script-| and then a random number.

BTW you should be able to mitigate the issue by using require(“openhab”).items… (sorry for the wrong quotes).

Hi
After updating to openHAB 5.1.0.M1 all my Python Automaiotn Scripts fail in helper.py on line 93.

13:36:49.818 [ERROR] [automation.pythonscripting.various.py] -   File "/etc/openhab/automation/python/lib/openhab/helper.py", line 167, in __call__
    if BUNDLE_VERSION < versiontuple("5.0.0"):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Google Gemini told me make the following fix in helper.py. The problem seems to be the substring “M1” in openHAB 5.1.0.M1

#def versiontuple(v):
#    return tuple(map(int, (v.split("."))))
def versiontuple(v):
    parts = []
    for part in v.split('.'):
        # ĂśberprĂĽft, ob der Teil der Versionsnummer eine Ziffer ist
        if part.isdigit():
            parts.append(int(part))
        else:
            # Setzt nicht-numerische Teile (wie 'M1') auf 0, um Fehler zu vermeiden
            parts.append(0)
    return tuple(parts)