HomeGenie Forum
General Category => Troubleshooting and Support => Topic started by: teo1969 on October 31, 2015, 09:20:22 AM
-
please, how can i read from program code (C#) the status of "Security alaram systsem switch: armed/disarmed"?. i need to report in a variable the status on/off or Armed/Disarmed of the Security alarm system switch.
Thx
Matteo
-
Something like :
When.ModuleParameterChanged( (module, parameter) =>
{
if (module.Is("Security Alarm System") && parameter.Is("Status.Level") && parameter.Value == "1")
{
.....
}
.....
}
1 : armed
0 : not
-
Or if you just need reading the armed status you can use:
var securityAlarm = Modules.WithName("Security Alarm System").Get(); // or Modules.WithAddress("90").Get();
if (securityAlarm.Level > 0)
{
// System is armed
}
else
{
// System is disarmed
}
g.
-
Perfect, thanks.
-
Hi, Gene
Another quick question regarding Alarm:
What type of text / commands can be entered into the "Program to run when armed" in the Alarm Options field?
I would like to receive some form of audio notification on my cellular (using your new HomeGenie Plus Android App - Super cool app!), when the Alarm is switched off, on or triggered.