]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Sun, 2 May 2021 11:17:03 +0000 (13:17 +0200)
committerVincent <vincent@enhydra.fr>
Sun, 2 May 2021 11:17:03 +0000 (13:17 +0200)
19 files changed:
.idea/workspace.xml
config/balcon.php
config/bureau.php
config/chambre.php
config/cour.php
config/cuisine.php
config/entree.php
config/lit.php
config/litjerome.php
config/litvincent.php
config/music.php
config/salon.php
config/sdb.php
config/wc.php
js/cordova.js
js/home.js
scripts/domoticz_device_event.php
scripts/lib/mediarasp.php
scripts/volume.php

index 26309073af0a0666fcaf84196c9ae1f726f7e898..b0a5a3248bc9cb53849ab5e28d17dc53b7afa29b 100644 (file)
@@ -3,7 +3,24 @@
   <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/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/balcon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/balcon.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/chambre.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/chambre.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/cour.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cour.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/cuisine.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cuisine.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/entree.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/entree.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/lit.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/lit.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/litjerome.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/litjerome.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/litvincent.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/litvincent.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/music.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/music.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/salon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/salon.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/sdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/sdb.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/wc.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/wc.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/js/cordova.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/cordova.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" 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/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/volume.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/volume.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1619637833459" duration="4578000" />
       <workItem from="1619772786735" duration="1789000" />
       <workItem from="1619795353855" duration="2088000" />
-      <workItem from="1619802300800" duration="327000" />
-    </task>
-    <task id="LOCAL-00429" summary=".">
-      <created>1610202214223</created>
-      <option name="number" value="00429" />
-      <option name="presentableId" value="LOCAL-00429" />
-      <option name="project" value="LOCAL" />
-      <updated>1610202214223</updated>
+      <workItem from="1619802300800" duration="355000" />
+      <workItem from="1619888463622" duration="1227000" />
+      <workItem from="1619952129836" duration="292000" />
+      <workItem from="1619952673812" duration="1313000" />
     </task>
     <task id="LOCAL-00430" summary=".">
       <created>1610353505617</created>
       <option name="project" value="LOCAL" />
       <updated>1619798145186</updated>
     </task>
-    <option name="localTasksCounter" value="478" />
+    <task id="LOCAL-00478" summary=".">
+      <created>1619802642365</created>
+      <option name="number" value="00478" />
+      <option name="presentableId" value="LOCAL-00478" />
+      <option name="project" value="LOCAL" />
+      <updated>1619802642366</updated>
+    </task>
+    <option name="localTasksCounter" value="479" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index 2f0f0663c431860867ea2963a59707ab23314dc0..408fac612c3ef9356b39385c3327c8e8f46894c6 100644 (file)
@@ -4,6 +4,7 @@ config('ROOM', 'balcon');
 config('SQUEEZEBOX_PLAYER', 'Salon');
 config('VOLUME', 60);
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
+config('VOLUME_STEP',5);
 config('HIDEMASK_TIMEOUT', 250);
 
 if (DISPLAYINTERFACE) {
index fee1e10def79ed82aff0347036006369763c0366..6bf34402847462114ebefbcf0c13e6bce94f516a 100644 (file)
@@ -4,6 +4,7 @@ config('ROOM', 'bureau');
 config('SQUEEZEBOX_PLAYER', 'Bureau');
 config('VIDEOPLAYER', 'mediarasp');
 config('VOLUME_DEVICE', 'harmony');
+config('VOLUME_STEP', 2);
 config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'suncurve');
 config('SLEEPSCREEN', 15);
@@ -28,5 +29,5 @@ if (DISPLAYINTERFACE) {
     include "default.php";
     include ROOT . "/config/media.php";
 
-    $nav = ['home', 'lights', 'music', 'media', 'remote', 'switch','fan', 'settings', 'alert', 'off'];
+    $nav = ['home', 'lights', 'music', 'media', 'remote', 'switch', 'fan', 'settings', 'alert', 'off'];
 }
index 6fa6207d2749780bec6ffcf70809e06a597615a9..3e1ddf0b94d0a219aeebcfb0c8df837489875903 100644 (file)
@@ -7,6 +7,7 @@ config('SCREENSAVER_BRIGHTNESS', 100);
 config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'weatherstation');
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
+config('VOLUME_STEP',5);
 config('HIDEMASK_TIMEOUT', 250);
 config('THEME', '#5c4736');
 
