I try to make timer who depens on setpoint value but i have 2 problems.
Number timer_set_dd “Set Time [%.0f]”
Switch test1 “Test 1”
Setpoint item=timer_set_dd icon=“timer” minValue=“0” maxValue=“15” step=“1”
1.1 Furst problem is when try to change value for timer_set_dd from arrows in web interface givving me error
Received unknown command 'Uninitialized' for item 'timer_set_dd'
afret i change item value with arrows in HABdroid no problem in web interface until next restart.
1.2 In HABdroid sitemaps are no dinamic(no live updates) if item valie is 0 and i hit “+” button item recived update ot 1 but in HABdroid still stay 0 and when i hit “+” button again item is updated not to 2 but to 1
- I make this rule bit something wrong with varrible types (may be)
rule "timer test1" when Item test1 received command then var Integer timeset = timer_set_dd.state as DecimalType if(receivedCommand==ON) sendCommand(Relay0, ON) { if(timer0==null) { // first ON command, so create a timer to turn the light off again timer0 = createTimer(now.plusSeconds(timeset)) sendCommand(Relay0, OFF) } else { // subsequent ON command, so reschedule the existing timer timer0.reschedule(now.plusSeconds(timeset)) } } else if(receivedCommand==OFF) { // remove any previously scheduled timer if(timer0!=null) { timer0.cancel timer0 = null } } end
and i have error
Error during the execution of rule 'timer test1': Could not invoke method: org.joda.time.DateTime.plusSeconds(int) on instance: 2015-12-21T07:00:29.765+02:00
somebodey can help me to sove this