OK guys, after some experimenting I succeeded in what I wanted to achieve. And want to share it with other newbies...
Since the timer (delay) function is not working as I expected (previously started delay-actions are ignored) and it is somewhat unreliable, I searched for another solution. Why is the delay-timer unreliable: if your DomotiGa server is interrupted (power failure, reboot, restart of DomotiGaServer, etc) the action is lost into space and will not do what you expect. Not usefull if you want to switch off your central heating or lights during the night or so.
There are some other things to realize:
You cannot used the Variable Second as a trigger, Minute does work. However you can use the variable Second in conditions. This means that the exact time to trigger the event depends on 'where' in the minute period your event is triggered. If it is triggered at 8:00:59, the first 'minute trigger' takes place 1 second later. If it is triggered at 8:01:01, it will take at least 1 minute. Not a big issue, but good to realize.
How did I configure my timers (e.g. to switch off a light (approx) 5 minutes after being switched on):
1. Define a device (in my case a KAKU-ARC receiver). It got ID number 40
2. Create an Event and Enable it
3. In the Event window: create a trigger (I called it: Trigger each minute (24x7) )
3a. In the Variable tab: set variable Minute <> 60 (variable Second will NOT be evaluated and will not work!)
3b. Save the trigger
4. In the Event window: create a condition (I called it: Light X off in 5 minutes)
4a. Enter the following code
Code: Select all
Dev_40_Value = "On"
AND
DateDiff(Dev_40_LastSeen, Now(), 1)>300
Code: Select all
EXPLANATION
Where 40 is the ID of the device (1st column in the device window)
the last parameter (1) in the function DateDiff means evaluate 'Seconds. In this case 300
I assume that 2=minute, 3=hour, 4=day (how does this proceed? week?month?year?)
I could not find out if it is possible to make annotations in the condition field (to explain what the code means)
4b. Save the Condition
5. In the Event window create an Action (called it: Light X off):
5a. In the Device tab, select the device name and set Value1 to Off
5b. Save the Action
6. Save the Event
This works even after server interruptions since it completely relies on entries in the database records, AND, more important, if you have an interruption in any other system (Tranceiver, RFXCom, etc) it still will execute the trigger as long as the status in the database meets the condition defined at point 4.
Hope this is off any help to others.
Cheers!