I've only recently discovered ESPEasy and am tinkering around trying to understand what it can do. My test setup is a D1 Mini, BME280, BH1750, a couple of LEDs, Solar Cell with battery, Analogue input measuring battery voltage and I'm logging that data to ThingSpeak. So far so good.
My current challenge is to set a variable timer for my test "irrigation" system, I can't seem to use a variable in TimerSet? Here's the whole rule:
Code: Select all
on System#Boot do
GPIO,0,1 // Make output set correctly
endon
LET 1,600 // Set morning timer
LET 2,600 // Set afternoon timer
on Clock#Time=ALL,%sunrise+1h% do // 1 hour after sunrise...
GPIO,0,0 // turn on relay
TimerSet,1,%v1% // wait for v1 seconds
endon
on Rules#Timer=1 do // When the timer runs out
GPIO,0,1 // turn off relay
endon
on Clock#Time=ALL,15:30 do // Mid afternoon...
GPIO,0,0 // turn on relay
TimerSet,2,%v2% // wait for v2 seconds
endon
on Rules#Timer=2 do // When the timer runs out
GPIO,0,1 // turn off relay
endon
Variable Result
%v1% 0.00
%V1% %V1%
[var#1] 0
[VAR#1] 0.00
[int#1] 0
[INT#1] 0
With variable 1 set to 600, 60 and 6 and using the syntax in column 1 for the variable in TimerSet, in my rules I get the result in column 2 the log.
Is it possible to use a variable in TimerSet? If so what am I doing wrong with the syntax?
Chris