Skip to content
Permalink
Browse files

Merge pull request #549 from Alexandr-logrus/alpha

fix
  • Loading branch information...
sergejey committed May 11, 2019
2 parents fd0f34b + 55541ba commit 19a20f2c01e84c77490d3b7797179e3c0b491a4c
@@ -2,24 +2,24 @@
if (defined('DISABLE_SIMPLE_DEVICES') && DISABLE_SIMPLE_DEVICES==1) return;
$ot=$this->object_title;
$ot = $params['object'];
$latestActivity=$this->getProperty('LatestActivity');
$this->setProperty('LatestActivity',time());
$this->setProperty('LatestActivityTime',date('H:i'));
//$latestActivity = $this->getProperty('LatestActivity');
$this->setProperty('LatestActivity', time());
$this->setProperty('LatestActivityTime', date('H:i'));
if (!$this->getProperty('SomebodyHere')) {
$this->setProperty('SomebodyHere',1);
$this->callMethod("updateActivityStatus");
$this->setProperty('SomebodyHere', 1);
$this->callMethod('updateActivityStatus');
}
if ($this->getProperty("IdleDelay")) {
$activity_timeout=(int)$this->getProperty("IdleDelay");
if ($this->getProperty('IdleDelay')) {
$activity_timeout = (int)$this->getProperty('IdleDelay');
} else {
$activity_timeout=10*60;
$activity_timeout = 10*60;
}
setTimeOut($ot."_activity_timeout","callMethod('".$ot.".onIdle');",$activity_timeout);
setTimeOut($ot . '_activity_timeout', "callMethod('" . $ot . ".onIdle');", $activity_timeout);
if (getGlobal('NobodyHomeMode.active')) {
callMethod('NobodyHomeMode.deactivate',array('sensor'=>$params['sensor'],'room'=>$ot));
}
callMethod('NobodyHomeMode.deactivate', array('sensor' => $params['sensor'], 'room' => $ot));
}
@@ -1,3 +1,3 @@
<?php
$this->callMethod("updateActivityStatus");
$this->callMethod('updateActivityStatus');
@@ -8,7 +8,11 @@
foreach($objects as $object_title) {
if (getGlobal($object_title . '.status') != $status) {
usleep(50000);
setGlobal($object_title . '.status', $status);
if ($status) {
callMethodSafe($object_title . '.turnOn', array('sourse' => $params['ORIGINAL_OBJECT_TITLE']));
} else {
callMethodSafe($object_title . '.turnOff', array('sourse' => $params['ORIGINAL_OBJECT_TITLE']));
}
//sleep(1);
}
}
@@ -7,6 +7,6 @@
$total = count($objects);
for ($i = 0; $i < $total; $i++) {
usleep(50000);
callMethodSafe($objects[$i] . '.turnOn');
callMethodSafe($objects[$i] . '.turnOn', array('sourse' => $params['object']));
//sleep(1);
}
@@ -8,7 +8,7 @@
for ($i = 0; $i < $total; $i++) {
if (getGlobal($objects[$i] . '.status')) {
usleep(50000);
callMethodSafe($objects[$i] . '.turnOff');
callMethodSafe($objects[$i] . '.turnOff', array('sourse' => $params['object']));
//sleep(1);
}
}
@@ -8,7 +8,7 @@
for ($i = 0; $i < $total; $i++) {
if (getGlobal($objects[$i] . '.status')) {
usleep(50000);
callMethodSafe($objects[$i] . '.turnOff');
callMethodSafe($objects[$i] . '.turnOff', array('sourse' => $params['object']));
//sleep(1);
}
}
@@ -7,6 +7,6 @@
$total = count($objects);
for ($i = 0; $i < $total; $i++) {
usleep(50000);
callMethodSafe($objects[$i] . '.turnOn');
callMethodSafe($objects[$i] . '.turnOn', array('sourse' => $params['object']));
//sleep(1);
}
@@ -2,7 +2,7 @@
if (defined('DISABLE_SIMPLE_DEVICES') && DISABLE_SIMPLE_DEVICES==1) return;
ClearTimeOut("nobodyHome");
clearTimeOut('nobodyHome');
require(DIR_MODULES.'devices/Rooms_updateActivityStatus.php');
if (!gg('EconomMode.active')) {

0 comments on commit 19a20f2

Please sign in to comment.
You can’t perform that action at this time.