openHAB 4.2 Milestone discussion

These are the contents of my openhab folder

[/share/QPKGs/OpenHab3] # ls -la
total 216
drwxrwxrwx  9 admin administrators   4096 2024-04-05 23:23 ./
drwxrwxrwx 31 admin administrators   4096 2024-04-05 22:31 ../
drwxrwxrwx  2 admin administrators   4096 2024-01-10 18:05 addons/
drwxrwxrwx  2 admin administrators   4096 2024-02-25 13:07 backups/
-rwxrwxr-x  1 admin administrators      1 2017-11-16 17:17 build*
drwxrwxrwx 16 admin administrators   4096 2024-01-10 17:35 conf/
drwxrwxrwx 10 admin administrators   4096 2023-07-10 19:23 JDK17/
-rwxrwxr-x  1 admin administrators  13430 2023-02-13 03:38 LICENSE.TXT*
-rw-rw-rw-  1 admin administrators 114073 2023-07-26 17:52 .list
-rwxr-xr-x  1 admin administrators   1524 2024-02-25 12:50 OpenHab3.sh*
-rw-r--r--  1 admin administrators  10090 2016-01-15 14:57 .qpkg_icon_80.gif
-rw-r--r--  1 admin administrators   8438 2016-01-15 14:58 .qpkg_icon.gif
-rw-r--r--  1 admin administrators   8150 2016-01-15 14:58 .qpkg_icon_gray.gif
drwxr-xr-x  6 admin administrators   4096 2024-04-05 23:23 runtime/
-rwxrwxr-x  1 admin administrators    144 2023-07-25 09:54 start_debug.sh*
-rwxrwxr-x  1 admin administrators    193 2024-04-05 21:51 start.sh*
drwxrwxrwx  2 admin administrators   4096 2024-04-02 09:04 .@__thumb/
-rwxr-xr-x  1 admin administrators   1027 2023-07-26 17:52 .uninstall.sh*
drwxrwxrwx 15 admin administrators   4096 2024-04-05 23:26 userdata/

It has always worked like that, I’ve never cared about ownership because the process runs as admin.

CPU:  2.7% usr  1.5% sys  0.0% nic 95.3% idle  0.2% io  0.0% irq  0.1% sirq
Load average: 0.48 0.49 0.47 2/1521 15649
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
 3803     1 admin    S    2156m 27.3   2  1.4 /sbin/hal_daemon -f
10932  5133 admin    S     650m  8.2   0  1.1 /opt/ffmpeg/ffmpeg -rtsp_transport tcp -threads 1 -skip_frame nokey -hide_banner -i rtsp://admin:M
 5133  5037 admin    S    6047m 76.7   1  0.2 /opt/OpenHab3/JDK17/bin/java -XX:-UsePerfData -Dopenhab.home=/share/CACHEDEV3_DATA/.qpkg/OpenHab3

