With Tellstick Duo, I that the detection of a door opening triggers function bell and a send message.
Therefore, I have the file 18.bsh below:
Code: Select all
//Portail entree test de sonnette avec envoi de mail
String on = "ON";
String off = "OFF";
if (deviceIsOn("18")) {
on += ",18";
execFile("C:/nexahome/courrier/mail-portail-on.bat");
}
else if (deviceIsOff("18")){
off += ",18";
execFile("C:/nexahome/courrier/mail-portail-off.bat");
}
if (deviceIsOn("18")) {
on += ",18";
deviceOn("8");
}
executedByCmd();
execParam(getMode());
execParam(on);
execParam(off);
Shipments of messages work.2011-10-08 15:50:54 Script executed (18.bsh), result: [[exec, C:/nexahome/courrier/mail-portail-on.bat, Maison, ON,18, OFF], [device, 8, On]]
2011-10-08 15:50:54 Exec (C:/nexahome/courrier/mail-portail-on.bat)
2011-10-08 15:50:55 :ON 1(2): Turning on device: 8 Carillon - ok
2011-10-08 15:50:55 :ON 2(2): Turning on device: 8 Carillon - ok
2011-10-08 15:50:58 Output: C:\nexahome>set date = (DATE /T)
C:\nexahome>set time = (TIME /T)
C:\nexahome>c:\nexahome\courrier\SendEmail -f xxxxxx@free.fr -t xxxxxx@gmail.com -xu xxxxxxx@gmail.com -xp "xxxxxxx" -u "Portail" -m "Le portail a ete ouvert le 08/10/2011 a 15:50:55,09" -s smtp.gmail.com:587
2011-10-08 15:51:18 Script executed (18.bsh), result: [[exec, C:/nexahome/courrier/mail-portail-off.bat, Maison, ON, OFF,18]]
2011-10-08 15:51:18 Exec (C:/nexahome/courrier/mail-portail-off.bat)
2011-10-08 15:51:22 Output: C:\nexahome>set date = (DATE /T)
C:\nexahome>set time = (TIME /T)
C:\nexahome>c:\nexahome\courrier\SendEmail -f xxxxxx@free.fr -t xxxxxx@gmail.com -xu xxxxxxx@gmail.com -xp "xxxxxxxx" -u "Portail" -m "Le portail a ete referme le 08/10/2011 a 15:51:19,04" -s smtp.gmail.com:587
How to make this work.
Thanks for your advice.
JJ