index 5b41d28c09b43b54e565d9fc381ed1330610dd2a..a7d18d11966d3220446c40733b3d5acab0af6272 100644 (file)
@@ -3,6 +3,7 @@ config('ROOM_NAME', 'Cour');
 config('ROOM', 'cour');
 config('SQUEEZEBOX_PLAYER', 'Cuisine');
 config('VOLUME', 60);
+config('VOLUME_STEP',5);
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
 config('HIDEMASK_TIMEOUT', 250);
 config('THEME','#2e623b');
index 33986aae3ead06c0d937bfc5656ca0ff322e3fa8..101b699993ccda05f3472e9071622d4ae71a296f 100644 (file)
@@ -4,6 +4,7 @@ config('ROOM', 'cuisine');
 config('SQUEEZEBOX_PLAYER', 'Cuisine');
 config('HIDEMASK_TIMEOUT', 250);
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
+config('VOLUME_STEP',5);
 config('THEME','#222222');
 config('SLEEPSCREEN', 15);
 config('SCREENSAVER_BRIGHTNESS', 100);
index 1993c04d96fd4715179c98245b0595dcfe68b605..ea40852ff09efdb3b71042a78e8de010943da77e 100644 (file)
@@ -7,6 +7,7 @@ config('SCREENSAVER_BRIGHTNESS', 100);
 config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER','weatherstation');
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
+config('VOLUME_STEP',5);
 config('HIDEMASK_TIMEOUT',250);
 config('THEME','#000000');
 
index 1dfc729c97d2847694a52df61ecaf5eb8ce91167..7ddb39be14530e3827862863b357b032cc2b304e 100644 (file)
@@ -4,6 +4,7 @@ config('ROOM', 'chambre');
 config('VIDEOPLAYER', 'mediarasp-small');
 config('TVPLAYER', 'mediarasp-small');
 config('HIDEMASK_TIMEOUT', 250);
+config('VOLUME_STEP',5);
 
 if (DISPLAYINTERFACE) {
     if (!isset($shortcuts)) {
index 35487c5f82996d1fbdb51993e4f118b27f49933c..b067cff9bc4144240b18928579a5c27c9774e9bd 100644 (file)
@@ -7,6 +7,7 @@ config('SCREENSAVER_BRIGHTNESS', 'auto');
 config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'weatherstation');
 config('VOLUME_DEVICE', 'RaspberryPi');
+config('VOLUME_STEP',5);
 config('HIDEMASK_TIMEOUT', 250);
 config('THEME','#086d89');
 
index f8d22fed85c74fb8955dd9e5b5c611d819b6c837..0c4c3b3008bbe51408743a794b3a9721fcfd7730 100644 (file)
@@ -3,6 +3,7 @@ config('ROOM_NAME', 'Lit Vincent');
 config('SQUEEZEBOX_PLAYER', 'Lit Vincent');
 config('SQUEEZEBOX_AMBIANCE_PLAYER', 'Chambre');
 config('VOLUME_DEVICE', 'RaspberryPi');
+config('VOLUME_STEP',5);
 config('SCREENSAVER_BRIGHTNESS', 'auto');
 config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'weatherstation');
