]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Tue, 26 Jan 2021 09:57:32 +0000 (10:57 +0100)
committerVincent <vincent@enhydra.fr>
Tue, 26 Jan 2021 09:57:32 +0000 (10:57 +0100)
.idea/workspace.xml
scripts/cron/cron.php
scripts/domoticz_device_event.php
scripts/lib/off.php
scripts/lib/shield.php
scripts/lib/squeezebox.php
scripts/squeeze.php
servers/logcat.php

index f735ede5c01a0d6848c3af806d3f598f5575708f..51cb41c989d36a5461727deffe2e9aab9d11947f 100644 (file)
@@ -4,7 +4,12 @@
     <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/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/off.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/off.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.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/squeeze.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/squeeze.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/servers/logcat.php" beforeDir="false" afterPath="$PROJECT_DIR$/servers/logcat.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
         <option name="Make" enabled="true" />
       </method>
     </configuration>
+    <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
+      <option name="arquillianRunConfiguration">
+        <value>
+          <option name="containerStateName" value="" />
+        </value>
+      </option>
+      <option name="TEST_OBJECT" value="class" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
     <configuration default="true" type="ArquillianTestNG" factoryName="">
       <option name="arquillianRunConfiguration">
         <value>
       <workItem from="1611336541554" duration="1485000" />
       <workItem from="1611428507149" duration="1044000" />
       <workItem from="1611582691581" duration="2261000" />
-      <workItem from="1611585304162" duration="1328000" />
-    </task>
-    <task id="LOCAL-00389" summary=".">
-      <created>1605261980841</created>
-      <option name="number" value="00389" />
-      <option name="presentableId" value="LOCAL-00389" />
-      <option name="project" value="LOCAL" />
-      <updated>1605261980842</updated>
+      <workItem from="1611585304162" duration="1674000" />
+      <workItem from="1611609259944" duration="949000" />
+      <workItem from="1611653492674" duration="1501000" />
     </task>
     <task id="LOCAL-00390" summary=".">
       <created>1605363332633</created>
       <option name="project" value="LOCAL" />
       <updated>1611585903596</updated>
     </task>
-    <option name="localTasksCounter" value="438" />
+    <task id="LOCAL-00438" summary=".">
+      <created>1611586910306</created>
+      <option name="number" value="00438" />
+      <option name="presentableId" value="LOCAL-00438" />
+      <option name="project" value="LOCAL" />
+      <updated>1611586910306</updated>
+    </task>
+    <option name="localTasksCounter" value="439" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index d32d58e0314d73b0fb0f92d3724937bf4d97d558..0cafc05dccc86f8e59dbd2287ce5c37e47acc148 100644 (file)
@@ -68,10 +68,6 @@ function cronShield($cronmin)
             shieldConnect(true, $device['id']);
         }
     }
