Hi,
I need help to write a script (don't know which one is best for this task).
I have magnets in doors and windows which is connected to the house alarm. I would like to write a script that sends a SMS telling me which door or window has been opened/closed. Each window/door has its own group address. I know I could write an Event-Script for each group address, but I am trying to avoid creating too many scripts.
This is a typical Even-Script that could be created for each window/door, but is there a way I could collect all scripts in one, and send different SMS depending on which door/window has been opened/closed?
if grp.getvalue('Status - Alarm - On/Off') == true then
require('socket.http')
socket.http.TIMEOUT = 1
socket.http.request('http://wwwwwwwww')
end
Thanks for your help.
BR
Mr.D
I need help to write a script (don't know which one is best for this task).
I have magnets in doors and windows which is connected to the house alarm. I would like to write a script that sends a SMS telling me which door or window has been opened/closed. Each window/door has its own group address. I know I could write an Event-Script for each group address, but I am trying to avoid creating too many scripts.
This is a typical Even-Script that could be created for each window/door, but is there a way I could collect all scripts in one, and send different SMS depending on which door/window has been opened/closed?
if grp.getvalue('Status - Alarm - On/Off') == true then
require('socket.http')
socket.http.TIMEOUT = 1
socket.http.request('http://wwwwwwwww')
end
Thanks for your help.
BR
Mr.D