<project version="4">
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
- <change afterPath="$PROJECT_DIR$/scripts/vmcoff.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.php" 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" />
+ <change beforePath="$PROJECT_DIR$/scripts/vmcoff.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/vmcoff.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1593501805520" duration="1107000" />
<workItem from="1594399361632" duration="763000" />
<workItem from="1594621701186" duration="596000" />
- <workItem from="1595313798230" duration="4556000" />
- </task>
- <task id="LOCAL-00283" summary=".">
- <created>1580377820162</created>
- <option name="number" value="00283" />
- <option name="presentableId" value="LOCAL-00283" />
- <option name="project" value="LOCAL" />
- <updated>1580377820163</updated>
+ <workItem from="1595313798230" duration="4966000" />
+ <workItem from="1595319860593" duration="474000" />
+ <workItem from="1595398527219" duration="1869000" />
+ <workItem from="1595400793374" duration="2124000" />
</task>
<task id="LOCAL-00284" summary=".">
<created>1580457418659</created>
<option name="project" value="LOCAL" />
<updated>1595314774389</updated>
</task>
- <option name="localTasksCounter" value="332" />
+ <task id="LOCAL-00332" summary=".">
+ <created>1595319345113</created>
+ <option name="number" value="00332" />
+ <option name="presentableId" value="LOCAL-00332" />
+ <option name="project" value="LOCAL" />
+ <updated>1595319345113</updated>
+ </task>
+ <option name="localTasksCounter" value="333" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="760" y="94" key="#Project_Structure/0.0.2560.1040@0.0.2560.1040" timestamp="1592377765650" />
- <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1595314761980">
+ <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1595319323341">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1593086272091" />
- <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1595314761980" />
+ <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1595319323341" />
<state x="1060" y="275" key="FileChooserDialogImpl" timestamp="1590912263817">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<screen x="0" y="0" width="1920" height="1160" />
</state>
<state x="655" y="270" key="Vcs.Push.Dialog.v2/0.0.1920.1160@0.0.1920.1160" timestamp="1591870150868" />
- <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1595315147407">
+ <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1595319893185">
<screen x="0" y="0" width="2560" height="1040" />
</state>
- <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1595315147407" />
+ <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1595319893185" />
</component>
<component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
function cour()
{
$favorites = [
- ['type' => 'light', 'scene' => 'cour/on', 'label' => 'Allumer'],
+ ['type' => 'light', 'scene' => 'cour/auto', 'label' => 'Allumer'],
['type' => 'light', 'scene' => 'cour/off', 'label' => 'éteindre'],
+ ['type' => 'light', 'scene' => 'cour/lumineux', 'label' => 'lumineux'],
+ ['type' => 'light', 'scene' => 'cour/daylight', 'label' => 'jour'],
+ ['type' => 'light', 'scene' => 'cour/croissance', 'label' => 'grow'],
+ ['type' => 'light', 'scene' => 'cour/tropical', 'label' => 'crepuscule tropical'],
['type' => 'separator', 'label' => 'Projecteurs'],
['type' => 'light', 'scene' => 'cour/projecteurs/on', 'label' => 'Allumer'],
['type' => 'light', 'scene' => 'cour/projecteurs/off', 'label' => 'éteindre'],
if (getState('chambreAutoMode') == '1') {
updateChambreAuto();
}
+ if (getState('courAutoMode') == '1') {
+ updateCourAuto();
+ }
checkPlanetarium();
}
['type' => 'scene', 'scene' => 'chambre/off'],
['type' => 'scene', 'scene' => 'sdb/off'],
['type' => 'scene', 'scene' => 'wc/off'],
- ['type' => 'scene', 'scene' => 'cour/off'],
['type' => 'function', 'function' => 'stopHarmony'],
['type' => 'function', 'function' => 'stopAllSqueezebox'],
['type' => 'function', 'function' => 'offAllOMX'],
['type' => 'scene', 'scene' => 'bureau/auto'],
['type' => 'scene', 'scene' => 'chambre/auto'],
['type' => 'scene', 'scene' => 'sdb/on'],
- ['type' => 'scene', 'scene' => 'cour/on'],
+ ['type' => 'scene', 'scene' => 'cour/auto'],
['type' => 'scene', 'scene' => 'chambre/deshumidificateur/on'],
],
'home/hueoff' => [
'salon/freebox/off' => [
['type' => 'domoticz', 'device' => '1439', 'command' => false],
],
- 'cour/on' => [
+ 'cour/auto' => [
+ ['type' => 'domoticz', 'device' => '678', 'command' => true],
+ ['type' => 'function', 'function' => 'courAuto', 'args' => [true]],
+ ],
+ 'cour/daylight' => [
+ ['type' => 'domoticz', 'device' => '678', 'command' => true],
+ ['type' => 'hue', 'group' => $cour, 'scene' => '8RyJJ3Dn7ayPQ8t'],
+ ],
+ 'cour/lumineux' => [
['type' => 'domoticz', 'device' => '678', 'command' => true],
- ['type' => 'hue', 'group' => $cour, 'scene' => '4JQxlqu9utk0geI'],
+ ['type' => 'hue', 'group' => $cour, 'scene' => 'XzV1CuYIdHXPKoJ'],
+ ],
+ 'cour/tropical' => [
+ ['type' => 'domoticz', 'device' => '678', 'command' => true],
+ ['type' => 'hue', 'group' => $cour, 'scene' => 'wBdbymg1w5ZZvtS'],
+ ],
+ 'cour/grow' => [
+ ['type' => 'domoticz', 'device' => '678', 'command' => true],
+ ['type' => 'hue', 'group' => $cour, 'scene' => 'WVanIpWUWjkBjsS'],
],
'cour/off' => [
// ['type' => 'domoticz', 'device' => '678', 'command' => false],
['type' => 'hue', 'group' => $cour, 'scene' => ['on' => false]],
+ ['type' => 'function', 'function' => 'courAuto', 'args' => [false]],
],
'cour/projecteurs/on' => [
['type' => 'domoticz', 'device' => '679', 'command' => true],
$e = explode('/', $name);
- if ($fromUserAction) {
+ if ($fromUserAction && $e[1]!=='auto') {
if ($e[0] == 'chambre') {
chambreAuto(false);
} else if ($e[0] == 'bureau') {
bureauAuto(false);
+ }else if($e[0]=='cour'){
+ courAuto(false);
}
}
}
}
+function courAuto($on = true)
+{
+ if ($on) {
+ setState('courAutoMode', '1');
+ updateCourAuto();
+ } else {
+ setState('courAutoMode', '0');
+ }
+}
+
function updateChambreAuto($transitionTime = null)
{
$hours = intval(date('H'));
execScene('bureau/' . $scene);
}
+function updateCourAuto()
+{
+ if(isDay()){
+ $scene='daylight';
+ }else{
+ $scene='lumineux';
+ }
+ execScene('cour/' . $scene);
+}
+
function wcVMCOn()
{
// This cancel a previous call to vmc off
function delayScene($scene, $delay)
{
- $timeout = $$delay + 30;
- $url = WEB_ROOT . 'scripts/light.php?delay=' . $delay['delay'] . '&scene=' . $scene . '&sid=' . session_id();
+ $timeout = $delay + 30;
+ $url = WEB_ROOT . 'scripts/light.php?delay=' . $delay . '&scene=' . $scene . '&sid=' . session_id();
return delayHttpCall($url, $timeout);
}
\ No newline at end of file
$rand = rand(100000, 1000000);
setState('wcTimeout', $rand);
-sleep($_GET['timeout']);
+sleep($_GET['delay']);
if (getState('wcTimeout') == $rand) {
execScene('wc/vmc/off');
}
\ No newline at end of file