So I made a new install in Windows (snapshot Build #4026) and I can’t write in the Code tab either.

Edit: Build #4027 has the same problem

The channel editing seems to still be impossible on #4027, at least when restoring a config from openhab 4.2M1.
I had the same issue while modifying the code tab of an MQTT thing on openhab 4.2M1 (openhabian on a raspberry pi v3). I saved the configuration with openhab-cli backup.
I started fresh with openhabian (in order to start with bookworm) which installed 4.1.2, then I updated to openhab snapshot #4027. I restored the configuration, and I was able to edit the mqtt thing a first time.
After that, editing was still impossible. I tried cleaning-cache, removing and re-adding the thing, removing and re-adding the MQTT binding itself.
A test I have not performed yet is to completely reset openhab configuration, removing everything to see if it is related to the restore of a wrong configuration.

EDIT: I performed the last test, i.e. I created a thing in a completely fresh install of openhab on #4028, but I cannot edit the text in the code tab, once the thing is created (both for the AVM binding and the MQTT binding)

EDIT2: in Milestone 2 this issue seems to be solved. I only had to clean cache after restoring the backup from milestone 1

OpenHAB 4.2.0 Build #4028
I still can’t edit the sitemap in code mode.
Is anyone experiencing the same problems?

In my case the code tab

  1. Can be used to edit items and rules
  2. Does not accept updates in things

Build #4026

Edit: a fix has been implemented, probably will be available in the next build.

I have installed 4.2M2 and I cannot find the option to import items from text : was it removed explicitly or is it a bug?

Look at the page containing developer tools.

2 Likes

I have updated from 4.2.0.M1 to 4.2.0.M2 and every time I open a location card in MainUI I see these warnings. Can someone confirm before I open an issue?

|5|07:55:39.121|WARN|e.internal.SseItemStatesEventBuilder|Attempting to send a state update of an item which doesn't exist: __v_isRef|
|4|07:55:34.359|WARN|e.internal.SseItemStatesEventBuilder|Attempting to send a state update of an item which doesn't exist: __v_isRef|
|3|07:55:34.359|WARN|e.internal.SseItemStatesEventBuilder|Attempting to send a state update of an item which doesn't exist: __ob__|
|2|07:55:31.567|WARN|e.internal.SseItemStatesEventBuilder|Attempting to send a state update of an item which doesn't exist: __v_isRef|
|1|07:55:31.566|WARN|e.internal.SseItemStatesEventBuilder|Attempting to send a state update of an item which doesn't exist: __ob__|

Something like this for me:

> 2024-04-08 08:16:58.279 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: __ob__
> 2024-04-08 08:16:58.280 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: __v_isRef

I noticed, since the milestones build, when I change a thing item in the text file it won’t realoaded succesfully all the times. Only if I clear the cache the files are loaded probably.

I don’t have any log file line for this but it’s just an observation by myself…

For example I cchanged the refresh time on my icalendar thing file but not all things get realoded probably

this is my thing file ( I shortened it because configuration is not the issue)

Bridge icalendar:calendar:smarthome  "Automatisierungsprogramm" [..]
Bridge icalendar:calendar:smarthomemuell  "Muellkalender" [...]
Thing  icalendar:eventfilter:gelbersacknextevent "Gelber next Sack Event" (icalendar:calendar:smarthomemuell) [...]
Thing  icalendar:eventfilter:gelbersackcurrentevent "Gelber current Sack Event" (icalendar:calendar:smarthomemuell) [...]

after saving

2024-04-10 08:11:32.471 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'icalendar.things'
==> /var/log/openhab/events.log <==
2024-04-10 08:11:32.523 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icalendar:eventfilter:gelbersacknextevent' changed from ONLINE to UNKNOWN
2024-04-10 08:11:32.534 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icalendar:eventfilter:gelbersackcurrentevent' changed from ONLINE to UNKNOWN

than I pushed the “pause” sign in the ui and restarted the things

2024-04-10 08:12:25.068 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icalendar:eventfilter:gelbersackcurrentevent' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2024-04-10 08:12:25.566 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icalendar:eventfilter:gelbersackcurrentevent' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2024-04-10 08:12:25.577 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icalendar:eventfilter:gelbersackcurrentevent' changed from INITIALIZING to UNKNOWN
2024-04-10 08:12:25.579 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icalendar:eventfilter:gelbersackcurrentevent' changed from UNKNOWN to ONLINE

If you need more log files please advice me :slight_smile:

tried to chase it down a little bit further but nothing else in the log

2024-04-10 09:24:38.078 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'icalendar.things'
2024-04-10 09:24:38.107 [DEBUG] [ar.internal.handler.ICalendarHandler] - Scheduled reschedule in 1 day
2024-04-10 09:24:38.155 [DEBUG] [ar.internal.handler.ICalendarHandler] - Scheduled reschedule in 1 day
==> /var/log/openhab/events.log <==
2024-04-10 09:24:38.166 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icalendar:eventfilter:gelbersacknextevent' changed from ONLINE to UNKNOWN
2024-04-10 09:24:38.176 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icalendar:eventfilter:gelbersackcurrentevent' changed from ONLINE to UNKNOWN

That looks to me like a bug in the iCalendar binding in its initialise process.

Hello,

more or less same behaviour with shelly binding

I changed the thing file

from

Thing shelly:shellyplus1pm:441793cea354 "Plus1PM_Bett_links" @ "Bedroom" [deviceIp="ip", password="password"]
Thing shelly:shellyplus1pm:d4d4da7cbde0 "Plus1PM_Bett_rechts" @ "Bedroom" [deviceIp="ip", password="password"]

to

Thing shelly:shellyplus1pm:441793cea354 "Plus1PM_Bett_linksd" @ "Bedroom" [deviceIp="ip", password="password"]
Thing shelly:shellyplus1pm:d4d4da7cbde0 "Plus1PM_Bett_rechtsd" @ "Bedroom" [deviceIp="ip", password="password"]

this is the log

2024-04-10 13:53:54.527 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'shelly.things'
2024-04-10 13:53:54.549 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:441793cea354' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Unerwarteter Fehler - WebSocket connection closed abnormal
2024-04-10 13:53:54.556 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:d4d4da7cbde0' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Unerwarteter Fehler - WebSocket connection closed abnormal
2024-04-10 13:53:56.549 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:441793cea354' changed from ONLINE to UNKNOWN (CONFIGURATION_PENDING): Initialisierung oder Gerät im Schlafmodus.
2024-04-10 13:53:56.556 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:d4d4da7cbde0' changed from ONLINE to UNKNOWN (CONFIGURATION_PENDING): Initialisierung oder Gerät im Schlafmodus.
2024-04-10 13:53:56.772 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:441793cea354' changed from UNKNOWN (CONFIGURATION_PENDING): Initialisierung oder Gerät im Schlafmodus. to ONLINE
2024-04-10 13:53:56.882 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:d4d4da7cbde0' changed from UNKNOWN (CONFIGURATION_PENDING): Initialisierung oder Gerät im Schlafmodus. to ONLINE

than change it back to

Thing shelly:shellyplus1pm:441793cea354 "Plus1PM_Bett_links" @ "Bedroom" [deviceIp="ip", password="password"]
Thing shelly:shellyplus1pm:d4d4da7cbde0 "Plus1PM_Bett_rechts" @ "Bedroom" [deviceIp="ip", password="password"]

seeing this in the log

2024-04-10 13:54:47.340 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'shelly.things'

but this in the ui

No update was loaded

The button for the Inbox of new things is only visible when new things are detected.
The consequence is that you cannot access things that were (maybe accidentally) hidden.

I’m not sure wether this behavior was introduced in M2 or before.
As a workaround you can manually add “Inbox” to the URL.

[ERROR] [ipt.internal.ScriptEngineManagerImpl] - ScriptEngine for language 'application/javascript' could not be found for identifier: 0cc119c8-d91d-4be0-85eb-62c76bc0aba2
Get this on startup but everything seems to work, when javascript addon is init.

Otherwise as Information: TimeOfDay Script doesn’t work like before with M1. I put hours into variable. Before it was a number. Now it’s a time variable. I must change my code to get it work again:

[ERROR] [on.script.javascript.SystemTimeOfDay] - Failed to execute script: TypeError: A conversion from Temporal to a number is not allowed. To compare use the methods .equals(), .compareTo(), .isBefore() or one that is more suitable to your use case.
        at <js>.:anonymous(@openhab-globals.js:2)
        at <js>.:program(<eval>:54)
        at org.graalvm.polyglot.Context.eval(Context.java:399)
        at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:458)
        at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:426)
        ... 76 more

Now it’s working with this blockly:

Dunno if this is an issue nor a bug…

Seems like this was caused by the upgrade of JS-Joda, however I did not identify the changes from the changelog as breaking change.

See js-joda/packages/core/CHANGELOG.md at main · js-joda/js-joda · GitHub. I think it is the second one.

Good point. I think that hits the nail.

Another thing i found out, that third party add-ons from SmartHomeJ will be removed after update from M1 to M2. I must reinstall them manually by hand.

They should be automatically installed. Unfortunately there seems to be an issue with the continous installation/de-installation of bundles due to the add-on finder.

@J-N-K I wasn’t aware of a problem on this related to the add-on finder. Is there an issue for it? Can you be more precise about what the problem is?

There is this issue.

Also mentioned here while investigating JUPnP issue: