I made a super-simple program to test the system, and found it did not send 2 copies of the email:
If
Time is 2:57:00PM
Then
Send Notification to 'Vance GMAIL' content 'Presence is AT HOME'
Else
- No Actions - (To add one, press 'Action')
However, where I am implementing, the code is a little more complicated:
If
$Presence is 1
And $Presence_JUST_CHANGED is 1
Then
Send Notification to 'Vance GMAIL' content 'Presence is AT HOME'
$Presence_JUST_CHANGED = 0
Else
- No Actions - (To add one, press 'Action')
The way this works is the variable Presence indicates if we are at home or not, and it set using some other programs, based on a bunch of inputs, like time schedule, security alarm state (disarmed/home/away), motion detected in certain security alarm zones, etc. The security alarm is a Honeywell Vista which sends some X10 commands based on zone inputs. The ISY994 hears these and takes actions accordingly.
Since I want for some certain things to happen "right after" the state of the Presence variable changes, I added another variable called Presence_JUST_CHANGED which is changed to 1 when the Presence state changes, and if not changed back by another program (like this one), will time-out automatically.
Some how, the upper program sends 1 email like its supposed to, but the bottom program sends 2. Any ideas?