OH 2.4: "System started" triggered if Thing added/removed


my rule with the condition “System started” is triggered if I add a discovered Thing from Inbox to the Configuration. Also if I remove a Thing from Configuration.
Is this correct?

Thank you,

According to @mstormi I believe that is normal. He mentioned this in another thread.

1 Like

I think he mentions it here.

Yes I read it in the OH documentation. But I was not sure since I do not use .items/.things files. Just Paper UI and the configuration is saved in JSON DB.

My statement is on files only. It is NOT normal or intended when you use PaperUI/JSONDB.

1 Like

Hmmm. On another thread (the one Bruce linked to I think) someone mentioned that this just started happening going from 2.5 M6 to 2.5 RC1 but this is the first report I’ve seen of this occurring on 2.4, which has been out for quite some time.

Do you have Simple Mode turned on? I ask because the other report indicates it’s the linking a Channel to an Item that triggers the Rule to run. If you don’t have Simple Mode turned on than this would be different since there would be no linking going on when you accept the Thing from the Inbox.

Is there an event on the event bus that captures this trigger? Maybe putting the event bus logger into debug or trace level logging will show what event is actually causing the System started Rule to run.

1 Like

No, Simple Mode option is OFF in Paper UI - Configuration - System - Item linking.
How to enable a trace for an event bus logger?


log4j2.logger.events.level = INFO


log4j2.logger.events.level = TRACE

Sould it also work as console command?
But there are not more messages in openhab.log than before with:
openhab> log:set TRACE logger.events.level

Rich’s example for org.ops4j.pax.logging.cfg was missing something like…

log4j2.logger.events.name = org.eclipse.smarthome.events
log:set TRACE org.eclipse.smarthome.events

This will also create the entry in org.ops4j.pax.logging.cfg.

But there are also not more messages then with INFO log level.

That’s already in the default log file. I only showed which line to change to adjust the log level of the existing events logger.

Maybe other recommendations? There are not more messages in TRACE log level.

I created a TRACE using:
openhab> log:set TRACE org.eclipse.smarthome
openhab> log:set TRACE smarthome.event

openhab.log (23.0 KB)

There is a removal of thing “shelly:shellyrgbw2-color:662526” at 2019-12-19 13:38:59.222
and ‘System started’ event at 2019-12-19 13:39:06.726 (execution of initialize.rules).

Well, the logs do show that the Rules are being refreshed. The refresh will trigger the System started event. You need to watch that log and see if you can find some sort of correlation between what happens immediately before those Refreshing log statements each time they occur.

I started to notice this behavior in 2.5M6. I have created a ticket on Git for the core, but given where OpenHAB is headed it is unlikely to get much attention. Since this issue is now appearing in 2.4, I wonder if it is a binding or add on change that is affecting both 2.4 and 2.5, and is causing a System start to trigger, and not changes to the core? For now I just made some changes to my rules so that lights and alarms don’t go crazy every time I make change to an item or thing.

I do not use text file for Things. OH just reloads my Items file when it is changed. I am on 2.5 Stable though.

I don’t use thing files for most of my devices either. I have hybrid approach to items. This issue occurs with PaperUI for me.

Aaah…forgot to mention - I’m on OH 2.5 stable since 2 days. But is the same behaviour. The trace log today was created on OH 2.5.

@rlkoshak Unfortunately I cannot see the reason for refreshing all rules in the log. In my opinion there is nothing interesting between Removed element and first Refreshing resource . But I can provide the full log if necessary.

I am also running 2.5 stable now and the issue persists but I just work around it.