]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Mon, 30 Mar 2020 07:31:39 +0000 (09:31 +0200)
committerVincent <vincent@enhydra.fr>
Mon, 30 Mar 2020 07:31:39 +0000 (09:31 +0200)
.idea/workspace.xml
config/media.php
scripts/cron/cron.php
scripts/domoticz_device_event.php
scripts/tmdb.php

index 42d5a69af83a0ee79a13c6c90b1482ea3d5f9178..dd09776015725434b0530dea90c1088ae544d7c5 100644 (file)
@@ -3,8 +3,10 @@
   <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/lib/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.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$/config/media.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/media.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/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/tmdb.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1584000517438" duration="2051000" />
       <workItem from="1584004039571" duration="881000" />
       <workItem from="1584286469208" duration="15872000" />
-      <workItem from="1584360826426" duration="175000" />
-    </task>
-    <task id="LOCAL-00267" summary=".">
-      <created>1578382506582</created>
-      <option name="number" value="00267" />
-      <option name="presentableId" value="LOCAL-00267" />
-      <option name="project" value="LOCAL" />
-      <updated>1578382506583</updated>
+      <workItem from="1584360826426" duration="781000" />
+      <workItem from="1584532787349" duration="769000" />
+      <workItem from="1584953069578" duration="777000" />
+      <workItem from="1585434477042" duration="1434000" />
     </task>
     <task id="LOCAL-00268" summary=".">
       <created>1578382650656</created>
       <option name="project" value="LOCAL" />
       <updated>1584344076927</updated>
     </task>
-    <option name="localTasksCounter" value="316" />
+    <task id="LOCAL-00316" summary=".">
+      <created>1584361013567</created>
+      <option name="number" value="00316" />
+      <option name="presentableId" value="LOCAL-00316" />
+      <option name="project" value="LOCAL" />
+      <updated>1584361013567</updated>
+    </task>
+    <option name="localTasksCounter" value="317" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     </state>
     <state x="720" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577298128269" />
     <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1583062669525" />
-    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1584344010653">
+    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1585553434432">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="701" y="114" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1577381105204" />
     <state x="701" y="127" width="1170" height="972" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1582220569877" />
-    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1584344010653" />
+    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1585553434432" />
     <state x="92" y="92" width="2376" height="856" key="DiffContextDialog" timestamp="1580377344165">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="873" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1584350540478" />
-    <state x="980" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1584360826870">
+    <state x="1456" y="240" key="com.intellij.ide.util.TipDialog" timestamp="1585434659271">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="343" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577380394903" />
     <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1582201881167" />
-    <state x="980" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1584360826870" />
+    <state x="1456" y="240" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1585434659271" />
     <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1584360859362">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 59b75bb2fc7c827e934707621e2ece47e4fb7033..ed4c6913ee352c93d8b6482d14c4ca6ed1e120e3 100644 (file)
@@ -16,6 +16,7 @@ if ($device == 'salon' || $device == 'bureau') {
     $shortcuts['media'][] = ['label' => 'Vidéo web', 'type' => 'raspberrycast'];
 }
 
+
 $tvshows = getTVShows();
 if (is_array($tvshows)) {
     $shortcuts['sub-seriestv'] = $tvshows['shortcuts'];
@@ -48,6 +49,8 @@ if (is_array($media)) {
     }
 }
 
+$shortcuts['media'][] = ['label' => 'Recharger', 'type' => 'url', 'href' => '/scripts/tmdb.php'];
+
 function getMediaFolderShortcuts($mediagroup, $parentId)
 {
     $res['sub-' . $parentId] = array();
index 657fdd3d6a01e1edf6b6e4b0f7d0d70e503f08f5..19b402a7bc9182c2ba61aa0098840b7349b8015e 100644 (file)
@@ -94,7 +94,15 @@ function cronFlowerPower($cronmin)
     $fp = explode("\n", trim(`sudo /usr/local/bin/flowerpower`));
     $map = [2 => 1467, 0 => 1468];
     foreach ($map as $k => $v) {
-        domoticzCmd(['param' => 'udevice', 'idx' => $v, 'nvalue' => 0, 'svalue' => $fp[$k]]);
+        $newValue = $fp[$k];
+        if ($v === 1467) {
+            $newValue = (float)$newValue;
+            $currentValue = toNumber(getDomoticzDeviceStatus(1467), false);
+            if (abs($currentValue - $newValue) > 30 || $newValue == 0 || $newValue > 60 || $newValue < -50) {
+                return;
+            }
+        }
+        domoticzCmd(['param' => 'udevice', 'idx' => $v, 'nvalue' => 0, 'svalue' => $newValue]);
     }
 }
 
index 6da91adcacbcc89f40d8b341cc62311df8c54612..40404fb27fa8686c90c11142b8af59d22489c7a4 100644 (file)
@@ -2,6 +2,9 @@
 if ($_GET['device'] == 1033) {
     $forceConfig = 'salon';
 }
+if ($_GET['device'] == 1476) {
+    $forceConfig = 'bureau';
+}
 
 require_once "import.php";
 
@@ -49,7 +52,49 @@ if ($_GET['device'] == 480) {
         default:
             break;
     }
-}else if($_GET['device']==1451){
+} else if ($_GET['device'] == 1476) {
+    // Cube
+//    switch ($_GET['state']) {
+//        case 'Shake':
+//            execScene('home/alert');
+//            break;
+//        case 'Flip_90':
+//            execScene('bureau/off');
+//            break;
+//        case 'Flip_180':
+//            execScene('bureau/auto');
+//            break;
+//        case 'Free_Fall':
+//            execScene('salon/off');
+//            off('bureau');
+//            break;
+//        case 'Move':
+//            if (getCurrentHarmonyActivity() != 'musique-radio') {
+//                _remoteCmd('pause', 'salon');
+//            }
+//            break;
+//        case 'Clock_Wise':
+//            if (getCurrentHarmonyActivity() !== 'poweroff') {
+//                harmonyRequest('commands/volume-up?repeat=3', 'POST');
+//            }
+//            break;
+//        case 'Anti_Clock_Wise':
+//            if (getCurrentHarmonyActivity() !== 'poweroff') {
+//                harmonyRequest('commands/volume-down?repeat=5', 'POST');
+//            }
+//            break;
+//        case 'Tap':
+//            if (getCurrentHarmonyActivity() == 'poweroff') {
+//                squeezePlayByName('FIP', $squeezeboxPlayers['Salon']);
+//            } else if (getCurrentHarmonyActivity() == 'musique-radio') {
+//                stopHarmony();
+//            }
+//            break;
+//        case 'Alert':
+//        default:
+//            break;
+//    }
+} else if ($_GET['device'] == 1451) {
     domoticzSwitch(1450);
 }
 echo '1';
\ No newline at end of file
index 3edcb3eae4df456b6dd66de6676340f2f21a4190..3e1aa34b37ee0145309971bfeb3f0432b9fcc1fa 100644 (file)
@@ -1,6 +1,10 @@
 <?php
+ob_start();
 require_once 'import.php';
-_getTVShows(true, true);
-_getMovies(true, true);
-_getMediaRecentAdded(true, true);
-parseMoviesLibrary();
\ No newline at end of file
+_getTVShows(true, false);
+_getMovies(true, false);
+_getMediaRecentAdded(true);
+parseMoviesLibrary();
+connectRedis()->del(['shortcuts.' . getCurrentConfig()]);
+ob_end_clean();
+header('Location: /#/section/home');
\ No newline at end of file