Свойства класса:
Методы класса:
$volume=round(65535*$params['VALUE']/100); $this->setProperty('volumeLevel',$params['VALUE']); safe_exec('..\\apps\\nircmd\\nircmdc setsysvolume '.$volume); say("Изменилась громкость до ".$params['VALUE']." процентов");
Объекты класса:
say("Отключено питание");
$command=$params['command']; $short_command=''; $dt=recognizeTime($command,$short_command); if (preg_match('/скажи сколько врем/is',$command)) { if ($dt>0) { addScheduledJob("command".$dt,"processCommand('".$short_command."');",$dt); say('Задача принята',2); return; } global $voicemode; $voicemode='on'; say('Сейчас '.timeNow(),2); } elseif (preg_match('/сколько время/is',$command)) { if ($dt>0) { addScheduledJob("command".$dt,"processCommand('".$short_command."');",$dt); say('Задача принята'); echo $short_command; return; } say('Сейчас '.timeNow()); } elseif (preg_match('/повтори (.+)/is',$command,$m) || preg_match('/скажи (.+)/is',$command,$m)) { if ($dt>0) { addScheduledJob("command".$dt,"processCommand('".$short_command."');",$dt); say('Задача принята',2); return; } global $voicemode; $voicemode='on'; say($m[1],2); } else { say('Неизвестная команда...',2); }
Свойства класса:
Методы класса:
$name='Cron_'.$this->object_title; SQLExec("DELETE FROM jobs WHERE title='".$name."'");
$this->setProperty('LastRun',date('Y-m-d H:i:s'));
Объекты класса:
cm('Автополив.turnOn'); say('Обновляем воду',5); SetTimeOut('Антизамерзайка','cm("Автополив.turnOff");',80);
include(DIR_MODULES . 'backup/backup.class.php'); $backup_module = new backup(); $backup_module->create_backup();
Свойства класса:
Методы класса:
Объекты класса:
if (gg('BedroomConditioner.Mode')==gg('BedroomConditioner.OldMode')) return; sg('BedroomConditioner.OldMode',gg('BedroomConditioner.Mode')); switch (gg('BedroomConditioner.Mode')) { case 0: brLinkCommand('BedroomOFF'); say('Кондиционер в спальне выключен',5); break; case 24: brLinkCommand('Bedroom24heat'); say('Кондиционер в спальне +24',5); break; case 124: brLinkCommand('Bedroom22Heatquiet'); say('Кондиционер в спальне +24 тихо',5); break; case 322: brLinkCommand('Bedroom22cool'); say('Кондиционер в спальне 22 охлаждение',5); break; case 3122: brLinkCommand('Bedroom22coolslow'); say('Кондиционер в спальне 22 охлаждение тихо',5); break; }
/*if (gg('MainHeartPump.Mode')==gg('MainHeartPump.OldMode')) return; sg('MainHeartPump.OldMode',gg('MainHeartPump.Mode')); switch (gg('MainHeartPump.Mode')) { case 0: brLinkCommand('ТН Выключить'); say('ТН Выключить',5); break; case 16: brLinkCommand('ТН 16 влево'); say('ТН 16 влево',5); break; case 21: brLinkCommand('ТН 21 влево'); say('ТН 21 влево',5); break; case 22: brLinkCommand('ТН 22 влево'); say('ТН 22 влево',5); break; case 23: brLinkCommand('ТН 23 влево'); say('ТН 23 влево',5); break; case 24: brLinkCommand('ТН 24 влево'); say('ТН 24 влево',5); break; case 25: brLinkCommand('ТН 25 влево'); say('ТН 25 влево',5); break; case 26: brLinkCommand('ТН 26 влево'); say('ТН 26 влево',5); break; case 27: brLinkCommand('ТН 27 влево'); say('ТН 27 влево',5); break; case 28: brLinkCommand('ТН 28 влево'); say('ТН 28 влево',5); break; case 29: brLinkCommand('ТН 29 влево'); say('ТН 29 влево',5); break; case 30: brLinkCommand('ТН 30 влево'); say('ТН 30 влево',5); break; case 31: brLinkCommand('ТН 31 влево'); say('ТН 31 влево',5); break; case 116: brLinkCommand('ТН 16 машет'); say('ТН 16 машет',5); break; case 121: brLinkCommand('ТН 21 машет'); say('ТН 21 машет',5); break; case 122: brLinkCommand('ТН 22 машет'); say('ТН 22 машет',5); break; case 123: brLinkCommand('ТН 23 машет'); say('ТН 23 машет',5); break; case 124: brLinkCommand('ТН 24 машет'); say('ТН 24 машет',5); break; case 125: brLinkCommand('ТН 25 машет'); say('ТН 25 машет',5); break; case 126: brLinkCommand('ТН 26 машет'); say('ТН 26 машет',5); break; case 127: brLinkCommand('ТН 27 машет'); say('ТН 27 машет',5); break; case 128: brLinkCommand('ТН 28 машет'); say('ТН 28 машет',5); break; case 129: brLinkCommand('ТН 29 машет'); say('ТН 29 машет',5); break; case 130: brLinkCommand('ТН 30 машет'); say('ТН 30 машет',5); break; case 131: brLinkCommand('ТН 31 машет'); say('ТН 31 машет',5); break; case 324: brLinkCommand('ТН 24 авто охлаждение'); say('ТН 24 охлаждение',5); break; }*/
$FAN=gg("MainHeartPump.Fan"); if ($FAN="QUIET") $FAN=0; switch (gg("MainHeartPump.Fan")) { case 4: $Power=(gg('MainHeartPump.TempOut')-gg('MainHeartPump.TempIn'))*294; sg('MainHeartPump.PowerOut',round($Power)); break; case 3: $Power=(gg('MainHeartPump.TempOut')-gg('MainHeartPump.TempIn'))*225; sg('MainHeartPump.PowerOut',round($Power)); break; case 2: $Power=(gg('MainHeartPump.TempOut')-gg('MainHeartPump.TempIn'))*181; sg('MainHeartPump.PowerOut',round($Power)); break; case 1: $Power=(gg('MainHeartPump.TempOut')-gg('MainHeartPump.TempIn'))*145; sg('MainHeartPump.PowerOut',round($Power)); break; case 0: $Power=(gg('MainHeartPump.TempOut')-gg('MainHeartPump.TempIn'))*115; sg('MainHeartPump.PowerOut',round($Power)); break; }
Свойства класса:
Методы класса:
//$params['t'] $this->setProperty("updated",time()); $this->setProperty("updatedTime",date("H:i",time())); $this->setProperty("alive",1); $ot=$this->object_title; $alive_timeout=(int)$this->getProperty("aliveTimeOut"); if (!$alive_timeout) { $alive_timeout=30*60; } clearTimeOut($ot."_alive"); setTimeOut($ot."_alive","sg('".$ot.".alive',0);",$alive_timeout); if (!isset($params['h'])) { return; } $old_temp=$this->getProperty('humidity'); $t=round($params['h'],1); if ($t>100) return; $this->setProperty('humidity',$t); if ($params['uptime']) { $this->setProperty('uptime',$params['uptime']); } if ($t>$old_temp) { $d=1; } elseif ($t<$old_temp) { $d=-1; } else { $d=0; } $this->setProperty('direction',$d); $linked_room=$this->getProperty("LinkedRoom"); if ($linked_room) { setGlobal($linked_room.'.Humidity',$t); }
Свойства класса:
Методы класса:
if ($params['status']) { $this->setProperty('status',$params['status']); } $this->setProperty('updatedTimestamp',time()); $this->setProperty("alive",1); $ot=$this->object_title; $alive_timeout=(int)$this->getProperty("aliveTimeOut"); if (!$alive_timeout) { $alive_timeout=12*60*60; } clearTimeOut($ot."_alive"); setTimeOut($ot."_alive","sg('".$ot.".alive',0);",$alive_timeout);
Объекты класса:
Свойства класса:
Методы класса:
$this->setProperty('status',$params['status']); // выставляем статус сенсора $this->setProperty('updatedTimestamp',time()); // выставляем время срабатывания сенсора $this->setProperty('alive',1); $ot=$this->object_title; $alive_timeout=(int)$this->getProperty("aliveTimeOut"); if (!$alive_timeout) { $alive_timeout=24*60*60; } clearTimeOut($ot."_alive"); setTimeOut($ot."_alive","sg('".$ot.".alive',0);",$alive_timeout); if ($params['status']) { $this->setProperty('motionDetected',1); clearTimeOut($this->object_title.'_detected'); setTimeOut($this->object_title.'_detected',"setGlobal('".$this->object_title.".motionDetected',0);",30); $linked_room=$this->getProperty('LinkedRoom'); if ($linked_room!='') { callMethod($linked_room.'.onActivity'); } if ($this->object_title=='sensorMovement3' || $this->object_title=='sensorMovementRemote1' || $this->object_title=='sensorMovementRemote2') { //|| $this->object_title=='sensorMovement5' return; // не реагируем на движение в спальне, по ip-сенсорам и по сенсору на втром этаже } ClearTimeOut("nobodyHome"); SetTimeOut("nobodyHome","callMethod('NobodyHomeMode.activate');", 1*60*60); // выполняем если целый час никого не было if (getGlobal('NobodyHomeMode.active')) { callMethod('NobodyHomeMode.deactivate'); } $last_register=registeredEventTime('inhouseMovement'); // проверяем когда в последний раз срабатывало событие "движение внутри дома" registerEvent('inhouseMovement',$this->name,2); // регистрируем событие "движение внутри дома" if (timeBetween('05:00', '12:00') && ((time()-$last_register)>2*60*60)) { runScript('Greeting'); // запускаем скрипт "доброе утро" } }
Объекты класса:
Свойства класса:
Объекты класса:
Свойства класса:
Объекты класса:
Свойства класса:
Методы класса:
$this->setProperty('active',0);
$this->setProperty('active',1);
$this->setProperty("updated",time()); $this->setProperty("updatedTime",date('H:i')); if ($this->getProperty('active')) { say("Режим ".$this->getProperty('title')." активирован.",3); } else { say("Режим ".$this->getProperty('title')." выключен.", 3); }
Объекты класса:
setGlobal('minMsgLevel','1'); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/nightmode_deactivate.php'); /* end injection of {SDevices} */
setGlobal('minMsgLevel','2'); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/nightmode_activate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/darknessmode_activate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/darknessmode_deactivate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/nobodyhomemode_activate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/nobodyhomemode_deactivate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/econommode_activate.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/econommode_deactivate.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
$this->setProperty("status",1);
$this->setProperty("status",0);
$status=$this->getProperty("status"); if ($status) { $this->callMethod('turnOn'); } else { $this->callMethod('turnOff'); }
$status=$this->getProperty("status",1); if ($status) { $this->callMethod('turnOff'); } else { $this->callMethod('turnOn'); }
Объекты класса:
cm('СветВанная.turnoff'); cm('СветГостинная.turnoff'); cm('СветДетская.turnoff'); cm('СветКорридор.turnoff'); cm('СветКухня.turnoff'); cm('СветМойка.turnoff'); cm('СветСпальня.turnoff'); cm('СветТерраса.turnoff'); cm('СветХолл.turnoff');
//cm('СветВанная.turnon'); cm('СветГостинная.turnon'); cm('СветДетская.turnon'); cm('СветКорридор.turnon'); cm('СветКухня.turnon'); cm('СветМойка.turnon'); cm('СветСпальня.turnon'); cm('СветТерраса.turnon'); cm('СветХолл.turnon');
//say('Обновили воду',5);
Свойства класса:
Методы класса:
/*$oldvalue = $this->getProperty("Light"); $newvalue = $params['v']; if ($oldvalue != $newvalue) { $this->setProperty("Light",$newvalue);} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Rooms_updateActivityStatus.php'); /* end injection of {SDevices} */
$this->setProperty('SomebodyHere',0); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Rooms_onIdle.php'); /* end injection of {SDevices} */
$latestActivity=$this->getProperty('LatestActivity'); $this->setProperty('LatestActivity',time()); $this->setProperty('LatestActivityTime',date('H:i')); $this->setProperty('SomebodyHere',1); $ot=$this->object_title; if ($this->getProperty("IdleDelay")) { $activity_timeout=(int)$this->getProperty("IdleDelay"); } else { $activity_timeout=10*60; } clearTimeOut($ot."_activity_timeout"); setTimeOut($ot."_activity_timeout","callMethod('".$ot.".onIdle');",$activity_timeout); $this->callMethod("updateActivityStatus"); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Rooms_onActivity.php'); /* end injection of {SDevices} */
Объекты класса:
if (gg('Septik.Light')==0) // Уровень всё еще высок (вода не уходит)? {getURL('http://192.168.0.80/gpio?st=1&pin=12', 0);SetTimeOut('Насос работает','cm("Septik.CheckHumidity");',60);}//Включаем насос else {getURL('http://192.168.0.80/gpio?st=0&pin=12', 0);}//Выключаем насос
$newvalue=gg('Septik.Light'); $oldvalue=gg('Septik.oldLight'); if ($newvalue==$oldvalue) {return;} sg('Septik.oldLight',$newvalue); if ($newvalue==0) //Уровень жидкости высокий? {//say("Уровень",5); SetTimeOut('Слив из септика','cm("Septik.CheckHumidity");',120*60);// Да. Ждём отведенное время и пытаемся запустить насос }
$Tmp=round(gg('Outside.Pressure')); sg('Outside.PressureScene',$Tmp);
if (gg('ThisComputer.Econom')==1) {Say("Движение на Веранде!",5);} sg('Veranda.SomebodyHere',1); SetTimeOut('SetNoMovmentVeranda',"sg('Veranda.SomebodyHere',0);",60*5); //Запустить таймер, который обнулит присутствие
if (gg('ThisComputer.Econom')==1) {Say("Движение в коридоре!",5);} sg('Corridor.SomebodyHere',1); SetTimeOut('SetNoMovmentCorridor',"sg('Corridor.SomebodyHere',0);",60*5); //Запустить таймер, который обнулит присутствие
if (gg('ThisComputer.Econom')==1) {Say("Движение в Детской!",5);} sg('Kinderroom.SomebodyHere',1); SetTimeOut('SetNoMovmentKinderroom',"sg('Kinderroom.SomebodyHere',0);",60*5); //Запустить таймер, который обнулит присутствие
$Tmax=26;//Температура включения охлаждения $Tmin=25;//Температура выключения охлаждения $Tnow=gg('Kitchen.Temperature'); $Tout=gg('Outside.Temperature'); if (gg('ThisComputer.Econom')==1) {//Режим экономный if ($Tnow>=$Tmax & $Tout>15) //Охлаждаем, только если на улице тепло! {cm('MainHeartPump.Cool'); //say("Жарко на кухне!"); } if ($Tnow<=$Tmin & $Tout>15) //Выключаем охлаждение, если на улице тепло! {cm('MainHeartPump.OFF'); //say("Кухня Охладилась!"); } } //Режим не экономичный. Режим ТН задаёт CheckHall
if (gg('ThisComputer.Econom')==1) {Say("Движение на кухне!",5);} sg('Kitchen.SomebodyHere',1); SetTimeOut('SetNoMovmentKitchen',"sg('Kitchen.SomebodyHere',0);",60*5); //Запустить таймер, который обнулит присутствие
if (gg('ThisComputer.Econom')==1) {Say("Движение в Гостиной!",5);} sg('Hall.SomebodyHere',1); SetTimeOut('SetNoMovmentHall',"sg('Hall.SomebodyHere',0);",60*5); //Запустить таймер, который обнулит присутствие
if (gg('ThisComputer.Econom')==1) {Say("Движение в спальне!",5);} sg('Bedroom.SomebodyHere',1); SetTimeOut('SetNoMovmentBedroom',"sg('Bedroom.SomebodyHere',0);",60*5); //Запустить таймер, который обнулит присутствие
$Tnow=gg('Bedroom.Temperature'); //Текущая температура в спальне $Tset=gg('Bedroom.SetTemperature'); //Желаемая температура в спальне $Tmax=26; //Температура включения охлаждения $Tmin=23; //Температура выключения охлаждения $Toutbiv=-5; //Температура выключения обогрева кондеем $Teco=6; //Температура в режиме экономии зимой $Tout=gg('Outside.Temperature'); //Температура на улице if (gg('ThisComputer.Econom')==1) //Экономный режим {$Tset=$Teco; sg('Bedroom.SetTemperature',$Teco);} //Принудительно установили температуру if (gg('ThisComputer.Econom')==1) {cm('СпальняКонвектор.turnOff'); //Режим экономный if ($Tnow>=$Tmax & $Tout>15) {cm('BedroomConditioner.Cool'); //say("Жарко в спальне!"); }else if (($Tnow<=$Tmin & $Tout>10) || ($Tnow>=$Teco & $Tout<=10)) {cm('BedroomConditioner.OFF'); //say("Спальня Охладилась!"); } } else //Не экономный режим if ($Tout>$Toutbiv) {cm('BedroomConditioner.Cool'); // Включаем рабочий режим, если не холодно cm('СпальняКонвектор.turnOff'); }else cm('BedroomConditioner.OFF'); //Если холоднее -5, то выключаем кондей и включаем конвектор if ($Tnow<=$Tset-0.5 & $Tout<=$Toutbiv) {cm('СпальняКонвектор.turnOn'); }elseif ($Tnow>=$Tset) {cm('СпальняКонвектор.turnOff');}
if (gg('ThisComputer.Econom')==1) {Say("Движение на Террасе!",5);} sg('Terrasa.SomebodyHere',1); SetTimeOut('SetNoMovmentTerrasa',"sg('Terrasa.SomebodyHere',0);",60*5); //Запустить таймер, который обнулит присутствие
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDevices_batteryLevelUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDevices_keepAlive.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDevices_setUpdatedText.php'); /* end injection of {SDevices} */
require(DIR_MODULES.'devices/SDevices_logicAction.php');
require(DIR_MODULES.'devices/SDevices_statusUpdated.php');
Свойства класса:
Методы класса:
require(DIR_MODULES.'devices/SButtons_pressed.php');
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCameras_takeSeries.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCameras_takeSnapshot.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCameras_updatePreview.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCameras_motionDetected.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
require(DIR_MODULES.'devices/SControllers_switch.php');
require(DIR_MODULES.'devices/SControllers_turnOff.php');
require(DIR_MODULES.'devices/SControllers_turnOn.php');
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_configUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_tempDown.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_setFanSpeedMode.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_setThermostatMode.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_tempUp.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_thermostatUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_fanSpeedUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SAirConditioners_setTargetTemperature.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_stopLevelMove.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_startLevelUp.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_startLevelDown.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_setLevel.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_levelUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDimmers_levelWorkUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroups_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroups_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroups_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroups_turnOn.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_pause.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_setVolume.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_setSource.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_setChannel.php'); /* end injection of {SDevices} */
Свойства класса:
Объекты класса:
brLinkCommand('Вентилятор_ВКЛ_Speed');
brLinkCommand('Вентилятор_ВЫКЛ');
$this->setProperty('ВЫКЛ',1); getURL('http://192.168.0.77/rcremote?cmd=6112304');
$this->setProperty('ВКЛ',1); getURL('http://192.168.0.77/rcremote?cmd=6112448');
$this->setProperty('ВКЛ',1); SetTimeOut('Перезауск прожектора','cm("ПрожекторВъезд.turnOn");',1*60);
$this->setProperty('ВЫКЛ',1); ClearTimeOut('Перезауск прожектора'); $this->setProperty('ВЫКЛ',1);
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SRGB_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SRGB_setColor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SRGB_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SRGB_colorUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_relay_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_setTargetTemperature.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_tempDown.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_tempUp.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_disable.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_switchEnable.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_enable.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STVs_setVolume.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STVs_setChannel.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STVs_setSource.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STVs_pause.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCounters_pulseDetected.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCounters_refreshStats.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCounters_valueWorkUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SCounters_valueUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroupStates_restore.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroupStates_save.php'); /* end injection of {SDevices} */
Свойства класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLeak_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLeak_unblockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLeak_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLeak_alert.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMotions_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMotions_unblockSensor.php'); /* end injection of {SDevices} */
require(DIR_MODULES.'devices/SMotions_motionDetected.php');
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_levelUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_setLevel.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_open.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_close.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenClose_unblockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenClose_blockSensor.php'); /* end injection of {SDevices} */
require(DIR_MODULES.'devices/SOpenClose_statusUpdated.php');
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSensors_unblockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSensors_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSensors_alert.php'); /* end injection of {SDevices} */
require(DIR_MODULES.'devices/SSensors_valueUpdated.php');
Свойства класса:
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLightSensors_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLightSensors_periodMinValueUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SPowerSensors_loadStatusChanged.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SPowerSensors_valueUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STempHumSensors_valueUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSmoke_unblockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSmoke_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSmoke_alert.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSmoke_statusUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Свойства класса:
Методы класса:
Объекты класса:
$Codercv=gg('RCReciver.RCcode'); //$Codercv=getObject('RCReciver')->getProperty('RCcode'); //say("Принят код $Codercv",2); switch ($Codercv) { case 2007833: cm('Corridor.onActivity'); sg('RCReciver.RCcode',0); //Сбросили принятый код break; case 12876585: sg('RCReciver.RCcode',0); //Сбросили принятый код Say("Открыли дверь сарая!",5); break; }
Методы класса:
Объекты класса:
global $voicemode; $voicemode='off'; processCommand($params['message']);
echo "status received: ".$params['status'];
Свойства класса:
Методы класса:
Объекты класса:
$details=array(); $red_state=0; $yellow_state=0; if ($red_state) { $state='red'; $state_title=LANG_GENERAL_RED; } elseif ($yellow_state) { $state='yellow'; $state_title=LANG_GENERAL_YELLOW; } else { $state='green'; $state_title=LANG_GENERAL_GREEN; } $new_details=implode(". ",$details); if ($this->getProperty("stateDetails")!=$new_details) { $this->setProperty('stateDetails',$new_details); } if ($this->getProperty('stateColor')!=$state) { $this->setProperty('stateColor',$state); $this->setProperty('stateTitle',$state_title); if ($state!='green') { say(LANG_GENERAL_SECURITY_STATE." ".LANG_GENERAL_CHANGED_TO." ".$state_title."."); say(implode(". ",$details)); } else { say(LANG_GENERAL_SECURITY_STATE." ".LANG_GENERAL_RESTORED_TO." ".$state_title); } $this->callMethod('stateChanged'); }
$details=array(); $red_state=0; $yellow_state=0; $cycles=array('states'=>'states','main'=>'main','execs'=>'exec','scheduler'=>'scheduler'); foreach($cycles as $k=>$v) { $tm=getGlobal('ThisComputer.cycle_'.$k.'Run'); if (time()-$tm>5*60) { $red_state=1; $details[]=$v." ".LANG_GENERAL_CYCLE." ".LANG_GENERAL_STOPPED."."; } } $cycles=array('ping'=>'ping','webvars'=>'webvars'); foreach($cycles as $k=>$v) { $tm=getGlobal('ThisComputer.cycle_'.$k.'Run'); if (time()-$tm>10*60) { $yellow_state=1; $details[]=$v." ".LANG_GENERAL_CYCLE." ".LANG_GENERAL_STOPPED."."; } } if ($red_state) { $state='red'; $state_title=LANG_GENERAL_RED; } elseif ($yellow_state) { $state='yellow'; $state_title=LANG_GENERAL_YELLOW; } else { $state='green'; $state_title=LANG_GENERAL_GREEN; } $new_details=implode(". ",$details); if ($this->getProperty("stateDetails")!=$new_details) { $this->setProperty('stateDetails',$new_details); } if ($this->getProperty('stateColor')!=$state) { $this->setProperty('stateColor',$state); $this->setProperty('stateTitle',$state_title); if ($state!='green') { say(LANG_GENERAL_SYSTEM_STATE." ".LANG_GENERAL_CHANGED_TO." ".$state_title."."); say(implode(". ",$details)); } else { say(LANG_GENERAL_SYSTEM_STATE." ".LANG_GENERAL_RESTORED_TO." ".$state_title); } $this->callMethod('stateChanged'); } /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/system_checkstate.php'); /* end injection of {SDevices} */
$details=array(); $red_state=0; $yellow_state=0; if (!isOnline('Internet')) { $yellow_state=1; $details[]=LANG_GENERAL_NO_INTERNET_ACCESS; } if ($red_state) { $state='red'; $state_title=LANG_GENERAL_RED; } elseif ($yellow_state) { $state='yellow'; $state_title=LANG_GENERAL_YELLOW; } else { $state='green'; $state_title=LANG_GENERAL_GREEN; } $new_details=implode(". ",$details); if ($this->getProperty("stateDetails")!=$new_details) { $this->setProperty('stateDetails',$new_details); } if ($this->getProperty('stateColor')!=$state) { $this->setProperty('stateColor',$state); $this->setProperty('stateTitle',$state_title); if ($state!='green') { say(LANG_GENERAL_COMMUNICATION_STATE." ".LANG_GENERAL_CHANGED_TO." ".$state_title."."); say(implode(". ",$details)); } else { say(LANG_GENERAL_COMMUNICATION_STATE." ".LANG_GENERAL_RESTORED_TO." ".$state_title); } $this->callMethod('stateChanged'); }
Свойства класса:
Методы класса:
//$params['t'] $this->setProperty("updated",time()); $this->setProperty("updatedTime",date("H:i",time())); $this->setProperty("alive",1); $ot=$this->object_title; $alive_timeout=(int)$this->getProperty("aliveTimeOut"); if (!$alive_timeout) { $alive_timeout=30*60; } clearTimeOut($ot."_alive"); setTimeOut($ot."_alive","sg('".$ot.".alive',0);",$alive_timeout); if (!isset($params['t'])) { return; } $old_temp=$this->getProperty('temp'); $t=round($params['t'],1); if ($t>110) return; $this->setProperty('temp',$t); if ($params['uptime']) { $this->setProperty('uptime',$params['uptime']); } if ($t>$old_temp) { $d=1; } elseif ($t<$old_temp) { $d=-1; } else { $d=0; } $this->setProperty('direction',$d); $linked_room=$this->getProperty("LinkedRoom"); if ($linked_room) { setGlobal($linked_room.'.Temperature',$t); }
Свойства класса:
Методы класса:
Объекты класса:
$h=(int)date('G',time()); $m=date('i',time()); //Добавил контроль температур rs('AutopolivONOFF'); rs('SportLight_ON_OFF'); //Конец добавки if (isWeekDay()) {} if (($h>=8) && getGlobal('clockChimeEnabled')) { if ($m=="00") { say(timeNow(),2); } } setGlobal('timeNow',date('H:i')); $homeStatus=date('H:i'); if (getGlobal('NobodyHomeMode.active')) { $homeStatus.=' Дома никого'; } else { $homeStatus.=' Дома кто-то есть'; } $homeStatus.=' '.getGlobal('Security.stateDetails'); $homeStatus.=' '.getGlobal('System.stateDetails'); $homeStatus.=' '.getGlobal('Communication.stateDetails'); setGlobal('HomeStatus',$homeStatus); if (timeBetween(getGlobal('SunRiseTime'),getGlobal('SunSetTime')) && getGlobal('isDark')=="1") { setGlobal("isDark",0); callMethod('DarknessMode.deactivate'); } elseif (!timeBetween(getGlobal('SunRiseTime'),getGlobal('SunSetTime')) && getGlobal('isDark')!="1") { setGlobal("isDark",1); callMethod('DarknessMode.activate'); } if (timeIs(getGlobal('SunRiseTime'))) { say('Восходит солнце',2); } if (timeIs(getGlobal('SunSetTime'))) { say('Солнце заходит',2); } if (timeIs("23:30") && (gg("EconomMode.active")!="1") && (gg("NobodyHomeMode.active")=="1")) { say("Похоже никого нет сегодня, можно сэкономить немного."); callMethod('EconomMode.activate'); } if (timeIs('20:00')) { callMethod('NightMode.activate'); } elseif (timeIs('08:00')) { callMethod('NightMode.deactivate'); } if (timeIs("03:00")) { runScript("systemMaintenance"); } if (gg('ThisComputer.AlarmStatus') && timeIs(gg('ThisComputer.AlarmTime'))) { runScript('MorningAlarm'); }
Свойства класса:
Методы класса:
Свойства класса:
Объекты класса:
$status=gg("ТН2.Power"); if ($status) { sg("ТН2.Power",0); } else { sg("ТН2.Power",1); }
if(gg('ТН2.Mode')==4) {sg('ТН2.Mode',0);} else {sg('ТН2.Mode', gg('ТН2.Mode')+1);}
say("эта");
Методы класса:
Объекты класса:
if ($params['serial']=='' && $params['devname']!='') { $params['serial']=$params['devname']; } $device=SQLSelectOne("SELECT * FROM usbdevices WHERE SERIAL LIKE '".$params['serial']."'"); if (!$device['ID']) { // new device connected //say("Подключено новое устройство",1); $device=array(); $device['SERIAL']=$params['serial']; $device['TITLE']='устройство '.$params['devname']; $device['FIRST_FOUND']=date('Y-m-d H:i:s'); $device['LAST_FOUND']=date('Y-m-d H:i:s'); $device['LOG'].=$device['FIRST_FOUND'].' подключено (впервые)'."\n"; $device['ID']=SQLInsert('usbdevices',$device); } else { // device already in our database //say("Подключено ".$device['TITLE'],1); if ($device['USER_ID']) { $user=SQLSelectOne("SELECT * FROM users WHERE ID='".$device['USER_ID']."'"); if ($user['ID']) { //$user['NAME']; // теперь мы знаем имя пользователя, связанного с этим устройством } } $device['LAST_FOUND']=date('Y-m-d H:i:s'); $device['LOG']=$device['LAST_FOUND'].' подключено'."\n".$device['LOG']; SQLUpdate('usbdevices',$device); if ($device['SCRIPT_ID']!='') { runScript($device['SCRIPT_ID'],$params); } elseif ($device['SCRIPT']!='') { eval($device['SCRIPT']); } }
Свойства класса:
Объекты класса:
Свойства класса:
Методы класса:
$this->setProperty("Enable",0);
$this->setProperty("Enable",1);
Объекты класса:
, Россия
На форуме: Mikik
© 2025 - Site Built By SergeJey | Реквизиты: Курицын С. С. ИНН 762001394609 | Контакты | Публичный договор
SmartLiving