Rule executed twice, why?

Hi,

Since the update from 2.2 to 2.3 I ran into a situation were a rule is executed twice without any reason.

rule "callerID"
	when
		Item cidNumber received update
	then 
		logInfo ("Rule callerID","received update!")
	end

In the log file ther is only one mention of Item changed:

2018-07-04 16:01:26.109 [vent.ItemStateChangedEvent] - cidNumber changed from 0xxxxxxxxx0 to 0xxxxxxxxx1

2018-07-04 16:01:27.310 [INFO ] [smarthome.model.script.Rule callerID] - received update!

2018-07-04 16:01:27.310 [INFO ] [smarthome.model.script.Rule callerID] - received update!

Any thoughts of how this can happen?

-ben

Does cidNumber changed twice?
Do you habe the rule twice? Change the text to check.
Try

when
	Item cidNumber changed
then

Hi,

No, for sure.

I just learned that another rule ( in another .rules file) does exactly the same.
I did not notice this until now since it was not shown on screen and it is not critical.

One interesting detail is that all come from a MQTT source, could it be that MQTT is registered twice in OPENHAB2?

-ben

You after using the received update trigger. An update does not require the state to change so in this case I suspect the Item is being updated with the same state which triggers the rule.

Unfortunately I think you need to turn on debug logging in the events logger to see updates to the same state in events.log.

If you trueky only want the rule to trigger when the Item actually changes, use the changed rule trigger instead like Harry suggested.

Hi,

In the mean time I did another search on the web and came across this item.
I tried the Possibe Solution and it worked for me : restart openhab service and problem disappeared.

Thanks to everyone who replied!

-ben