]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Fri, 22 Nov 2019 08:29:12 +0000 (09:29 +0100)
committerVincent <vincent@enhydra.fr>
Fri, 22 Nov 2019 08:29:12 +0000 (09:29 +0100)
.idea/workspace.xml
scripts/cron/cron.php
scripts/domoticz_device_event.php
scripts/lib/scenes.php

index f05df114123916893e35d890db7e55c6f89de0c2..caf033c98ab2861205859e0811a5620ced9594ad 100644 (file)
@@ -5,10 +5,7 @@
       <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/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/domoticz.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/domoticz.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/lib/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/weatherstation.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/weatherstation.php" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
         <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
         <item name="LFY(3).db" type="feb32156:DbDataSourceImpl" />
       </path>
-      <path>
-        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
-        <item name="LFY(3).db" type="feb32156:DbDataSourceImpl" />
-        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
-      </path>
-      <path>
-        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
-        <item name="LFY(3).db" type="feb32156:DbDataSourceImpl" />
-        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
-        <item name="main: schema" type="981a47c2:SqliteImplModel$Schema" />
-      </path>
-      <path>
-        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
-        <item name="LFY_ZiGate.db" type="feb32156:DbDataSourceImpl" />
-      </path>
-      <path>
-        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
-        <item name="LFY_ZiGate.db" type="feb32156:DbDataSourceImpl" />
-        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
-      </path>
       <path>
         <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
         <item name="LFY_ZiGate.db" type="feb32156:DbDataSourceImpl" />
-        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
-        <item name="main: schema" type="981a47c2:SqliteImplModel$Schema" />
       </path>
     </expand>
     <select />
       <workItem from="1574065436563" duration="754000" />
       <workItem from="1574066213679" duration="8067000" />
       <workItem from="1574273415760" duration="2973000" />
-      <workItem from="1574323616439" duration="6793000" />
-    </task>
-    <task id="LOCAL-00197" summary=".">
-      <created>1562743327335</created>
-      <option name="number" value="00197" />
-      <option name="presentableId" value="LOCAL-00197" />
-      <option name="project" value="LOCAL" />
-      <updated>1562743327335</updated>
+      <workItem from="1574323616439" duration="9643000" />
     </task>
     <task id="LOCAL-00198" summary=".">
       <created>1562746751936</created>
       <option name="project" value="LOCAL" />
       <updated>1574242924581</updated>
     </task>
-    <option name="localTasksCounter" value="246" />
+    <task id="LOCAL-00246" summary=".">
+      <created>1574340363978</created>
+      <option name="number" value="00246" />
+      <option name="presentableId" value="LOCAL-00246" />
+      <option name="project" value="LOCAL" />
+      <updated>1574340363978</updated>
+    </task>
+    <option name="localTasksCounter" value="247" />
     <servers />
   </component>
   <component name="TodoView">
