[SOLVED] Milight binding error executing rule

Hi, I’m seeing the below error in the openhab log and the event doesn’t fire:

2015-11-02 15:59:01.112 [ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule ‘Lights on at sunset for 2 hours when away’: org.eclipse.xtext.util.PolymorphicDispatcher$NoSuchMethodException: Couldn’t find method ''assignValue’’ for objects [JvmVoid: (eProxyURI: lighting.rules#xtextLink::0.2.1.2.0.0.1.0.2::0::/1), timer , org.openhab.model.script.internal.actions.TimerImpl@5f553a, org.eclipse.xtext.xbase.interpreter.impl.DefaultEvaluationContext@1c26c04, org.eclipse.xtext.util.CancelIndicator$1@236217]

The rule is:

rule “Lights on at sunset for 2 hours when away”
when
Item Sunset_Event received update ON
then
if (Auto_Away.state == ON) {
sendCommand(Light_AllGroundFloor, ON)
lightsAreOn = true
timer = createTimer(now.plusSeconds(7200)) [|
sendCommand(Light_AllGroundFloor, OFF)
lightsAreOn = false
]
}
end

Any ideas?
Thanks

Hi,
First of all, as this is no problem caused by milight binding, you should not post it unde that categorie.

Did you declare your timer in the rules file ?
I don’t see any delaration of
Var Timer timer = null

So i guess your timer is not initialized.

Best
Hans-Jörg

Apologies, my fault for blindly copying bits from my other rules files -
you’re right the timer was never declared.
Realised shortly after posting it’d gone in wrong category - happy for a
mod to move it, I can’t see how i can do so myself.

So it’s solved now ?
If so, could you please ad [SOLVED] to the title.
Best
Hans-Jörg