-    if ($cronmin % 10 === 0) {
-        setState('maskShieldSalonWakeup', '0');
-        setState('maskShieldBureauWakeup', '0');
-    }
     //`curl 'http://192.168.13.60:9000/plugins/Extensions/settings/plugins/CastBridge/settings/basic.html?playerid=b8%3A27%3Aeb%3Af6%3A1d%3A30' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: fr-FR,en;q=0.5' --compressed -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: http://192.168.13.60:9000' -H 'Connection: keep-alive' -H 'Referer: http://192.168.13.60:9000/plugins/Extensions/settings/plugins/CastBridge/settings/basic.html?playerid=b8%3A27%3Aeb%3Af6%3A1d%3A30' -H 'Cookie: Squeezebox-player=b8%3A27%3Aeb%3Af6%3A1d%3A30; Squeezebox-enableHiDPI=1; Squeezebox-expandPlayerControl=true; Squeezebox-expanded-MY_MUSIC=0; Squeezebox-expanded-RADIO=1; Squeezebox-expanded-PLUGIN_MY_APPS_MODULE_NAME=1; Squeezebox-expanded-FAVORITES=1; Squeezebox-expanded-PLUGINS=0; Squeezebox-playersettings=null; Squeezebox-advancedsettings=plugins/CastBridge/settings/basic.html%3F; Squeezebox-expanded-activePlugins=1; Squeezebox-expanded-inactivePlugins=1; Squeezebox-expanded-otherPlugins0=1' -H 'Upgrade-Insecure-Requests: 1' --data-raw 'saveSettings=1&useAJAX=0&page=PLUGIN_CASTBRIDGE&playerid=b8%3A27%3Aeb%3Af6%3A1d%3A30&player=b8%3A27%3Aeb%3Af6%3A1d%3A30&autorun=on&bin=squeeze2cast-armv6hf&opts=&debugs=&log_limit=-1&configfile=castbridge.xml&autosave=on&upnp_socket=%3F&xmlparams=1&prevseldevice=.common.&seldevice=.common.&codecs=aac%2Cogg%2Cops%2Cogf%2Cflc%2Calc%2Cwav%2Caif%2Cpcm%2Cmp3&sample_rate=96000&encode_mode=thru&encode_level=&encode_bitrate=&encode_rate=&encode_size=&server=%3F&enabled=1&remove_timeout=0&volume_on_play=1&media_volume=50&send_metadata=1&send_coverart=1&enabled.79a3f5f078d67e3b25a6b3dedc624e18=1'`;
     //`curl 'http://192.168.13.60:9000/plugins/Extensions/settings/plugins/CastBridge/settings/basic.html?playerid=b8%3A27%3Aeb%3Af6%3A1d%3A30' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: fr-FR,en;q=0.5' --compressed -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: http://192.168.13.60:9000' -H 'Connection: keep-alive' -H 'Referer: http://192.168.13.60:9000/plugins/Extensions/settings/plugins/CastBridge/settings/basic.html' -H 'Cookie: Squeezebox-player=b8%3A27%3Aeb%3Af6%3A1d%3A30; Squeezebox-enableHiDPI=1; Squeezebox-expandPlayerControl=true; Squeezebox-expanded-MY_MUSIC=0; Squeezebox-expanded-RADIO=1; Squeezebox-expanded-PLUGIN_MY_APPS_MODULE_NAME=1; Squeezebox-expanded-FAVORITES=1; Squeezebox-expanded-PLUGINS=0; Squeezebox-playersettings=settings/player/basic.html%3F; Squeezebox-advancedsettings=plugins/CastBridge/settings/basic.html%3F; Squeezebox-expanded-activePlugins=1; Squeezebox-expanded-inactivePlugins=1; Squeezebox-expanded-otherPlugins0=1' -H 'Upgrade-Insecure-Requests: 1' --data-raw 'saveSettings=1&useAJAX=0&page=PLUGIN_CASTBRIDGE&playerid=b8%3A27%3Aeb%3Af6%3A1d%3A30&player=b8%3A27%3Aeb%3Af6%3A1d%3A30&autorun=on&bin=squeeze2cast-armv6hf&opts=&debugs=&log_limit=-1&configfile=castbridge.xml&autosave=on&upnp_socket=%3F&xmlparams=1&prevseldevice=.common.&seldevice=.common.&codecs=aac%2Cogg%2Cops%2Cogf%2Cflc%2Calc%2Cwav%2Caif%2Cpcm%2Cmp3&sample_rate=96000&encode_mode=thru&encode_level=&encode_bitrate=&encode_rate=&encode_size=&server=%3F&enabled=1&remove_timeout=0&volume_on_play=1&media_volume=50&send_metadata=1&send_coverart=1&enabled.79a3f5f078d67e3b25a6b3dedc624e18=1&enabled.c4f32d227235313d8c59eff43a01350c=1'`;
 
