openHAB 5.1 Milestone discussion

Thank you.. i was manually recreating the items. I’m doing the same thing moving to Zwave-Js.. i just finished.

Ill try restarting the bridge next time.I already had to increase the file size once i hit 50 nodes.. so far im at 79 and its ok.

It only happens when im really changing things… adding 10-12 nodes and deleting old nodes from old zwave all at once.

Hi @florian-h05

I noticed, that self invoking functions are not executed if they are the only command within a managed rule. However, they are executed if there is at least one command prior to the self-invoking function.

this works:

console.log("test");

(() => {

  console.log("test2");

})();

this doesn’t:

(() => {

  console.log("test2");

})();

It is related to OH5.1 but cannot say if this problem came with 5.1M1 or 5.1M2

@florian-h05 Is this related to the parsing of the directive, or the wrapping itself?

@Oliver2 Try to put either "use wrapper=true" or "use wrapper=false" on the first line of the script, and see if one of them, or both, will make it work. The answer could point to where the problem lies.

The script does not run regardless of true or false

That was unexpected - did I get the directive syntax wrong..? (I don’t think the directive is documented (yet), so nobody can probably answer that without looking at the code)

It’s documented here: JavaScript Scripting - Automation | openHAB

You got the directive right, but there I did some experimentation and found the issue:

The automatic conversion of the event object breaks writing self-invoking functions.
It seems that injection the code for this at the top of the script makes Graal not execute the self-invoking function, disabling event conversion in the add-on settings “fixes” this issue.

The question now is: Why should one manually wrap the script in a self-invoking function as the add-on can now do this? Should the add-on be clever enough to inject the event conversion code inside the self-invoking function? I guess the answer is yes for the latter to avoid breaking things.

1 Like

I was thinking of potential issues like “double-wrapping” when arguing for the directive, but I thought that using the directive to disable the wrapper would retain “old behavior”. So, I am confused by the fact that setting it to false doesn’t avoid the issue.

I’m in the middle of chasing a bug in the Astro binding, so I didn’t have the bandwidth to check the details right now.

According to my testing double wrapping is no problem … it is rhe statement before the IIFE.

[jsscripting] Fix bugs related to event obj conversion & script wrapping by florian-h05 · Pull Request #19703 · openhab/openhab-addons · GitHub will fix this.

1 Like

There is no reason. As you have added the wrapper there is no need for an IIFE anymore. I just thought I bring this to your attention.

I have just a general question what will be the features of oh5.1?

You can have already an idea by reading the different release notes of the milestones.

I just upgraded my production system from 5.0.3 to 5.1.0.M3 and I’m positively surprised.

I’m using 35 bindings, 121 things, 1030 items, and 127 Python rules…

and I haven’t found a single bug :slight_smile:

I have tested the following bindings.

automation=pythonscripting 

binding=airgradient,amazonechocontrol,astro,comfoair,fenecon,fineoffsetweatherstation,gardena,hue,icalendar,knx,ntp,modbus,mqtt,pushover,robonect,samsungtv,shelly,tuya

persistence=jdbc-mariadb,mapdb,influxdb

transformation=jsonpath,map,regex,rollershutterposition,scale,xpath,xslt

ui=basic,habpanel,habot

misc=metrics

and additionally via the addons folder

homeconnectdirect & skyq

The release blog post will summarise it as usual.

1 Like

One big thing is the upgrade of Main UI to Vue 3, making it faster and more usable on very low end devices (according to my own experience and feedback from the community).

Both Jim and Lolodomo are right, reading through the release notes for now is the best option, and later of course reading the release blog post (for which I usually read the release notes to find what I want to add).

I read it through but besides the pcm audio stream und vue3 Haven’t found anything

My Feedback for 5.1 M3:

  • It looks like there is a performance issue for charts with many items. E.g. I have a page with Grid 1 (50%) and Grid 2 (50%) with total 7 items and it takes 10s to show the graph.

  • Default Marker-Icons are not shown in map anymore. OH-Icon works

  • Upnp issues –> Sonos status doesn’t work (commands are OK). However, we have another thread for this.

    openHAB 5.1.0Mx: UPNP Issues - #47 by Lolodomo

BTW This is cool :slight_smile:

You have to look at all three release announcements. Not just the latest one.

Everything under “Enhancement” in the table of the release notes are additions and not bug fixes. As I read through these I see a whole lot more new than just that. Ignoring the enhancements to add-ons I see a bunch of new user facing features:

  • Ability to configure currency UoM from runtime.cfg
  • API end point to get the new YAML file format (e.g. you can define an Item in the UI and then get the YAML file format of that Item) making it easier to move between file based and UI based configs
  • New HTTP actions to download images in a format that can be used with an Image Item without conversion
  • The event Object is now passed to Script transformations, not just rules
  • We can change the HLI in HABot
  • Select all on the rules page
  • Bindings can push suggested semantic tags now
  • We can now know where an event came from as part of the event Object (e.g. in a rule we can know if a command came from a phone app, MainUI, another rule, a Channel, etc). And the history of the command is maintained so we can see how one event causes another.
  • Strategies are now optional in persistence config files.
  • New UoM for price per volume
  • New semantic tag for price
  • BasicUI now shows a ? for switch Items that are NULL or UNDEF (MainUI PR in work I think)
  • The Code tab in MainUI now shows the YAML file format instead of a YAML version of the raw JSON for Things and Items
  • On the Item’s page that Item’s place in the semantic model is displayed similarly to how it’s shown in the Model view
  • We can filter on settings pages based on editability, type, and status
  • Rule templates are collapsable on the new rule page
  • Read-only semantic tags are now shown as such in the semantic tag editor
  • We can save and restore the pins in the Developer Sidebar.
  • A new AND/OR block in Blockly to make large if conditionals easier to write

Those are just the ones that stood out to me.

2 Likes

2 posts were split to a new topic: 5.1.0.M3: Charts load slowly

In version 5.1.0.M3 it is not possible to save the newly added mqtt binding channel