Thing configuration doesn't get updated when changing .things file

I am running into some weird behaviour when updating Thing configuration parameters through the .things file. I’m using openHAB 3.1.0 and experience the following, with different bindings (Onkyo, SMTP mail, OpenTherm).

Let’s say a Thing has a configuration parameter A with value 1 when openHAB was first launched (after a reboot, or a restart of the openHAB service).

Now, when I change the .things file and set the value of parameter A to 2, the things file is reloaded, the Thing gets recycled and the log shows the initialize() is called and the new configuration value is used. The new value is also seen in the Thing properties in the web UI.

When I now change the value back to 1, the .things file is reloaded, the Thing is again recycled, log shows that initialize() is called… but the value of the configuration parameter is not updated. The settings on the web UI still show the old value (2) and based on logging and behavior, I can tell it’s is still using the old value as well.

After changing the values of different Things from different bindings, I noticed that changing a setting to any other value than what was initially in the .things file triggers a reload of the configuration. Changing any of the values back to its original value is ignored, even though the log shows that the .things file is reloaded and the initialize() of the Thing is called.

As an example, here I am changing the IP address of the Onkyo Thing from it’s original value 172.16.10.7 to 172.16.10.8. So far so good. Then I am changing it back to 172.16.10.7 but it doesn’t get updated. Then changing it to 172.16.10.20 which is again fine. Then back to 172.16.10.7, which again is ignored. Then to 172.16.10.8 which is fine and one final time back to 172.16.10.7 which is ignored.

2021-08-22 18:36:41.487 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onkyo.things'
2021-08-22 18:36:41.580 [INFO ] [.onkyo.internal.handler.OnkyoHandler] - Using configuration: ipAddress = 172.16.10.8, port = 60128, udn = null, refreshInterval = 60, volumeLimit = 50, volumeScale = 1.0
2021-08-22 18:37:21.972 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onkyo.things'
2021-08-22 18:38:16.592 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onkyo.things'
2021-08-22 18:38:16.700 [INFO ] [.onkyo.internal.handler.OnkyoHandler] - Using configuration: ipAddress = 172.16.10.20, port = 60128, udn = null, refreshInterval = 60, volumeLimit = 50, volumeScale = 1.0
2021-08-22 18:38:29.224 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onkyo.things'
2021-08-22 18:38:44.701 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onkyo.things'
2021-08-22 18:38:44.787 [INFO ] [.onkyo.internal.handler.OnkyoHandler] - Using configuration: ipAddress = 172.16.10.8, port = 60128, udn = null, refreshInterval = 60, volumeLimit = 50, volumeScale = 1.0
2021-08-22 18:46:27.969 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onkyo.things'

Does anyone experience a similar behavior ?

1 Like

I can’t quite follow along, but it is known that changes to Things files don’t always get picked up by openHAB at runtime (even if the log says that the Things file has been reloaded). You can restart openHAB, or I do this.

1 Like

Thanks, that works