index 868f6367078b9b8d979176a127f82c01425acda0..54e812b3210cc933dcae0948dcb970324af213d5 100644 (file)
@@ -46,7 +46,7 @@ function cronInsteon($cronmin)
 
 function cronEcoMode($cronmin)
 {
-    if ($cronmin % 5 != 0) {
+    if ($cronmin !== 0) {
         return;
     }
     $ecomode = (int)getState('ecomode');
@@ -159,11 +159,11 @@ function cronWeather($cronmin)
     $weather = json_decode(file_get_contents($cache), true);
     $weather = $weather[0];
     $res['temp'] = round(($weather['Temperature']['Metric']['Value']/* + getState('airtemperature')*/));
-    $res['outdoor_temp'] = toNumber(getDomoticzDeviceStatus(1012), true);
-    $res['outdoor_humidity'] = toNumber(getDomoticzDeviceStatus(1013), true);
-    $res['outdoor_pressure'] = toNumber(getDomoticzDeviceStatus(1014), true);
-    $res['backyard_temp'] = toNumber(getDomoticzDeviceStatus(1005), true);
-    $res['backyard_humidity'] = toNumber(getDomoticzDeviceStatus(1006), true);
+    $res['outdoor_temp'] = toNumber(getDomoticzDeviceStatus(1030), true);
+    $res['outdoor_humidity'] = toNumber(getDomoticzDeviceStatus(1031), true);
+    $res['outdoor_pressure'] = toNumber(getDomoticzDeviceStatus(1032), true);
+    $res['backyard_temp'] = toNumber(getDomoticzDeviceStatus(1025), true);
+    $res['backyard_humidity'] = toNumber(getDomoticzDeviceStatus(1026), true);
     $res['pressure'] = round($weather['Pressure']['Metric']['Value']);
     $res['pressureTendency'] = $weather['PressureTendency']['Code'];
     $res['precipitations24'] = round($weather['PrecipitationSummary']['Past24Hours']['Metric']['Value']);
index e3d11a561ae020c356b52b6b5efdc1f5e42b89ad..44656603fae431a7fdf67427aa9eafdb89591587 100644 (file)
@@ -4,7 +4,7 @@ require_once "import.php";
 
 if ($_GET['device'] == 480) {
     chambreToggle();
-} else if ($_GET['device'] == 1008) {
+} else if ($_GET['device'] == 1033) {
     // Cube
     switch ($_GET['state']) {
         case 'Shake':
index 7d80ee6728a02620b3127ce8f5c7bb754b7a7007..c2a8befca79d9b61867e6e401341671b17310160 100644 (file)
@@ -21,14 +21,6 @@ $home = 15;
 
 $chambrebedgroup = $chambre;
 
-$ecoDevices = [
-    393 => [0, 0], // Prises lit
-    560 => [0, 50], // Raspberry SDB
-    476 => [0, 0], // Raspberry Bureau Sun
-    544 => [0, 0], //Téléphone Cuisine
-    478 => [120, 0],
-];
-$superEcoDevices = [559 => [0, 0], 392 => [0, 0]];
 
 $scenes = [
     'chambre/matin' => [
@@ -564,14 +556,14 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'salon/freebox/off'],
         ['type' => 'scene', 'scene' => 'sdb/ampli/off'],
         ['type' => 'scene', 'scene' => 'chambre/raspberry/off'],
-        ['type' => 'domoticz', 'group' => $ecoDevices, 'command' => false],
+        ['type' => 'domoticz', 'device' => '1', 'switchtype' => 'scene', 'command' => false],
     ],
     'ecomode/super' => [
         ['type' => 'scene', 'scene' => 'ecomode/basic'],
-        ['type' => 'domoticz', 'group' => $superEcoDevices, 'command' => false],
+        ['type' => 'domoticz', 'device' => '2', 'switchtype' => 'scene', 'command' => false],
     ],
     'ecomode/notsuper' => [
-        ['type' => 'domoticz', 'group' => $superEcoDevices, 'command' => true],
+        ['type' => 'domoticz', 'device' => '2', 'switchtype' => 'scene', 'command' => true],
     ],
     'ecomode/on' => [
         ['type' => 'scene', 'scene' => 'ecomode/basic'],
@@ -580,7 +572,7 @@ $scenes = [
     'ecomode/off' => [
         ['type' => 'scene', 'scene' => 'ecomode/notsuper'],
         ['type' => 'scene', 'scene' => 'chambre/raspberry/on', 'when' => ['night' => 0]],
-        ['type' => 'domoticz', 'device' => '2', 'switchtype' => 'scene', 'command' => true, 'priority' => false],
+        ['type' => 'domoticz', 'device' => '1', 'switchtype' => 'scene', 'command' => true, 'priority' => false],
     ],
 ];
 
@@ -660,12 +652,7 @@ function execScene($name, $fromUserAction = false, $transitionTime = null)
         } else if ($action['type'] == 'ecomode') {
             ecoMode($action['mode']);
         } else if ($action['type'] == 'domoticz') {
-            if (isset($action['group'])) {
-                domoticzGroup($action['group'], $action['command']);
-            } else {
-                domoticzSwitch($action['device'], $action['command'], isset($action['switchtype']) ? $action['switchtype'] : 'light', isset($action['priority']) && $action['priority']);
-            }
-
+            domoticzSwitch($action['device'], $action['command'], isset($action['switchtype']) ? $action['switchtype'] : 'light', isset($action['priority']) && $action['priority']);
         } else if ($action['type'] == 'ir') {
             irsend($action['room'], $action['device'], $action['command']);
         } else if ($action['type'] == 'ifttt') {