Openhab 4.2 - Updating an ".items" file does not remove links to channels

Hi

I searched the tickets, but could not find this. I recently upgraded from 4.1.2 or 4.2. Since this update I noticed that if a “XY.items” file is updated in the configuration and reloaded into the system, new links are added, but no links are removed. E.g., if I have in the previous “XY.items” file:

Number Endpoint_Power "example [%.2f W]" {channel="zwave:device:xxxxxx:node162:meter_watts1" }

and put a new “XY.items” file in the config with

Number Endpoint_Power "example [%.2f W]" {channel="zwave:device:xxxxxx:node162:meter_watts2" }

then after openhab has loaded it, then in the channel list the item is linked to both channels, the previous and the new one. I think this is a bug, is it ?

Best, Markus

Hmm yes I can reproduce this!

1 Like
1 Like

Thanks ! I’ll check with the next update that it works for me and report if needed.

I’m still working on it. The current PR breaks multiple channels.

Hi, there is something else which I noticed with 4.2, but this is harder to quantify. I am running OH on a small Raspberry Pi 3B. With OH 4.2 I noticed that a few times the system became unresponsive running a rule triggered by an event, only doing it with up to 30 sec delays. I don’t know how to debug or trace this to make a meaningful ticket, I do lack the knowledge of the internals of OH. It is also not very frequent, in recent days I restarted the system once to fix the responsiveness. But maybe this was noticed by others who know how to trace and make this reproducible ?

How much memory ? 32bit or 64bit OS/Java version?

This is the welcome page with all infos:

###############################################################################
###############  openhabian  ##################################################
###############################################################################
##        Ip = 192.168.124.9
##   Release = Raspbian GNU/Linux 12 (bookworm)
##    Kernel = Linux 6.1.21-v7+
##  Platform = Raspberry Pi 3 Model B Rev 1.2
##    Uptime = 4 day(s). 15:37:53
## CPU Usage = 2.76% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
##  CPU Load = 1m: 0.12, 5m: 0.09, 15m: 0.06
##    Memory = Free: 0.03GB (3%), Used: 0.97GB (97%), Total: 0.94GB
##      Swap = Free: 2.14GB (96%), Used: 0.09GB (4%), Total: 2.24GB
##      Root = Free: 19.96GB (72%), Used: 7.58GB (28%), Total: 29.04GB
##   Updates = 2 apt updates available.
##  Sessions = 1 session(s)
## Processes = 131 running processes of 32768 maximum processes
###############################################################################```

Thanks, this shows a total of 1GB memory and only 3% available. This is not enough to run openHAB 4 „smoothly“ …

I actually noticed this awhile ago (prior to 4.2), but didn’t think to report it as a bug.

For anyone else who runs into this problem, the quick-fix solution is to comment out the item, save the file, then uncomment+save to recreate it without the old links.

Hi @hmerk, this is a normal RP3, the machine always max-out the 1GB, the importance is the swap space and how badly the machine is actually swapping. You see that the swap is used 4% and the machine is perfectly fine as a web-server and logging into it, or working with the web-interfaces of OH. This machine runs fine since OH 1.7 or so, OH 4.1.2 included. Only in 4.2 the responsiveness is sometimes bad. I am trying to monitor this. I have attached some cockpit screen shots on the amount of I/O, the machine is basically idle w.r.t. I/O as you can see. But this is a normal RP3, and the system in general is fine. This is why I said, I have a hard time quantifying what the issue is, if it would be a system issue it would be simpler, but it seems to be some sort of issue in OH or ZWave or something. I fully understand that a bug that is not reproducible is hard to fix. I was just wondering if my system is the only one reporting this.

Hi @rpwong, I didn’t notice it before, but I only recently got new modules to install, so I may not have tested the old version so much.

Please check our system recommendation in the docs:

We recommend to get a dedicated Raspberry Pi 4 

It might have worked for you running openHAB on a Pi3, but without anything popping up in the logs, it is hard to judge what’s going wrong.

Hi @hmerk, I agree, the note is outdated and should be replaced eventually. But as I said, there is no sign that it struggles with the workload from the system monitoring (4 CPU cores, all mostly idle). I’d say a large fraction of OH installations is still on RP3s, don’t you think ? (I am planning to do the shift to a more modern machine, together with other changes to my setup I am preparing to replace outdated zwave notes).

If there are no other reports on this, then it is probably my setup. Unless I can debug this further and give more information, it is hard to speculate.

Thank you @jimtng :pray: I mentioned this issue several time on GitHub but always deleted :slight_smile:

@milo can you post the links to your github issues? It would be good to link them to the PR.

One is this

@jimtng File-configured item profile is not updated in Admin UI (only after reboot) · Issue #4277 · openhab/openhab-core · GitHub