Light Time works except when Switch Triggers

I am fairly new to OpenHab, have managed to get my devices in as items and to show in the sitemap. Now I am trying a few rules. The rule in question is supposed to shut off a switch that controls some outdoor lights after 10 seconds (it will be longer once it works). The rule works if I click the light on through the web or when the light kicks on through another rule, the rule does not work when the physical switch pressed.

Do I need to use a different trigger event than ‘changed’?

Item

Switch sw_side_lamp “Side Lamp” {zwave=“14:0:command=switch_binary”}

Rule

var Timer timer = null
rule "Side Light Timer"
when
	Item sw_side_lamp changed
then
	if(sw_side_lamp.state == ON) {
		if(timer==null) {
			// first ON command, so create a timer to turn the light off again
			timer = createTimer(now.plusSeconds(10)) [|
				sendCommand(sw_side_lamp, OFF)
			]
		} else {
			// subsequent ON command, so reschedule the existing timer
			timer.reschedule(now.plusSeconds(10))
		}
	} else if(sw_side_lamp.state == OFF) {
		// remove any previously scheduled timer
		if(timer!=null) {
			timer.cancel
			timer = null
		}	
	}
end

I suggest you try to use “received update” and see if that works. I guess, when you flip the physical switch, the device will send a state update so this should work.

I’ll admit I don’t really see why your rule above should not work, though.

Thanks, I tried that but no change. I also tested it a bit more. If I press the switch and turn the light on openHab show it as off, so I don’t believe that the switch is sending updates to openHab. Did some research and found a similar issue, it is a GE/Jasco 3Way 45609, if the auxillary switch is used it doesn’t communicate the state charge.

I am converting from a Vera system and don’t recall an issue, but the physical switch was used about 1% of the time, mostly triggered by other devices.