<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<workItem from="1605542056704" duration="1640000" />
<workItem from="1605597648537" duration="7658000" />
<workItem from="1605690676577" duration="7108000" />
- <workItem from="1605973078856" duration="2167000" />
- </task>
- <task id="LOCAL-00358" summary=".">
- <created>1604224463669</created>
- <option name="number" value="00358" />
- <option name="presentableId" value="LOCAL-00358" />
- <option name="project" value="LOCAL" />
- <updated>1604224463669</updated>
+ <workItem from="1605973078856" duration="4587000" />
</task>
<task id="LOCAL-00359" summary=".">
<created>1604228663244</created>
<option name="project" value="LOCAL" />
<updated>1605973216962</updated>
</task>
- <option name="localTasksCounter" value="407" />
+ <task id="LOCAL-00407" summary=".">
+ <created>1605976064822</created>
+ <option name="number" value="00407" />
+ <option name="presentableId" value="LOCAL-00407" />
+ <option name="project" value="LOCAL" />
+ <updated>1605976064822</updated>
+ </task>
+ <option name="localTasksCounter" value="408" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
</state>
<state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.1707.920@0.0.1707.920" timestamp="1604146905948" />
<state x="1110" y="259" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.2560.1040@0.0.2560.1040" timestamp="1605437484620" />
- <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605973204132">
+ <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605976060711">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1605086955514" />
<state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1605188136787" />
- <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605973204132" />
+ <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605976060711" />
<state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605726960903">
<screen x="0" y="0" width="2560" height="1040" />
</state>
function wcToggle()
{
if (getState('wc') == 1) {
- execScene('wc/off');
+ wcOff();
} else {
wcOn();
}
}
+function wcOff()
+{
+ execScene('wc/off');
+}
+
function sdbToggle()
{
if (getState('sdb') == 1) {
function wcVMCOn()
{
- // This cancel a previous call to vmc off
- $rand = rand(100000, 1000000);
- setState('wcTimeout', $rand);
// Start VMC
insteonCommand('0?1134=I=0=0');
}
function wcVMCOff($timeout = 600)
{
- if ($timeout > 0) {
- runAtEnd('_wcVMCOff(' . $timeout . ');');
- } else {
- _wcVMCOff(0);
+ setState('wcVMCOff', max(getState('wcVMCOff', -1), time() + $timeout));
+ if ($timeout === 0) {
+ execScene('wc/vmc/off');
}
}
-function _wcVMCOff($timeout)
+function checkWCVMC()
{
- if ($timeout === 0) {
- execScene('wc/vmc/off');
+ $offtime = getState('wcVMCOff', -1);
+ $time = time();
+ if ($offtime == -1 || $offtime > $time) {
return;
}
- delayHttpCall(WEB_ROOT . 'script/vmcoff.php?delay=' . $timeout, $timeout + 30);
+ execScene('wc/vmc/off');
}
function delayHttpCall($url, $delay)