Another "condition" for alerts should be time based. For example if magnetic sensor is triggered between 08:00 - 17:00, then send an email.
Not all of us want to know every time we open a door, but we want to know if a door is opened when we're normally at work. This "condition" would allow us to do just this.
Comments
...Just came up with a work-around for now, though: I'll try having it send an HTTP request to a PHP script hosted at the office, and then let my script handle the time-of-day thing.
Update: Just did what I mentioned above, and it works fine.
For anyone wanting to do something similar: I have the action as "HTTP Request" set to http://my.server.com/twine/?door=[open/closed]
And then in twine/index.php, I just have:
<?php
$door = @$_GET["door"];
$hour = date("H");
if ($door == "open") {
if ($hour >= 18 || $hour <= 6) {
mail("[email protected]", "Door opened after hours!", "Door is $door");
} else {
mail("[email protected]", "Door opened during busines hours", "Door is $door");
}
}
?>