[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
RE: xPL Timer app needed?
- Subject: RE: xPL Timer app needed?
- From: <jon@xxxxxxxxxxxx>
- Date: Thu, 18 Nov 2004 16:47:35 -0000
Forgive me if I get the terms wrong but I'm working from memory.
I have an event that fires every minute that decrements a global variable
unless the variable is already 0 (so cannot go negative!)
Then I have 2 determinators:
1. Detects "whatever" and sets the global variable to 3 (this
then equals a delay of between 2 and 3 minutes depending upon when the
global was updated) and sets a flag to say "Countdown is true".
2. Checks if (countdown is true) and if (Global is 0) then it
does "whatever" and resets Countdown flag to false.
I use this for simple occupancy detection by re-setting the global variable
to 3 every time movement is detected. This keeps a light on until the
delay
timer finally times out 2-3 mins after last movement.
Regards
Jon Whiten
http://www.whiten.co.uk
-----Original Message-----
From: steve.cooper@xxxxxxx [mailto:steve.cooper@xxxxxxx]
Sent: Thursday, November 18, 2004 3:10 PM
To: ukha_xpl@xxxxxxx
Subject: [ukha_xpl] xPL Timer app needed?
One thing that is missing in xPL is some method of having a dynamic delay.
e.g. I want this to happen 10 minutes after I receive this trigger. At
least I can't think of a way to achieve this, correct me if I'm wrong
please.
So the question is do we put something in xPLHal to enable this or do we
have some sort of xPL timer app that could be used to with determinators.
So when you get a sensor message from device SCOOP-HV.PC1
sensor.basic
{
device=Flag 1
type=FLAG
current=SET
name=My HV flag
}
a determinator would catch that and say you want a 5 minute delay on that
event send out a
control.basic
{
device=SCOOP-HV.PC1
type=delay
current=300
}
then 300 seconds later it sends out a
sensor.basic
{
device=SCOOP-HV.PC1
type=delay
current=0
}
which in turn could trigger another determinator.
Any suggestions welcome this is just a first guess at how it might work.
S.
xPL Main Index |
xPL Thread Index |
xPL Home |
Archives Home
|