index 21cc7deba1c943cb9a0255f5bf2fca16656f721d..4e14364b6f17d2e2098d9b44bdb213eb2840ab2a 100644 (file)
@@ -66,7 +66,7 @@ if ($_GET['device'] == 480) {
             break;
     }
 } else if ($_GET['device'] == 1478) {
-    // Cube
+    // Cube bureau
     switch ($_GET['state']) {
         case 'Shake':
             execScene('home/alert');
index dcc59564ebe717ad4ca5688f00a9787130bb1d1a..548f65caae3194d57aef7010657eb78dcc6f2ae0 100644 (file)
@@ -32,6 +32,7 @@ function offSalon()
 function offBureau()
 {
     stopHarmony();
+    execScene('bureau/media/stop');
     shieldKillAll('bureau');
     shieldSleep('bureau');
 }
index 0587cd8a3e098926ba498731a6204353ed878a9a..d5136387985e699b3ac17a96b2e4c9e6fdeaae49 100644 (file)
@@ -274,9 +274,10 @@ function shieldPlayingVideo($device = null)
 
 function shieldRunAppAndBackHome($app, $device = null, $waitBeforeBack = 1, $backToSleep = true)
 {
-
     if (shieldIsAwake($device)) {
         $backToSleep = false;
+    } else {
+        shieldWakeup($device);
     }
     if ($backToSleep) {
         $d = getDevice($device);
@@ -354,7 +355,7 @@ function _adb($command, $params = '', $device = null)
 {
     $c = _adbcmd($command, $params, $device);
     $output = `$c`;
-    echo $c . ' :: ' . $output . "\n";
+   // echo $c . ' :: ' . $output . "\n";
     return $output;
 }
 
index c7c25fb4d380a8a23bdb5b876d316b78a6b05f87..5dd730a2b8deeac4b85602519828c84b2cdf5ca3 100644 (file)
@@ -131,13 +131,13 @@ function squeezePlayByName($musicName, $player, $volume = null, $playIfSync = tr
     }
 
     if ($player == $squeezeboxPlayers['Salon']) {
-        setState('maskShieldSalonWakeup', '1');
+        setState('maskShieldSalonWakeup', time() + 15);
         shieldRunAppAndBackHome('sbplayer', 'salon', 1, false);
     } else if ($player == $squeezeboxPlayers['Salle de bains']) {
         execScene('sdb/ampli/on');
     } else if ($player == $squeezeboxPlayers['Bureau']) {
+        setState('maskShieldBureauWakeup', time() + 15);
         harmonyActivity('musique');
-        setState('maskShieldBureauWakeup', '1');
         shieldRunAppAndBackHome('sbplayer', 'bureau', 1, false);
     } else if ($player == $squeezeboxPlayers['Chambre']) {
         denon(true);
index 10e64d0ec35b27fca4966db1f9d5649cdfc7911e..41574c226e4686f2046418a0771ce4772670b50b 100644 (file)
@@ -8,12 +8,12 @@ if (isset($_GET['requests'])) {
 
 if (!in_array('stop', $requests) || isset($_GET['name'])) {
     if ($_GET['player'] == 'Salon') {
-        setState('maskShieldSalonWakeup', '1');
+        setState('maskShieldSalonWakeup', time()+15);
         print_r(harmonyActivity("musique"));
     } elseif ($_GET['player'] == 'Salle de bains') {
         execScene('sdb/ampli/on');
     } else if ($_GET['player'] === 'Bureau') {
-        setState('maskShieldBureauWakeup', '1');
+        setState('maskShieldBureauWakeup', time()+15);
         print_r(harmonyActivity("musique"));
     }
     setPlaying('squeezebox');
index eba9df3b3a45b71d083069021a27da2c1599d1e4..ff6f8a9e6154b3e72116bed82f93fca3857a08e6 100644 (file)
@@ -23,12 +23,8 @@ $cases = [
             $state = 'maskShieldBureauWakeup';
             $squeezePlayer = 'Bureau';
         }
-        if (getState($state, '0') == '1') {
-            setState($state, '0');
-        } else {
-            if (getSqueezePlayerStatus($squeezePlayer) <= 0) {
-                shieldRunActivity($device);
-            }
+        if (getState($state, '0') < time() && getSqueezePlayerStatus($squeezePlayer) <= 0) {
+            shieldRunActivity($device);
         }
     },
     'WindowManager: handleComboKeys keyCode: 25, keyAction: 1' => function () use ($device) {