Свойства класса:
Методы класса:
Свойства класса:
Методы класса:
Объекты класса:
setlocale(LC_ALL, 'ru_RU', 'ru_RU.UTF-8', 'ru', 'russian'); $this->setProperty('time_valuta', timeNow()); $this->setProperty('data_valuta', strftime(" %d %B %Y года", time()));
Свойства класса:
Методы класса:
$this->setProperty('volumeLevel',$params['VALUE']); if (IsWindowsOs()) { $volume=round(65535*$params['VALUE']/100); safe_exec('..\\apps\\nircmd\\nircmdc setsysvolume '.$volume); } else { safe_exec('amixer sset PCM,0 '.$params['VALUE'].'%'); } say("Изменилась громкость до ".$params['VALUE']." процентов");
Объекты класса:
$command=$params['command']; $short_command=''; $dt=recognizeTime($command,$short_command); if (preg_match('/скажи сколько врем/uis',$command)) { if ($dt>0) { addScheduledJob("command".$dt,"processCommand('".$short_command."');",$dt); say('Задача принята',2); return; } global $voicemode; $voicemode='on'; say('Сейчас '.timeNow(),2); } elseif (preg_match('/сколько время/uis',$command)) { if ($dt>0) { addScheduledJob("command".$dt,"processCommand('".$short_command."');",$dt); say('Задача принята'); echo $short_command; return; } say('Сейчас '.timeNow()); } elseif (preg_match('/повтори (.+)/uis',$command,$m) || preg_match('/скажи (.+)/uis',$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); }
say("Отключено питание");
Свойства класса:
Методы класса:
//$params["USER_OBJECT"]
//$params["USER_OBJECT"]
Объекты класса:
Свойства класса:
Методы класса:
require(DIR_MODULES.'devices/processHomebridgeMQTT.inc.php');
Объекты класса:
Свойства класса:
Методы класса:
$this->setProperty("uptime", $params["UPTIME"]); $this->setProperty("rxbytes", $params["RXBYTES"]); $this->setProperty("txbytes", $params["TXBYTES"]); $this->setProperty("router", $params["ROUTER"]); $this->setProperty("net", $params["NET"]); $this->setProperty("frequency", $params["FREQ"]); $this->setProperty("mode", $params["WIFI_MODE"]); $this->setProperty("rssi", $params["RSSI"]);
Свойства класса:
Методы класса:
$this->setProperty("updated",time()); $this->setProperty("updatedTime",date('H:i')); if ($this->getProperty('active')) { say(processTitle($this->getProperty('title'))." ".LANG_GENERAL_ACTIVATED."."); } else { say(processTitle($this->getProperty('title'))." ".LANG_GENERAL_DEACTIVATED."."); }
$this->setProperty('active',0);
$this->setProperty('active',1);
Объекты класса:
setGlobal('minMsgLevel','2'); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/nightmode_activate.php'); /* end injection of {SDevices} */
$timerCode=<<<EOT setGlobal('miioRelay04.nl_br', 0); setGlobal('Lamp01.nl_br', 0); setGlobal('Lamp02.nl_br', 0); clearTimeOut('zaderj1'); EOT; setTimeOut('zaderj1', $timerCode, 1); $timerCode=<<<EOT setGlobal('miioRelay04.status', 0); setGlobal('miioRelay04.buttonDatch', 1); setGlobal('Lamp01.status', 0); setGlobal('Lamp01.buttonDatch', 1); setGlobal('Lamp02.status', 0); setGlobal('Lamp02.buttonDatch', 1); clearTimeOut('zaderj2'); EOT; setTimeOut('zaderj2', $timerCode, 2); setGlobal('minMsgLevel','1'); /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/nightmode_deactivate.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/darknessmode_activate.php'); /* end injection of {SDevices} */ if (getGlobal('Openable01.level') != 0) { callMethod('Openable01.close'); } if (getGlobal('Openable02.level') != 0) { callMethod('Openable02.close'); }
/* 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} */
Свойства класса:
Объекты класса:
Методы класса:
Объекты класса:
/* begin injection of {app_radio} */ include_once(DIR_MODULES.'app_radio/app_radio.class.php'); $app_radio = new app_radio(); if(is_array($params)) { foreach($params as $key=>$value) { switch((string)$key) { case 'sta': $app_radio->change_station($params['sta'], $app_radio); break; case 'cmd': $app_radio->control($params['cmd']); break; case 'vol': $app_radio->set_volume($params['vol'], $app_radio); break; default: if($value == 'play' || $value == 'stop') $app_radio->control($value); elseif(strpos($value, 'vol') === 0) $app_radio->set_volume((int)substr($value, 3), $app_radio); elseif(strpos($value, 'sta:') === 0) $app_radio->change_station(substr($value, 4), $app_radio); } } } /* end injection of {app_radio} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Rooms_updateActivityStatus.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Rooms_onIdle.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/Rooms_onActivity.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_statusUpdated.php');
require(DIR_MODULES.'devices/SDevices_logicAction.php');
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SDevices_batteryLevelUpdated.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
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_setTargetTemperature.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_setFanSpeedMode.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_fanSpeedUpdated.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_tempUp.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/SDimmers_setLevel.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_levelWorkUpdated.php'); /* end injection of {SDevices} */
require(DIR_MODULES.'devices/SDimmers_levelUpdated.php');
require(DIR_MODULES.'devices/SDimmers_turnOn.php');
require(DIR_MODULES.'devices/SDimmers_turnOff.php');
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SGroups_turnOn.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/SLedLamp_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLedLamp_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLedLamp_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLedLamp_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLedLamp_paramsUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLedLamp_stateUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SLedLamp_colorUpdated.php'); /* end injection of {SDevices} */
Объекты класса:
setGlobal('mqttLedlamp01.status', 1);
setGlobal('mqttLedlamp01.status', 0);
$KnopNoth; $KnopNoth = 3600; if (getGlobal('mqttLedlamp01.avtovkl') == 1) { if (getGlobal('mqttLedlamp01.status') == 1) { if (getGlobal('mqttLedlamp01.buttonDatch') == 1) { $timerCode=<<<EOT setGlobal('mqttLedlamp01.status', 0); clearTimeOut('SpalnaNoth'); EOT; setTimeOut('SpalnaNoth', $timerCode, (int)($KnopNoth)); } } else { setGlobal('mqttLedlamp01.buttonDatch', 1); clearTimeOut('SpalnaNoth'); } }
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_pause.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} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMedias_setVolume.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
if ($this->getProperty('nl_br') == 0) { $this->setProperty('nl_br', 1); } else { $this->setProperty('nl_br', 0); }
Объекты класса:
$timerCode=<<<EOT if (getGlobal('Lamp04.status') == 1) { setGlobal('Relay05.status', '0'); } EOT; setTimeOut('Lamp04', $timerCode, (int)('1'));
$tiSmoke; $tiSmoke = getGlobal('mqttSmoke01.timeNotchMin') + getGlobal('mqttSmoke01.timeNotchSec'); if ($this->getProperty('status') == '1') { setGlobal('mqttRelay13.status', '1'); $timerCode=<<<EOT setGlobal('mqttRelay13.status', '0'); EOT; setTimeOut('vent_tual', $timerCode, (int)($tiSmoke)); }
$timerCode=<<<EOT if (getGlobal('Lamp05.status') == 1) { setGlobal('Relay05.status', '0'); } EOT; setTimeOut('Lamp05', $timerCode, (int)('1'));
setGlobal('mqttWled01.status', getGlobal('Relay12.status'));
$tvan2; $tvan2 = getGlobal('Relay07.timer'); if (getGlobal('Relay07.avtovkl') == 1) { if (getGlobal('Relay07.status') == 1) { if (getGlobal('Relay07.buttonDatch') == 1) { $timerCode=<<<EOT setGlobal('Relay07.status', 0); setGlobal('Relay09.status', 0); clearTimeOut('vann'); EOT; setTimeOut('vann', $timerCode, (int)($tvan2)); } } else { setGlobal('Relay07.buttonDatch', 1); setGlobal('Relay09.status', 0); clearTimeOut('vann'); } }
$DetKnopSvet; $DetKnopSvet = getGlobal('Relay06.timavtoMinBoot') + getGlobal('Relay06.timavtoSecBoot'); if (getGlobal('Relay06.avtovkl') == 1) { if (getGlobal('Relay06.status') == 1) { setGlobal('mqttRgb02.status', 0); if (getGlobal('Relay06.buttonDatch') == 1) { $timerCode=<<<EOT setGlobal('Relay06.status', 0); clearTimeOut('DetsSvet'); EOT; setTimeOut('DetsSvet', $timerCode, (int)($DetKnopSvet)); } } else { setGlobal('Relay06.buttonDatch', 1); clearTimeOut('DetsSvet'); } }
$ttua1; $ttua1 = getGlobal('Relay08.timer'); if (getGlobal('Relay08.avtovkl') == 1) { if (getGlobal('Relay08.status') == 1) { if (getGlobal('Relay08.buttonDatch') == 1) { $timerCode=<<<EOT setGlobal('Relay08.status', 0); clearTimeOut('tualet'); EOT; setTimeOut('tualet', $timerCode, (int)($ttua1)); } } else { setGlobal('Relay08.buttonDatch', 1); clearTimeOut('tualet'); } } $timerCode=<<<EOT runScript('Vent_toilet'); EOT; setTimeOut('vent_zaderj', $timerCode, (int)('3'));
$KnopSvet; $KnopSvet = getGlobal('Relay05.timavtoMinBoot') + getGlobal('Relay05.timavtoSecBoot'); if (getGlobal('Relay05.avtovkl') == 1) { if (getGlobal('Relay05.status') == 1) { setGlobal('mqttLedlamp01.status', 0); if (getGlobal('Relay05.buttonDatch') == 1) { $timerCode=<<<EOT setGlobal('Relay05.status', 0); clearTimeOut('SpalnaSvet'); EOT; setTimeOut('SpalnaSvet', $timerCode, (int)($KnopSvet)); } } else { setGlobal('Relay05.buttonDatch', 1); clearTimeOut('SpalnaSvet'); } } $timerCode=<<<EOT if (getGlobal('Relay05.status') == 1) { setGlobal('Lamp04.status', '0'); setGlobal('Lamp05.status', '0'); } EOT; setTimeOut('Relay05zaderg', $timerCode, (int)('1'));
$tskitchen3; $tskitchen3 = getGlobal('miioRelay04.timavtoMinBoot') + getGlobal('miioRelay04.timavtoSecBoot'); if (getGlobal('miioRelay04.avtovkl') == 1) { if (getGlobal('miioRelay04.status') == 1) { if (getGlobal('miioRelay04.buttonDatch') == 1) { $timerCode=<<<EOT setGlobal('miioRelay04.status', 0); clearTimeOut('kitchen'); EOT; setTimeOut('kitchen', $timerCode, (int)($tskitchen3)); } } else { setGlobal('miioRelay04.buttonDatch', 1); clearTimeOut('kitchen'); } }
if ($this->getProperty('nl_br') == 1 && $this->getProperty('nl_br') != $this->getProperty('Savenl_br')) { $this->setProperty('brightSave', $this->getProperty('bright')); $this->setProperty('bright', getGlobal('Lamp01.brightNotchnik')); $this->setProperty('Savenl_br', $this->getProperty('nl_br')); } else if ($this->getProperty('nl_br') == 0 && $this->getProperty('nl_br') != $this->getProperty('Savenl_br')) { $this->setProperty('bright', $this->getProperty('brightSave')); $this->setProperty('Savenl_br', $this->getProperty('nl_br')); }
$tiBoot; $tiBoot = getGlobal('Lamp01.timavtoMinBoot') + getGlobal('Lamp01.timavtoSecBoot'); if (getGlobal('Lamp01.avtovkl') == 1) { if (getGlobal('Lamp01.status') == 1) { if (getGlobal('Lamp01.buttonDatch') == 1) { $timerCode=<<<EOT setGlobal('Lamp01.status', 0); clearTimeOut('svetprih'); EOT; setTimeOut('svetprih', $timerCode, (int)($tiBoot)); } } else { setGlobal('Lamp01.buttonDatch', 1); clearTimeOut('svetprih'); } }
if ($this->getProperty('nl_br') == 1 && $this->getProperty('nl_br') != $this->getProperty('Savenl_br')) { $this->setProperty('brightSave', $this->getProperty('bright')); $this->setProperty('bright', getGlobal('Lamp02.brightNotchnik')); $this->setProperty('Savenl_br', $this->getProperty('nl_br')); } else if ($this->getProperty('nl_br') == 0 && $this->getProperty('nl_br') != $this->getProperty('Savenl_br')) { $this->setProperty('bright', $this->getProperty('brightSave')); $this->setProperty('Savenl_br', $this->getProperty('nl_br')); }
$korid; $korid = getGlobal('Lamp02.timavtoMinBoot') + getGlobal('Lamp02.timavtoSecBoot'); if (getGlobal('Lamp02.avtovkl') == 1) { if (getGlobal('Lamp02.status') == 1) { if (getGlobal('Lamp02.buttonDatch') == 1) { $timerCode=<<<EOT setGlobal('Lamp02.status', 0); clearTimeOut('koridor'); EOT; setTimeOut('koridor', $timerCode, (int)($korid)); } } else { setGlobal('Lamp02.buttonDatch', 1); clearTimeOut('koridor'); } }
if ($this->getProperty('status') == 1) { $timerCode=<<<EOT setGlobal('Lampklad.status', 0); clearTimeOut('timerklad'); EOT; setTimeOut('timerklad', $timerCode, (int)($this->getProperty('timer'))); } else { clearTimeOut('timerklad'); }
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SRGB_turnOn.php'); /* end injection of {SDevices} */
/* 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_colorUpdated.php'); /* end injection of {SDevices} */
Объекты класса:
setGlobal('mqttRgb02.status', 0);
setGlobal('mqttRgb02.status', 1);
$hex; $rgb; $hex = gg('mqttRgb02.color'); $rgb = sscanf($hex, "#%02x%02x%02x"); print_r($rgb); /* $dec = hexdec("gg('mqttRgb02.color')"); $rgb = array( 'red' => 0xFF & ($dec >> 0x10), 'green' => 0xFF & ($dec >> 0x8), 'blue' => 0xFF & $dec ); setGlobal('mqttRgb02.red',$rgb['red']); setGlobal('mqttRgb02.green',$rgb['green']); setGlobal('mqttRgb02.blue',$rgb['blue']); */ setGlobal('mqttRgb02.red',$rgb['0']); setGlobal('mqttRgb02.green',$rgb['1']); setGlobal('mqttRgb02.blue',$rgb['2']); if (gg('mqttRgb02.status') == 1) { $vcl = 'ON'; $set; $colorred; $colorgreen; $colorblue; $vcl; $transition; $brightness; $colorred = gg('mqttRgb02.red'); $colorgreen = gg('mqttRgb02.green'); $colorblue = gg('mqttRgb02.blue'); $brightness = gg('mqttRgb02.brightness'); $transition = gg('mqttRgb02.transition'); $set = <<<EOT {"state": "$vcl", "color": {"r": $colorred, "g": $colorgreen, "b": $colorblue}, "brightness": $brightness, "transition": $transition} EOT; setGlobal('mqttRgb02.JSON',$set); }
$set; $colorred; $colorgreen; $colorblue; $vcl; $transition; $brightness; $colorred = gg('mqttRgb02.red'); $colorgreen = gg('mqttRgb02.green'); $colorblue = gg('mqttRgb02.blue'); $brightness = gg('mqttRgb02.brightness'); $transition = gg('mqttRgb02.transition'); if (gg('mqttRgb02.status') == 0) { $vcl = 'OFF'; } elseif (gg('mqttRgb02.status') == 1) { $vcl = 'ON'; } $set = <<<EOT {"state": "$vcl", "color": {"r": $colorred, "g": $colorgreen, "b": $colorblue}, "brightness": $brightness, "transition": $transition} EOT; setGlobal('mqttRgb02.JSON',$set); $DetKnopNoth; $DetKnopNoth = 3600; if (getGlobal('mqttRgb02.avtovkl') == 1) { if (getGlobal('mqttRgb02.status') == 1) { if (getGlobal('mqttRgb02.buttonDatch') == 1) { $timerCode=<<<EOT setGlobal('mqttRgb02.status', 0); clearTimeOut('DetsNoth'); EOT; setTimeOut('DetsNoth', $timerCode, (int)($DetKnopNoth)); } } else { setGlobal('mqttRgb02.buttonDatch', 1); clearTimeOut('DetsNoth'); } }
setGlobal('mqttRgb01.status',1);
setGlobal('mqttRgb01.status',0);
$set; $color; $vcl; $color = gg('mqttRgb01.color'); if (gg('mqttRgb01.status') == 0) { $vcl = 'off'; } elseif (gg('mqttRgb01.status') == 1) { $vcl = 'manual'; } $set = <<<EOT {"mode":"$vcl","hex":"$color"} EOT; setGlobal('mqttRgb01.JSON',$set);
$set; $color; $vcl; $color = gg('mqttRgb01.color'); if (gg('mqttRgb01.status') == 0) { $vcl = 'off'; } elseif (gg('mqttRgb01.status') == 1) { $vcl = 'manual'; setGlobal('Lampprih.status', 0); } $set = <<<EOT {"mode":"$vcl","hex":"$color"} EOT; setGlobal('mqttRgb01.JSON',$set); /* $timeNocSLS; if (getGlobal('mqttRgb01.avtovkl') == 1) { if (getGlobal('mqttRgb01.status') == 1) { if (getGlobal('mqttRgb01.buttonDatch') == 1) { $timeNocSLS = getGlobal('mqttRgb01.timer'); $timerCode=<<<EOT setGlobal('mqttRgb01.status', 0); clearTimeOut('prihSLS'); EOT; setTimeOut('prihSLS', $timerCode, (int)($timeNocSLS)); } } else { setGlobal('mqttRgb01.buttonDatch', 1); clearTimeOut('prihSLS'); } } */
/* $timermqttRgb01boot; $timermqttRgb01datch; $timermqttRgb01boot = $this->getProperty('timavtoMinBoot') + $this->getProperty('timavtoSecBoot'); $timermqttRgb01datch = $this->getProperty('timeavtoMin') + $this->getProperty('timeavtoMinSec'); if ($this->getProperty('buttonDatch') == 1) { setGlobal('mqttRgb01.timer', $timermqttRgb01boot); } else { setGlobal('mqttRgb01.timer', $timermqttRgb01datch); } */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SThermostats_setTargetTemperature.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_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_enable.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_tempUp.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_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/STVs_pause.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_setChannel.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/SVacuums_pause.php'); /* end injection of {SDevices} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_stateUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_colorUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_paramsUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleProc.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_presetUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_addPreset.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_delPreset.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_turnOff.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_cycleSwitch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_getInfo.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SWLED_turnOn.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_valueWorkUpdated.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_valueUpdated.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_unblockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMotions_blockSensor.php'); /* end injection of {SDevices} */
require(DIR_MODULES.'devices/SMotions_motionDetected.php');
Объекты класса:
$ttualet; $ttualet = getGlobal('Relay08.timeavtoMin'); $ttua1; $ttua1 = getGlobal('Relay08.timer'); if (getGlobal('Relay08.avtovkl') == 1) { if (getGlobal('Relay08.metodAvto') == 1 && timeBetween(getGlobal('Relay08.timeOnavtovkl'), getGlobal('Relay08.timeOffavtovkl')) || getGlobal('Relay08.metodAvto') == 0) { if (getGlobal('Relay08.status') != 1) { setGlobal('Relay08.buttonDatch', 0); setGlobal('Relay08.status', 1); } } if (getGlobal('Relay08.buttonDatch') != 1) { $timerCode=<<<EOT setGlobal('Relay08.status', 0); setGlobal('Relay08.buttonDatch', 1); clearTimeOut('tualet'); EOT; setTimeOut('tualet', $timerCode, (int)($ttualet)); } else { $timerCode=<<<EOT setGlobal('Relay08.status', 0); clearTimeOut('tualet'); EOT; setTimeOut('tualet', $timerCode, (int)($ttua1)); } } else { clearTimeOut('tualet'); }
$tivan1; $tivan1 = getGlobal('Relay07.timeavtoMin'); $tvan2; $tvan2 = getGlobal('Relay07.timer'); if (getGlobal('Relay07.avtovkl') == 1) { if (getGlobal('Relay07.metodAvto') == 1 && timeBetween(getGlobal('Relay07.timeOnavtovkl'), getGlobal('Relay07.timeOffavtovkl')) || getGlobal('Relay07.metodAvto') == 0) { if (getGlobal('Relay07.status') != 1) { setGlobal('Relay07.buttonDatch', 0); setGlobal('Relay07.status', 1); } } if (getGlobal('Relay07.buttonDatch') != 1) { $timerCode=<<<EOT setGlobal('Relay07.status', 0); setGlobal('Relay07.buttonDatch', 1); setGlobal('Relay09.status', 0); clearTimeOut('vann'); EOT; setTimeOut('vann', $timerCode, (int)($tivan1)); } else { $timerCode=<<<EOT setGlobal('Relay07.status', 0); setGlobal('Relay09.status', 0); clearTimeOut('vann'); EOT; setTimeOut('vann', $timerCode, (int)($tvan2)); } } else { clearTimeOut('vann'); }
$DetDatNoth; $DetKnopSvet; $DetDatSvet; $DetDatNoth = getGlobal('mqttRgb02.timeavtoMin') + getGlobal('mqttRgb02.timeavtoSec'); $DetKnopSvet = getGlobal('Relay06.timavtoMinBoot') + getGlobal('Relay06.timavtoSecBoot'); $DetDatSvet = getGlobal('Relay06.timeavtoMin') + getGlobal('Relay06.timeavtoSec'); if (getGlobal('Relay06.avtovkl') == 1) { if (getGlobal('Relay06.metodAvto') == 0 && timeBetween(getGlobal('Relay06.timeOnavtovkl'), getGlobal('Relay06.timeOffavtovkl')) || getGlobal('Relay06.metodAvto') == 1 && timeBefore(getGlobal('Relay06.timeOffavtovkl')) && getGlobal('Sensor_light05.value') < getGlobal('Sensor_light05.minValue') || getGlobal('Relay06.metodAvto') == 2 && getGlobal("DarknessMode.active") == 1 && timeAfter('12:00') && timeBefore(getGlobal('Relay06.timeOffavtovkl'))) { if (getGlobal('Relay06.status') != 1) { setGlobal('Relay06.status', '1'); setGlobal('Relay06.buttonDatch', '0'); setGlobal('mqttRgb02.status', '0'); $timerCode=<<<EOT setGlobal('Relay06.status', '0'); setGlobal('Relay06.buttonDatch', '1'); clearTimeOut('DetsSvet'); EOT; setTimeOut('DetsSvet', $timerCode, (int)($DetDatSvet)); } else { if (getGlobal('Relay06.buttonDatch') == 0) { $timerCode=<<<EOT setGlobal('Relay06.status', '0'); setGlobal('Relay06.buttonDatch', '1'); clearTimeOut('DetsSvet'); EOT; setTimeOut('DetsSvet', $timerCode, (int)($DetDatSvet)); } else { $timerCode=<<<EOT setGlobal('Relay06.status', '0'); setGlobal('Relay06.buttonDatch', '1'); clearTimeOut('DetsSvet'); EOT; setTimeOut('DetsSvet', $timerCode, (int)($DetKnopSvet)); } } } } if (getGlobal('mqttRgb02.avtovkl') == 1 && getGlobal('Relay06.status') != 1) { if (timeAfter(getGlobal('Relay06.timeOffavtovkl')) || getGlobal("DarknessMode.active") == 1 && timeBefore('12:00')) { if (getGlobal('mqttRgb02.status') != 1) { setGlobal('mqttRgb02.status', '1'); setGlobal('mqttRgb02.buttonDatch', '0'); $timerCode=<<<EOT setGlobal('mqttRgb02.status', '0'); setGlobal('mqttRgb02.buttonDatch', '1'); clearTimeOut('DetsNoth'); EOT; setTimeOut('DetsNoth', $timerCode, (int)($DetDatNoth)); } else { if (getGlobal('mqttRgb02.buttonDatch') == 0) { $timerCode=<<<EOT setGlobal('mqttRgb02.status', '0'); setGlobal('mqttRgb02.buttonDatch', '1'); clearTimeOut('DetsNoth'); EOT; setTimeOut('DetsNoth', $timerCode, (int)($DetDatNoth)); } } } }
$tiDatch; if (getGlobal('NightMode.active') == 1) { $tiDatch = getGlobal('Lamp01.timeNotchMin') + getGlobal('Lamp01.timeNotchSec'); } else { $tiDatch = getGlobal('Lamp01.timeavtoMin') + getGlobal('Lamp01.timeavtoSec'); } $tiBoot; $tiBoot = getGlobal('Lamp01.timavtoMinBoot') + getGlobal('Lamp01.timavtoSecBoot'); if (getGlobal('Lamp01.avtovkl') == 1) { if (getGlobal('Motion01.status') == 1) { if (getGlobal('Lamp01.metodAvto') == 1 && timeBetween(getGlobal('Lamp01.timeOnavtovkl'), getGlobal('Lamp01.timeOffavtovkl')) || getGlobal('Lamp01.metodAvto') == 0) { if (getGlobal('Lamp01.status') != 1) { if (getGlobal('NightMode.active') == 1) { setGlobal('Lamp01.buttonDatch', 0); setGlobal('Lamp01.nl_br', 1); setGlobal('Lamp01.status', 1); } elseif (getGlobal('NightMode.active') == 0) { setGlobal('Lamp01.buttonDatch', 0); setGlobal('Lamp01.status', 1); } } } if (getGlobal('Lamp01.buttonDatch') != 1) { $timerCode=<<<EOT setGlobal('Lamp01.status', 0); setGlobal('Lamp01.buttonDatch', 1); clearTimeOut('svetprih'); EOT; setTimeOut('svetprih', $timerCode, (int)($tiDatch)); } else { $timerCode=<<<EOT setGlobal('Lamp01.status', 0); clearTimeOut('svetprih'); EOT; setTimeOut('svetprih', $timerCode, (int)($tiBoot)); } } } else { clearTimeOut('svetprih'); }
$DatNoth; $KnopSvet; $DatSvet; $DatNoth = getGlobal('mqttLedlamp01'.'.'.'timeavtoMin') + getGlobal('mqttLedlamp01'.'.'.'timeavtoSec'); $KnopSvet = getGlobal('Relay05'.'.'.'timavtoMinBoot') + getGlobal('Relay05'.'.'.'timavtoSecBoot'); $DatSvet = getGlobal('Relay05'.'.'.'timeavtoMin') + getGlobal('Relay05'.'.'.'timeavtoSec'); if (getGlobal('Lamp04'.'.'.'status') == 0 && getGlobal('Lamp05'.'.'.'status') == 0) { if (getGlobal('Relay05'.'.'.'avtovkl') == 1) { if (getGlobal('Relay05'.'.'.'metodAvto') == 0 && timeBetween(getGlobal('Relay05'.'.'.'timeOnavtovkl'), getGlobal('Relay05'.'.'.'timeOffavtovkl')) || getGlobal('Relay05'.'.'.'metodAvto') == 1 && timeBefore(getGlobal('Relay05'.'.'.'timeOffavtovkl')) && getGlobal('Sensor_light03'.'.'.'value') < getGlobal('Sensor_light03'.'.'.'minValue') || getGlobal('Relay05'.'.'.'metodAvto') == 2 && getGlobal("DarknessMode.active") == 1 && timeAfter('12:00') && timeBefore(getGlobal('Relay05'.'.'.'timeOffavtovkl'))) { if (getGlobal('Relay05'.'.'.'status') != 1) { setGlobal('Relay05'.'.'.'status', '1'); setGlobal('Relay05'.'.'.'buttonDatch', '0'); setGlobal('mqttLedlamp01'.'.'.'status', '0'); $timerCode=<<<EOT setGlobal('Relay05'.'.'.'status', '0'); setGlobal('Relay05'.'.'.'buttonDatch', '1'); clearTimeOut('SpalnaSvet'); EOT; setTimeOut('SpalnaSvet', $timerCode, (int)($DatSvet)); } else { if (getGlobal('Relay05'.'.'.'buttonDatch') == 0) { $timerCode=<<<EOT setGlobal('Relay05'.'.'.'status', '0'); setGlobal('Relay05'.'.'.'buttonDatch', '1'); clearTimeOut('SpalnaSvet'); EOT; setTimeOut('SpalnaSvet', $timerCode, (int)($DatSvet)); } else { $timerCode=<<<EOT setGlobal('Relay05'.'.'.'status', '0'); setGlobal('Relay05'.'.'.'buttonDatch', '1'); clearTimeOut('SpalnaSvet'); EOT; setTimeOut('SpalnaSvet', $timerCode, (int)($KnopSvet)); } } } } if (getGlobal('mqttLedlamp01'.'.'.'avtovkl') == 1 && getGlobal('Relay05'.'.'.'status') != 1) { if (timeAfter(getGlobal('Relay05'.'.'.'timeOffavtovkl')) || getGlobal("DarknessMode.active") == 1 && timeBefore('12:00')) { if (getGlobal('mqttLedlamp01'.'.'.'status') != 1) { setGlobal('mqttLedlamp01'.'.'.'status', '1'); setGlobal('mqttLedlamp01'.'.'.'buttonDatch', '0'); $timerCode=<<<EOT setGlobal('mqttLedlamp01'.'.'.'status', '0'); setGlobal('mqttLedlamp01'.'.'.'buttonDatch', '1'); clearTimeOut('SpalnaNoth'); EOT; setTimeOut('SpalnaNoth', $timerCode, (int)($DatNoth)); } else { if (getGlobal('mqttLedlamp01'.'.'.'buttonDatch') == 0) { $timerCode=<<<EOT setGlobal('mqttLedlamp01'.'.'.'status', '0'); setGlobal('mqttLedlamp01'.'.'.'buttonDatch', '1'); clearTimeOut('SpalnaNoth'); EOT; setTimeOut('SpalnaNoth', $timerCode, (int)($DatNoth)); } } } } }
$tKitchen1; if (getGlobal('NightMode.active') == 1) { $tKitchen1 = getGlobal('miioRelay04.timeNotchMin') + getGlobal('miioRelay04.timeNotchSec'); } else { $tKitchen1 = getGlobal('miioRelay04.timeavtoMin') + getGlobal('miioRelay04.timeavtoSec'); } $tkitchen2; $tkitchen2 = getGlobal('miioRelay04.timavtoMinBoot') + getGlobal('miioRelay04.timavtoSecBoot'); if (getGlobal('miioRelay04.avtovkl') == 1) { if (getGlobal('miioRelay04.metodAvto') == 1 && timeBetween(getGlobal('miioRelay04.timeOnavtovkl'), getGlobal('miioRelay04.timeOffavtovkl')) || getGlobal('miioRelay04.metodAvto') == 0) { if (getGlobal('miioRelay04.status') != 1) { if (getGlobal('NightMode.active') == 1) { setGlobal('miioRelay04.buttonDatch', 0); setGlobal('miioRelay04.nl_br', 1); } elseif (getGlobal('NightMode.active') == 0) { setGlobal('miioRelay04.buttonDatch', 0); setGlobal('miioRelay04.status', 1); } } } if (getGlobal('miioRelay04.buttonDatch') != 1) { $timerCode=<<<EOT setGlobal('miioRelay04.status', 0); setGlobal('miioRelay04.buttonDatch', 1); clearTimeOut('kitchen'); EOT; setTimeOut('kitchen', $timerCode, (int)($tKitchen1)); } else { $timerCode=<<<EOT setGlobal('miioRelay04.status', 0); clearTimeOut('kitchen'); EOT; setTimeOut('kitchen', $timerCode, (int)($tkitchen2)); } } else { clearTimeOut('kitchen'); } if (getGlobal('Openable02.level') == 0 && !getGlobal("DarknessMode.active")) { callMethod('Openable02.open'); }
$tkoridor; if (getGlobal('NightMode.active') == 1) { $tkoridor = getGlobal('Lamp02.timeNotchMin') + getGlobal('Lamp02.timeNotchSec'); } else { $tkoridor = getGlobal('Lamp02.timeavtoMin') + getGlobal('Lamp02.timeavtoSec'); } $korid; $korid = getGlobal('Lamp02.timavtoMinBoot') + getGlobal('Lamp02.timavtoSecBoot'); if (getGlobal('Lamp02.avtovkl') == 1) { if (getGlobal('Lamp02.metodAvto') == 1 && timeBetween(getGlobal('Lamp02.timeOnavtovkl'), getGlobal('Lamp02.timeOffavtovkl')) || getGlobal('Lamp02.metodAvto') == 0) { if (getGlobal('Lamp02.status') != 1) { if (getGlobal('NightMode.active') == 1) { setGlobal('Lamp02.buttonDatch', 0); setGlobal('Lamp02.nl_br', 1); setGlobal('Lamp02.status', 1); } elseif (getGlobal('NightMode.active') == 0) { setGlobal('Lamp02.buttonDatch', 0); setGlobal('Lamp02.status', 1); } } } if (getGlobal('Lamp02.buttonDatch') != 1) { $timerCode=<<<EOT setGlobal('Lamp02.status', 0); setGlobal('Lamp02.buttonDatch', 1); clearTimeOut('koridor'); EOT; setTimeOut('koridor', $timerCode, (int)($tkoridor)); } else { $timerCode=<<<EOT setGlobal('Lamp02.status', 0); clearTimeOut('koridor'); EOT; setTimeOut('koridor', $timerCode, (int)($korid)); } } else { clearTimeOut('koridor'); }
if (getGlobal('Openable01.level') == 0 && !getGlobal("DarknessMode.active")) { callMethod('Openable01.open'); }
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMotions2_motionDetected.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMotions2_unblockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SMotions2_blockSensor.php'); /* end injection of {SDevices} */
Объекты класса:
sleep(2); if (getGlobal('Motion201.status') != 1 && getGlobal('TvZal.Online') == 1) { say('запускаю таймер выключения телевизора',1); $timerCode=<<<EOT if (getGlobal('Motion201.status') != 1 && getGlobal('TvZal.Online') == 1) { setGlobal('TvZal.On_Off', 'ON'); say('Выключаю телевизор',1); } else { # say('Ничего не делаю',1); } EOT; setTimeOut('provdatch', $timerCode, (int)('240')); }
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_close.php'); /* end injection of {SDevices} */
/* 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_open.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenable_statusUpdated.php'); /* end injection of {SDevices} */
Объекты класса:
$this->setProperty('status', ' ');
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenClose_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SOpenClose_unblockSensor.php'); /* end injection of {SDevices} */
require(DIR_MODULES.'devices/SOpenClose_statusUpdated.php');
Объекты класса:
if ($this->getProperty('status') == 0) { callMethod("Lamp03.turnOn"); } else { callMethod("Lamp03.turnOff"); }
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSensors_blockSensor.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SSensors_unblockSensor.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/SBatterySensors_valueUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SBatterySensors_valueWorkVoltageUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/SBatterySensors_valueVoltageUpdated.php'); /* end injection of {SDevices} */
Объекты класса:
Свойства класса:
Объекты класса:
if ($this->getProperty('value') > $this->getProperty('maxValue')) { setGlobal('Relay10.status', 1); } if ($this->getProperty('value') < $this->getProperty('minValue')) { setGlobal('Relay10.status', 0); }
Свойства класса:
Методы класса:
/* 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} */
Свойства класса:
Методы класса:
Объекты класса:
$presmm; $presmm = round($this->getProperty('PascalValue') * 0.750062); setGlobal('PressureSensor01.value', $presmm);
Свойства класса:
Методы класса:
/* 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} */
Свойства класса:
Методы класса:
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STv_switch.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STv_statusUpdated.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STv_turnOn.php'); /* end injection of {SDevices} */
/* begin injection of {SDevices} */ require(DIR_MODULES.'devices/STv_turnOff.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'); }
$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 ((int)gg('ThisComputer.SpaceProblems')>0) { $red_state=1; $details[]=LANG_GENERAL_RUNNING_OUT_SPACE." (".gg('ThisComputer.SpaceProblems_Details').').'; } /* begin injection of {SDevices} */ require(DIR_MODULES.'devices/system_checkstate.php'); /* end injection of {SDevices} */ 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),2); } else { say(LANG_GENERAL_SYSTEM_STATE." ".LANG_GENERAL_RESTORED_TO." ".$state_title,2); } $this->callMethod('stateChanged'); }
$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'); }
Свойства класса:
Методы класса:
Объекты класса:
$paths=array('/var/log/*.1','/var/log/*.2', '/var/log/*.1.*', '/var/log/*.2.*', '/var/log/*.3.*', '/var/log/*.4.*', '/var/log/*.5.*', '/var/log/*.6.*', '/var/log/*.7.*' ); foreach($paths as $p) { safe_exec('rm '.$p); } runScript('Hourly'); runScript('filesClearOld');
$h=(int)date('G',time()); $m=date('i',time()); if (isWeekDay()) { } sg('ThisComputer.DayOfMonthNum',date('d')); sg('ThisComputer.DayOfWeekTXT',date('l')); sg('ThisComputer.MonthTXTalt',date('F')); if (timeBetween(getGlobal('NightModeEnd'),getGlobal('NightModeStart')) && getGlobal('clockChimeEnabled')) { if ($m=="00") { say(timeNow(),1); } } setGlobal('timeNow',date('H:i')); $homeStatus=date('H:i'); if (getGlobal('NobodyHomeMode.active')) { $homeStatus.=' '.LANG_DEVICES_ROOMS_NOBODYHOME; } else { $homeStatus.=' '.LANG_DEVICES_ROOMS_SOMEBODYHOME; } $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("23:30") && (gg("EconomMode.active")!="1") && (gg("NobodyHomeMode.active")=="1")) { callMethod('EconomMode.activate'); } if (timeIs(gg('NightModeStart'))) { callMethod('NightMode.activate'); } elseif (timeIs(gg('NightModeEnd'))) { callMethod('NightMode.deactivate'); } if (timeIs("03:00")) { runScript("systemMaintenance"); } if (gg('ThisComputer.AlarmStatus') && timeIs(gg('ThisComputer.AlarmTime'))) { runScript('MorningAlarm'); }
Свойства класса:
Объекты класса:
Свойства класса:
Методы класса:
Свойства класса:
Методы класса:
$charg=$this->getProperty('Charging'); $Batt=$this->getProperty('BattLevel'); $this->setProperty('battPic','fa fa-battery-empty'); //здесь продумать нужно if ($Batt == 100) { $this->setProperty("BattPic", 'battery-full'); $this->setProperty("BattColor", '#7CFC00'); } elseif ($Batt >= 70) { $this->setProperty("BattColor", '#7CFC00'); $this->setProperty("BattPic", 'battery-three-quarters'); } elseif ($Batt >= 40) { $this->setProperty("BattColor", '#FF8C00'); $this->setProperty("BattPic", 'battery-half'); } elseif ($Batt >= 25) { $this->setProperty("BattColor", '#ff0000'); $this->setProperty("BattPic", 'battery-quarter'); } elseif ($Batt >= 0) { $this->setProperty("BattColor", '#ff0000'); $this->setProperty("BattPic", 'battery-empty'); }
@include_once(ROOT . 'languages/devices_' . SETTINGS_SITE_LANGUAGE . '.php'); @include_once(ROOT . 'languages/devices_default' . '.php'); $ot = $this->object_title; $updatedTime = $this->getProperty('CoordinatesUpdatedTimestamp'); $passed = time() - $updatedTime; $newTimeout=0; if ($passed<10) { $newTimeout = 10; $this->setProperty('updatedText',LANG_DEVICES_PASSED_NOW); } elseif ($passed<60) { $newTimeout = 10; $this->setProperty('updatedText',$passed.' '.LANG_DEVICES_PASSED_SECONDS_AGO); } elseif ($passed<60*60) { $newTimeout = 60; $this->setProperty('updatedText',round($passed/60).' '.LANG_DEVICES_PASSED_MINUTES_AGO); /* } elseif ($passed<12*60*60) { $newTimeout = 60 * 60; $this->setProperty('updatedText',round($passed/60/60).' '.LANG_DEVICES_PASSED_HOURS_AGO); */ } elseif ($passed<20*60*60) { //just time $newTimeout = 60 * 60; $this->setProperty('updatedText',date('H:i',$updatedTime)); } else { //time and date $this->setProperty('updatedText',date('Y-m-d H:i',$updatedTime));// } if ($newTimeout > 0) { setTimeOut($ot.'_updateTime','callMethod("'.$ot.'.setUpdatedText");',$newTimeout); }
$Coordinates=$this->getProperty("Coordinates"); $lat=substr($Coordinates,0,strpos($Coordinates,",")); $lon=substr($Coordinates,strpos($Coordinates,",")+1); $this->setProperty('latitude',$lat); $this->setProperty('longitude',$lon); if($this->getProperty('HomeDistance')>100){ $data_file="http://geocode-maps.yandex.ru/1.x/?geocode=E".$lon.",N".$lat; // адрес xml файла $xml = simplexml_load_file($data_file); // раскладываем xml на массив $res=$xml->{'GeoObjectCollection'}->{'featureMember'}[0]->{'GeoObject'}->{'metaDataProperty'}->{'GeocoderMetaData'}->{'AddressDetails'}->{'Country'}->{'AddressLine'}; $this->setProperty("Location",$res); }else{ $this->setProperty("Location",'Дом'); $this->callMethod('gotHome'); }
//$params["LOCATION_OBJECT"], $params["LOCATION"]
//$params["LOCATION_OBJECT"], $params["LOCATION"]
if ($this->getProperty('Charging') == 1) { $this->setProperty('IconPow', '5.gif'); } else { if ($this->getProperty('BattLevel') <= 20) { $this->setProperty('IconPow', '1.png'); } else if ($this->getProperty('BattLevel') > 20 && $this->getProperty('BattLevel') <= 50) { $this->setProperty('IconPow', '2.png'); } else if ($this->getProperty('BattLevel') > 50 && $this->getProperty('BattLevel') < 90) { $this->setProperty('IconPow', '3.png'); } else if ($this->getProperty('BattLevel') >= 90) { $this->setProperty('IconPow', '4.png'); } }
Объекты класса:
Свойства класса:
Методы класса:
if ($this->getProperty('Status') == 'OFF') { $this->setProperty('updated', time()); $this->setProperty("updatedTime",date('H:i')); $this->callMethodSafe('mUpdatedText'); $this->setProperty('Power', '0'); $this->setProperty('Mode', '1'); }
$ot = $this->object_title; $updatedTime = $this->getProperty('updated'); $passed = time() - $updatedTime; $newTimeout = 0; $passedText = getPassedText($updatedTime); $this->setProperty('updatedText', $passedText); $this->setProperty('updatedNumber', $passed); if ($passed < 10) { $newTimeout = 10; } elseif ($passed < 60) { $newTimeout = 10; } elseif ($passed < 60*60) { $newTimeout = 60; } elseif ($passed < 20*60*60) { $newTimeout = 60 * 60; } if ($newTimeout > 0) { setTimeOut($ot . '_updateTime', 'callMethod("' . $ot . '.mUpdatedText");', $newTimeout); }
if ($this->getProperty('ProgramStatus') == 2 && $this->getProperty('Program') == 0) { $this->setProperty('TextStatus', 'Boil'); $this->setProperty('ProgramStatusHistory', 'Boil'); } else if ($this->getProperty('ProgramStatus') == 2 && $this->getProperty('Program') == 2) { $this->setProperty('TextStatus', 'BoilHeat'); $this->setProperty('ProgramStatusHistory', 'BoilHeat'); } else if ($this->getProperty('ProgramStatus') == 2 && $this->getProperty('Program') == 1) { $this->setProperty('TextStatus', 'Heat'); $this->setProperty('ProgramStatusHistory', 'Heat'); } else if ($this->getProperty('ProgramStatus') != 0 && $this->getProperty('Program') == 3) { $this->setProperty('TextStatus', 'Nightlight'); $this->setProperty('ProgramStatusHistory', 'Nightlight'); } else if ($this->getProperty('ProgramStatus') == 0) { $this->setProperty('TextStatus', 'Off'); }
if ($this->getProperty('Online') == 'offline') { $this->setProperty('OnlineColor', 'FF4500'); } else if ($this->getProperty('Online') == 'online') { $this->setProperty('OnlineColor', '00FF00'); }
$valueTemperature; $valueTemperature = $this->getProperty('valueTemperature'); if ($valueTemperature >= 0 && $valueTemperature <= 30) { setGlobal('Button06.Icon03', 'KettleTemperature_0-30'); $this->setProperty('Images', 'KettleTemperature_CP_0-30'); } else if ($valueTemperature >= 31 && $valueTemperature <= 50) { setGlobal('Button06.Icon03', 'KettleTemperature_30-50'); $this->setProperty('Images', 'KettleTemperature_CP_30-50'); } else if ($valueTemperature >= 51 && $valueTemperature <= 65) { setGlobal('Button06.Icon03', 'KettleTemperature_50-65'); $this->setProperty('Images', 'KettleTemperature_CP_50-65'); } else if ($valueTemperature >= 66 && $valueTemperature <= 80) { setGlobal('Button06.Icon03', 'KettleTemperature_65-80'); $this->setProperty('Images', 'KettleTemperature_CP_65-80'); } else if ($valueTemperature >= 81 && $valueTemperature <= 90) { setGlobal('Button06.Icon03', 'KettleTemperature_80-90'); $this->setProperty('Images', 'KettleTemperature_CP_80-90'); } else if ($valueTemperature >= 91 && $valueTemperature <= 100) { setGlobal('Button06.Icon03', 'KettleTemperature_90-100'); $this->setProperty('Images', 'KettleTemperature_CP_90-100'); } if ($valueTemperature >= 95 && $valueTemperature <= 100 && $this->getProperty('ProgramStatusHistory') == 'Boil' && $this->getProperty('VoiceHistory') == '1') { say('Чайник вскипел, теперь можете пойти на кухню и заварить горячий напиток', 3); $this->setProperty('VoiceHistory', '0'); }
Объекты класса:
if ($this->getProperty('PowerYandexAlice') == 1) { $this->setProperty('Mode', '1'); $this->setProperty('Power', '1'); $this->setProperty('VoiceHistory', '1'); } else if ($this->getProperty('PowerYandexAlice') == 0) { $this->setProperty('Power', '0'); $this->setProperty('VoiceHistory', '0'); } if ($this->getProperty('PowerYandexAlice') == 1 && $this->getProperty('Status') == 'ON') { say('Не могу включить чайник, потому что чайник на данный момент включен', 4); } else if ($this->getProperty('PowerYandexAlice') == 0 && $this->getProperty('Status') == 'OFF') { say('Не могу выключить чайник, потому что чайник на данный момент выключен', 4); }
$KettleSetTemperature; $KettleSetTemperature = $this->getProperty('setTemperature'); if ($this->getProperty('Power') == 1) { if ($this->getProperty('Mode') == 1) { $this->setProperty('BoilHeat', '1'); } else if ($this->getProperty('Mode') == 2) { $this->setProperty('BoilHeat', $KettleSetTemperature); } else if ($this->getProperty('Mode') == 3) { $this->setProperty('Heat', $KettleSetTemperature); } } else if ($this->getProperty('Power') == 0 && $this->getProperty('Status') != 'OFF') { $this->setProperty('BoilHeat', '0'); }
if ($this->getProperty('updatedNumber') >= 120 && $this->getProperty('Power') == 0 && $this->getProperty('NightlightLockOut') == 0) { if (getGlobal("DarknessMode.active") == 0 && getGlobal("NightMode.active") == 0 && $this->getProperty('Nightlight') == 'ON') { $this->setProperty('Nightlight', 'OFF'); } else if (getGlobal("DarknessMode.active") == 0 && getGlobal("NightMode.active") == 1 && $this->getProperty('Nightlight') == 'ON') { $this->setProperty('Nightlight', 'OFF'); } else if (getGlobal("DarknessMode.active") == 1 && getGlobal("NightMode.active") == 1 && $this->getProperty('Nightlight') == 'OFF' && $this->getProperty('Status') == 'OFF') { $this->setProperty('Nightlight', 'ON'); } }
if ($this->getProperty('NightlightYandexAlice') == 1) { $this->setProperty('Nightlight', 'ON'); } else if ($this->getProperty('NightlightYandexAlice') == 0) { $this->setProperty('Nightlight', 'OFF'); }
$color=hexdec(gg('SkyKettleG240S.NightlightColor')); $Red = $color >> 16 & 0xFF; $Green = $color >> 8 & 0xFF; $Blue = $color & 0xFF; $CmdRed=''.$Red.''; $CmdGreen=''.$Green.''; $CmdBlue=''.$Blue.''; sg('SkyKettleG240S.Red',$CmdRed); sg('SkyKettleG240S.Green',$CmdGreen); sg('SkyKettleG240S.Blue',$CmdBlue);
$KettleSayTemp; $KettleSetTemperatureYandexAlice; $KettleSayTemp = implode('', array('На чайнике установлена температура подогрева на ',$this->getProperty('setTemperatureYandexAlice'),' градусов')); $KettleSetTemperatureYandexAlice = $this->getProperty('setTemperatureYandexAlice'); if ($KettleSetTemperatureYandexAlice >= 40) { $this->setProperty('setTemperature', $KettleSetTemperatureYandexAlice); $this->setProperty('Mode', '3'); $this->setProperty('Power', '1'); say($KettleSayTemp, 1); }
if (getGlobal('SkyKettleG240S.BoilStatus') == ON) { say("Включаю чайник",1); } else if (getGlobal('SkyKettleG240S.BoilStatus') == OFF) { say("Чайник закипел. Приятного чаепития!",1); }
, Россия
На форуме: Denis239tp
© 2024 - Site Built By SergeJey | Реквизиты: Курицын С. С. ИНН 762001394609 | Контакты | Публичный договор
SmartLiving