Hi,
I have a rule that sends a picture via email when a door is opened. However, the picture is always a little late and misses the person opening the door.
My rule is like this:
rule "send email with picture when door is opened"
when
Item door_sensor changed from CLOSED to OPEN
then
if (!lock_door.isLocked())
{
lock_door.lock()
try{
sendMail("email@example.com", "door opened", "http://192.168.0.X/jpg/1/image.jpg")
}
finally{
lock_door.unlock()
}
}
I would like to grab the picture immediately and set it into a variable as I suspect that the “sendMail” procedure may be taking a lot of time to create the mail before the picture is actually grabbed, is there a way to do that?
Thanks