Rule doesn't fire

in my OH2, I set up a simple rule, if an item changes:

The item changes (as seen in events.log)

2017-09-16 16:03:04.270 [ItemCommandEvent          ] - Item 'Light_UG_Flur_Ceiling' received command ON

but the action doesn’t take place here in the rule:

rule "Keller Flur umsetzen"
	Item Light_UG_Flur_Ceiling received update
	logInfo("KellerFlur Button", "Der KellerFlur Button hat den UG KellerFlur Status geändert auf: "+Light_UG_Flur_Ceiling.state+".")
	sendCommand(USB_EG_Windfang_04.state, Light_UG_Flur_Ceiling.state)

There’s no log-entry for the item USB_EG_Windfang_04 nor the log-entry (and also no ERROR in openhab.log). just silence. What did I miss?


        Item Light_UG_Flur_Ceiling changed

but I am not clear what you want to do here, I would not expect it to work as written:

First of all, I would recommend to use the method approach for the Item and not the Action; read in the OH2 doc for a full description as to why; second I am not sure why you pass as first argment the state of an item, if you want to use this action, this would need to be the name of the item you want to send a command to. Anyway, I think better would be if you’d use in your case
you would likely not need the .toString addition, but it will not hurt. The above presumes that your intended action was to put the USB_EG_Windfang_04 into the same state as Light_UG_Flur_Ceiling; if this is not the case you will need to adapt this.

Thanks for your help! I found the error in my KNX-configuration.

first of all, the item “Light_UG_Flur_Ceiling” is a light in the cellar. As my KNX-Installation is not yet ready downstairs, but I have an USB-controlled outlet, I’m using this in the meantime, until my electrician finds some time to finish the installation… :wink:

So, I already have the GA for my light and configured not only the switch, but also the response (not sure, if this is the right expression “Rückmeldung” it is in german ETS-speech :wink: ). Thing is, if configured in OH2, the response-GA handles the logic. As I don’t have the actuator connected, the response GA was “dead”. So, if I changed the item in OH2 (I used the sitemap and a Amazon dashbutton), as the response GA was “NULL”, the item state was also NULL the whole time.

So I changed my items configuration and the rule is fine and firing as it should:

/* UG Flur */
// Switch Light_UG_Flur_Ceiling	"Keller Flur"	<switch>	(UG_Flur, Lights)	[ "Switchable" ]	{ knx="1/0/0+1/0/2" }
Switch Light_UG_Flur_Ceiling	"Keller Flur"	<switch>	(UG_Flur, Lights)	[ "Switchable" ]	{ knx="1/0/0" }

PS: You’re right, the typo in sendCommand(USB_EG_Windfang_04.state, Light_UG_Flur_Ceiling.state) was another ERROR (which did come up, as the KNX-response GA was deleted :wink: )