Alive_status_array
|
$list1 = getObjectsByProperty('alive', '=', 1);
$list0 = getObjectsByProperty('alive', '<', 1);
SetGlobal("AllAlive.AllAlive",implode('<br>',$list1));
SetGlobal("AllAlive.AllDead",implode('<br>',$list0));
|
auto_on_detskaya_light
|
$timestamp = strtotime(getGlobal('SunSetTime')) - 2*60*60; // время заката минус два часа
$tm1 = date('H:i',$timestamp);
$tm2 = "20:40";
//$motion02 = gg('Motion_detskaya.status');
if (gg('Switch.status') == 0 & timeBetween($tm1,$tm2) )
{
callMethod('Switch4.turnOn');
}
|
auto_on_koridor_light
|
$tm1 = "07:31";
$tm2 = "21:00";
$motion01 = gg('MotionSensor1.status');
$lightsensor01 = gg('LightSensor.value');
if ($motion01 == 1 & gg('Switch1.status ') == 0 & $lightsensor01 < 500 & timeBetween($tm1,$tm2) )
{
callMethod('Switch1.turnOn');
}
|
Hourly
|
Выполняется каждый час
|
motionDetected
|
Сработал детектор движения на веб-камере
DebMes("Motion detected: ".serialize($params));
callMethod('MotionSensorCam.motionDetected');
setTimeOut('motionDetectedTimer','runScript("camImagesProcess");',10);
if (getGlobal('ThisComputer'.'.'.'WebCamMotionAuto')) {
setTimeOut('stopWebCamDetection', " runScript('manageWebCamMotion', array('stop'=>'1'));", (int)('60'));
}
|
NobodyHome
|
Срабатывает, когда никого дома нет
say('Включаю режим экономии', 2);
callMethod('EconomMode'.'.'.'activate');
if (getGlobal('ThisComputer'.'.'.'WebCamMotionAuto')) {
runScript('manageWebCamMotion', array('start'=>'1'));
}
|
SomebodyHome
|
Срабатывает в том случае, когда кто-то появился дома
callMethod('EconomMode'.'.'.'deactivate');
if (timeBetween('8.00', '20.00')) {
say('Здравствуйте!', 2);
}
runScript('reportStatus', array());
if (getGlobal('ThisComputer'.'.'.'WebCamMotionAuto')) {
setTimeOut('stopWebCamDetection', " runScript('manageWebCamMotion', array('stop'=>'1'));", (int)('60'));
}
|
startUp
|
Система загружена
say('Система загружена', 2);
runScript('tellIPAddress', array());
|
turnOffEverything
|
Выключить все приборы
$objects=array('Switch1','Switch2','Switch3','Switch4','Switch5','Кухнявыключатель2(картина)','Кухнявыключатель2(стол)');
foreach($objects as $o) {
callMethod($o.'.turnoff');
}
|