index 31fca75d60c3380315b7a95fbec31276dd962510..52d40f7b684196829dbcc285a1e5eddf34ea8358 100644 (file)
@@ -108,8 +108,8 @@ function audioElement($subitem, $app = 'favorites')
 
 
 $shortcuts['music'] = [
-    ['type' => 'volume', 'volume' => '3%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
-    ['type' => 'volume', 'volume' => '3%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
+    ['type' => 'volume', 'volume' => config('VOLUME_STEP'), 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
+    ['type' => 'volume', 'volume' => config('VOLUME_STEP'), 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
     ['type' => 'sub', 'label' => 'Synchro', 'sub' => 'synchro'],
     ['type' => 'sub', 'label' => 'Radios', 'sub' => 'radio'],
     ['type' => 'sub', 'label' => 'Musique', 'sub' => 'playlists'],
index 9d9483cf624904a15ceac5c9c1c6930c20055754..97a1816f45cf67918ad9e48e13511a3fa4fd9887 100644 (file)
@@ -5,6 +5,7 @@ config('SQUEEZEBOX_PLAYER', 'Salon');
 config('VIDEOPLAYER', 'shield');
 config('TVPLAYER', 'shield');
 config('VOLUME_DEVICE', 'DenonAVR');
+config('VOLUME_STEP',2);
 config('VIDEOPLAYER_DEVICE', 'salon');
 config('HIDEMASK_TIMEOUT', 250);
 config('THEME','#d0a25b');
index fc5aea952f4feaf67bf4f82174fba309c711f057..5215fbb5846356c29a73a55a4247ea15961ac1ed 100644 (file)
@@ -10,6 +10,7 @@ config('VIDEOPLAYER', 'mediarasp-small');
 config('TVPLAYER', 'mediarasp-small');
 config('VOLUME', 60);
 config('VOLUME_DEVICE', 'Squeezebox');
+config('VOLUME_STEP',5);
 config('HIDEMASK_TIMEOUT',250);
 config('THEME','#92475c');
 
index 7f21df880b9f2c9b0e2086af2cd963a10ca0f7f4..58bc543d30490ace6e124720d3e95ea0a80774c4 100644 (file)
@@ -3,6 +3,7 @@ config('ROOM_NAME', 'WC');
 config('ROOM', 'wc');
 config('SQUEEZEBOX_PLAYER', 'WC');
 config('VOLUME', 60);
+config('VOLUME_STEP',5);
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
 config('HIDEMASK_TIMEOUT',250);
 
index ed5fc026b79c0eb870531e78332851bfca5505d3..a24a0bb7b1b817429ca1f9cda9b3401eafa916a8 100644 (file)
@@ -51,4 +51,11 @@ function initCordova() {
     } catch (e) {
         console.log(e);
     }
+
+    try {
+        document.addEventListener('volumedownbutton', volumeDown, false);
+        document.addEventListener('volumedownbutton', volumeUp, false);
+    } catch (e) {
+
+    }
 }
\ No newline at end of file
index 467046ca536622060f6e5eae1880b1ebce46b9b6..7ac2a8f1a2ea99ea130ac1e210141e305eae6a01 100644 (file)
@@ -413,6 +413,16 @@ $(function () {
     }, 1000);
 });
 
+function volumeDown(){
+
+    return false;
+}
+
+function volumeUp(){
+
+    return false;
+}
+
 
 function remoteCmd(cmd) {
     $.get('scripts/remotecmd.php?cmd=' + cmd);
index 35019034f51af13e0ab359528fab8d91fc354a17..93ce7fb6d15670542c76a33cd6fc6b01553977c6 100644 (file)
@@ -36,10 +36,10 @@ if ($_GET['device'] == 480) {
             _remoteCmd('pause', 'salon');
             break;
         case 'Clock_Wise':
-            volume(2, '+');
+            volume(config('VOLUME_STEP'), '+');
             break;
         case 'Anti_Clock_Wise':
-            volume(2, '-');
+            volume(config('VOLUME_STEP'), '-');
             break;
         case 'Tap':
             squeezePlayByName('FIP', $squeezeboxPlayers['Salon']);
@@ -90,10 +90,10 @@ if ($_GET['device'] == 480) {
             }
             break;
         case 'Clock_Wise':
-            volume(2, '+');
+            volume(config('VOLUME_STEP'), '+');
             break;
         case 'Anti_Clock_Wise':
-            volume(2, '-');
+            volume(config('VOLUME_STEP'), '-');
             break;
         case 'Tap':
             squeezeResume();
index aafdbe7d86de716f1d88f24966d693f27b37b9b3..2b42cd6cd047b322ff3cf0899b4585324f6e5a0e 100644 (file)
@@ -24,10 +24,10 @@ function remoteCmd($cmd, $device)
     }
 
     if ($cmd == 'volume-up') {
-        volume(5, '+');
+        volume(config('VOLUME_STEP'), '+');
         return true;
     } elseif ($cmd == 'volume-down') {
-        volume(5, '-');
+        volume(config('VOLUME_STEP'), '-');
         return true;
     }
 
index 415335920a9c4ee7f09527376e803bdfe32dec0d..97cad8c33bb88e37a89bf70dbf7f7b0b265dc86d 100644 (file)
@@ -1,9 +1,15 @@
 <?php
 include "import.php";
 
-if (isset($_GET['volume'])) {
-       if (!isset($_GET['increase'])) {
-               $_GET['increase'] = '';
-       }
-       print_r(volume($_GET['volume'], $_GET['increase']));
+if (isset($_GET['action'])) {
+    if ($_GET['action'] === 'up') {
+        volume(config('VOLUME_STEP'), '+');
+    } else if ($_GET['action'] === 'down') {
+        volume(config('VOLUME_STEP'), '-');
+    }
+} elseif (isset($_GET['volume'])) {
+    if (!isset($_GET['increase'])) {
+        $_GET['increase'] = '';
+    }
+    print_r(volume($_GET['volume'], $_GET['increase']));
 }
\ No newline at end of file