Basic rules not working? Surely I'm missing something incredibly simple

(I’m using OH2, build number 596 at the moment)

I can’t seem to get any rules to fire, period. For example, I have one of the Aeon minimotes, and I’ve configured the item in habmin as follows:

I then defined a rule:

rule OfficeMinimote
when
	Item office_minimote_scene changed to 8
then
	logError("TestingRules", "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!test!")
end

I have my log settings turned up (shortened list):

openhab> log:list
Logger                                                      | Level
-------------------------------------------------------------------
ROOT                                                        | WARN
TestingRules                                                | DEBUG
org.openhab.binding.zwave                                   | DEBUG
org.eclipse.smarthome                                       | DEBUG

I then activate scene 8, and from the log (also shortened):

15:30:55.195 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 24: Updating channel state zwave:device:home:node24:scene_number to 8 [DecimalType]
15:30:55.201 [INFO ] [marthome.event.ItemStateChangedEvent] - office_remote_scene changed from 7 to 8

… and that’s it. The rule doesn’t fire. I’ve also tried with the received update syntax and the rule still doesn’t fire. The testing string is never appended to the log.

I’ve also confirmed that the rules were indeed refreshed:

15:28:23.145 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.rules'
15:28:23.339 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.rules'

What am I missing here?

You need “” around the rule name… “OfficeMinimote”

Just added that. The rules refreshed, and still nothing:

15:50:40.119 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.rules'
15:50:40.209 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.rules'
[ ..... ]
15:50:45.090 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 24: Got a value event from Z-Wave network, endpoint = 0, command class = SCENE_ACTIVATION, value = 8
15:50:45.090 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 24: Updating channel state zwave:device:home:node24:scene_number to 8 [DecimalType]
15:50:45.097 [INFO ] [marthome.event.ItemStateChangedEvent] - office_remote_scene changed from 5 to 8

Just to confirm, here’s the newly updated rule:

rule "OfficeMinimote"
when
	Item office_minimote_scene received update
then
	logError("TestingRules", "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!test!")
end

but your rule is looking for an update of office_minimote_scene

1 Like

I may be wrong, but shouldn’ the Logger name be like

org.eclipse.smarthome.model.script.TestingRules

?
To find the correct name, please use logInfo(“TestingRules”,“log test”)
and from karaf

log:display

The ouptput should be like

20:31:30.040 [INFO ] [.smarthome.model.script.TestingRules] - log test

with a short logger name, you could see the leading part of the path.

I was way too embarrassed at the time, but this was totally it. Thank you!