HomeGenie Forum
Automation Program Plugins and Wizard Scripting => Help => Topic started by: Peter1977 on July 30, 2016, 11:47:09 AM
-
Its Probably easy but i can't find it...
How do I Arm or Disarm the Alarm Security System by code ?
Thanks!
-
What i would like to do is: Turn on a certain light at a certain time ONLY when the homegenie alarmsysteem is Disarmed
-
with some search on the forum i found this line to get info is Alarm is armed or not.
But my code (in the new Sheduler) is not working, does someone know whats wrong ?
var securityAlarm = Modules.WithName("Security Alarm System").get(); // or Modules.WithAddress("90").Get();
if (securityAlarm.Level < 1)
{
$$.boundModules.on();
}
Thanks :)
-
Hi,
Did you try with :
securityAlarm.Level.On()
Instead
$$.boundModules.on();
?
Bye
-
Hi,
// Alarme ArmAway
Found the module
var alarme = $$.modules.withAddress("90").get();
Or
var alarme = $$.modules.inDomain("HomeAutomation.HomeGenie.Automation").withAddress("90").get();
I try all of this, nothing works :
alarme.Control.ArmAway();
alarme.Control.On();
alarme.Level.On();
With the script alarme.Level.On(); we got an Error ( Object as no method On )
With the other script we got only Error ()
An idea ?
Cheers
-
Hi All,
I found the way in Script Scheduler for Arm Security Alarm System :
// Arm alarm
var alarm = $$.modules.inDomain("HomeAutomation.Homegenie.Automation").withAddress("90").get();
if( alarm.Exists )
alarm.On();
For found the module you can use only :
var alarm = $$.modules.withAddress("90").get();
but I prefer specify the domain.
For desarm use : alarm.Off();
Cheers
Dani