]> _ Git - tortuga-home.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 25 Mar 2026 10:49:40 +0000 (11:49 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 25 Mar 2026 10:49:40 +0000 (11:49 +0100)
23 files changed:
.idea/workspace.xml
config/cuisine.php
config/entree.php
config/sdb.php
config/water.php [deleted file]
js/home.js
scripts/cron/cron.php
scripts/cron/flight.php [deleted file]
scripts/cron/traffic.php [deleted file]
scripts/hotwater.php [deleted file]
scripts/ical.php [deleted file]
scripts/jarvis.php [deleted file]
scripts/kodi.php [deleted file]
scripts/lib/jarvis.php [deleted file]
scripts/lib/lib.php
scripts/lib/off.php
scripts/lib/scenes.php
scripts/lib/squeezebox.php
scripts/lib/traffic.php [deleted file]
scripts/lib/velib.php [deleted file]
scripts/velib.php [deleted file]
style/style.css
style/style.less

index 4b4dd247e22725b61b2c646794eea65878ad6145..6d25d295894d5c0299b8e10996cb58bc00b29c3f 100644 (file)
@@ -5,12 +5,29 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change beforePath="$PROJECT_DIR$/.docker/docker-compose.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.docker/docker-compose.yml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/cave.php" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/install.md" beforeDir="false" afterPath="$PROJECT_DIR$/install.md" 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/sdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/sdb.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/water.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" 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/cron/flight.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/cron/traffic.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/hotwater.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/ical.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/jarvis.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/kodi.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/jarvis.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.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/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/traffic.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/velib.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/velib.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/style/style.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.less" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1772370387714" duration="7090000" />
       <workItem from="1773390371781" duration="506000" />
       <workItem from="1774028822942" duration="792000" />
-      <workItem from="1774430967346" duration="3394000" />
+      <workItem from="1774430967346" duration="4576000" />
     </task>
     <task id="LOCAL-00502" summary=".">
       <created>1641726946298</created>
       <option name="project" value="LOCAL" />
       <updated>1687259667913</updated>
     </task>
-    <option name="localTasksCounter" value="635" />
+    <option name="localTasksCounter" value="636" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
       <breakpoints>
         <line-breakpoint enabled="true" type="php">
           <url>file://$PROJECT_DIR$/scripts/cron/cron.php</url>
-          <line>249</line>
+          <line>207</line>
           <option name="timeStamp" value="1" />
         </line-breakpoint>
       </breakpoints>
index 84a5ca2abb6c0ff9a4582a452258442b443d266a..f6830403c0c1dcd1d6e2f1acc4c93b09ba5a0781 100644 (file)
@@ -21,7 +21,6 @@ if (DISPLAYINTERFACE) {
     $favoriteslights = array_merge($favoriteslights, $c['favorites']);
 
     include "default.php";
-    include "water.php";
 
     $nav=['home','lights','water','music','remote','coffee','switch','settings','alert','off'];
 }
\ No newline at end of file
index 9cf71342df007d34af500deea00f4770d99b11e6..34e015c86a28408e324be92b6b2be43d30816056 100644 (file)
@@ -19,7 +19,6 @@ if (DISPLAYINTERFACE) {
     $c = home();
     $shortcuts['lights'] = $c['all'];
     $favoriteslights = $c['favorites'];
-    array_splice($favoriteslights, 3, 0, [['type' => 'lock'], ['type' => 'velib'], ['type' => 'traffic']]);
 
     $nav = ['home', 'lights', 'music', 'coffee', 'switch', 'settings', 'alert', 'off'];
 
index 5d0a221af3a12bddc2f1b4bd474be9158076b8e8..5546b4751ace558a75080f6aa614f9e3d35cf8b8 100644 (file)
@@ -29,7 +29,6 @@ if (DISPLAYINTERFACE) {
        $favoriteslights = array_merge($favoriteslights, $c['favorites']);
        $favoriteslights[] = array_merge($allmusics['FIP'], array('volume' => 50));
        $favoriteslights[] = ['type' => 'phone', 'task' => 'Balance', 'phone' => 'sdb', 'label' => 'Balance'];
-       include "water.php";
        include "media.php";
        include "default.php";
 }
\ No newline at end of file
diff --git a/config/water.php b/config/water.php
deleted file mode 100644 (file)
index 4f68275..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-$shortcuts['water'] = [
-    ['type' => 'light', 'scene' => 'sdb/hotwater/auto/force', 'label' => 'Auto'],
-    ['type' => 'light', 'scene' => 'sdb/hotwater/eco', 'label' => 'Eco'],
-    ['type' => 'light', 'scene' => 'sdb/hotwater/max', 'label' => 'Max'],
-    ['type' => 'light', 'scene' => 'sdb/hotwater/off', 'label' => 'Off'],
-
-];
\ No newline at end of file
index 33b3a3d8da2c005b82c34f526600a4751a3fb4a2..f67c47683784543e17268f00b3f3eda9871697dd 100644 (file)
@@ -392,8 +392,6 @@ $(function () {
     changeAddress();
     initScreenSaver();
     initWeather();
-    initTraffic();
-    initVelib();
     initLocks();
 
     setTimeout(function () {
@@ -679,28 +677,6 @@ function sshCommand(cmd, immediate, device) {
     }
 }
 
-function initVelib() {
-    $(document).on('click', "a.velib", function () {
-        displayLoader($(this));
-        updateVelib(true);
-        return false;
-    });
-    setInterval(function () {
-        updateVelib(false);
-    }, 1000 * 30);
-    updateVelib(false);
-}
-
-function initTraffic() {
-    $(document).on('click', ".traffic", function () {
-        displayLoader($(this));
-        updateTraffic(true);
-    });
-    setInterval(function () {
-        updateTraffic(false);
-    }, 1000 * 30);
-    updateTraffic(false);
-}
 
 function initLocks() {
     $(document).on('click', ".lock", function () {
@@ -734,62 +710,6 @@ function updateLocks() {
     });
 }
 
-function updateTraffic(force) {
-    var t = $(".traffic");
-    if (t.length == 0) {
-        return;
-    }
-    if (force == undefined) {
-        force = false;
-    }
-    var url = 'cache/traffic.json?j=';
-    if (force) {
-        url = 'scripts/cron/traffic.php?force=1&';
-    }
-
-    $.get(url + new Date().getTime(), function (data) {
-        t.find('.dtime').text(data.time);
-        t.find('.jams').text(data.jams + ' km');
-        t.find('.car').text(data.car + ' min');
-        t.find('.subway').text(data.subway + ' min');
-        t.find('.bike').text(data.bike + ' min');
-        t.attr('data-init', '1');
-        resize();
-        hideLoader();
-    }).fail(function () {
-        hideLoader();
-    });
-}
-
-function updateVelib(force) {
-    var v = $(".velib");
-    if (v.length == 0) {
-        return;
-    }
-    if (force == undefined) {
-        force = false;
-    }
-    var url = 'cache/velib.json?j=';
-    if (force) {
-        url = 'scripts/velib.php?j=';
-    }
-
-    $.get(url + new Date().getTime(), function (data) {
-        console.log(data);
-        var list = [];
-        $.each(data.stations, function (k, v) {
-            list.push('<li data-enabled="' + v.enabled + '"><span class="l">' + v.name + '</span><span class="n blue">' + v.nbe + '</span><span class="n green">' + v.nb + '</span></li>');
-        });
-        v.find('ul').html(list.join(''));
-        v.find('.dtime').text(data.time);
-        v.attr('data-init', '1');
-        resize();
-        hideLoader();
-    }).fail(function () {
-        hideLoader();
-    });
-}
-
 function initWeather() {
     setInterval(function () {
         updateWeather();
@@ -968,9 +888,6 @@ function resize() {
             return;
         }
         var paddingSide = 0.5;
-        if ($(this).hasClass('velib')) {
-            paddingSide = 0.1;
-        }
         var span = resizeText($(this), paddingSide, s);
 
         var sh = $(span).height();
@@ -1013,9 +930,6 @@ function resizeText(a, paddingSide) {
     var h = $(a).height();
     var span = $(a).find('span');
     var securityMargin = w / 50;
-    if ($(a).hasClass('velib')) {
-        return span;
-    }
     $(span).css('fontSize', '');
     $(span).each(function () {
         $(this).data('fz', parseFloat($(this).css('fontSize')));
index af350442b31c009361987d925bc2b971ea7b2c71..92f1315464520706a94357c9694e1cc4342900b4 100644 (file)
@@ -8,7 +8,6 @@ function cronOneLoop($cronmin) {
        echo '------------------------------------' . "\n";
        _logSection('One Loop // ' . $cronmin);
        cronHeartbeat($cronmin, false);
-       cronHotWater($cronmin);
        cronRooms($cronmin);
        cronWeather($cronmin);
 
@@ -22,8 +21,6 @@ function cronOneLoop($cronmin) {
     }
 
        if ($cronmin % 5 == 0) {
-               cronTraffic($cronmin, false);
-               cronVelib($cronmin);
                cronGuest($cronmin);
                cronShield($cronmin);
        }
@@ -48,10 +45,6 @@ function cronOneLoop($cronmin) {
        _logSection('End Loop (min:' . $cronmin . ')');
 }
 
-function cronHotWater($cronmin) {
-       _logSection('Hot water');
-       hotwaterCheckMode();
-}
 
 function cronBackyard($cronmin)
 {
@@ -172,41 +165,6 @@ function cronWeather($cronmin) {
        getWeather();
 }
 
-function cronVelib($cronmin) {
-       _logSection('Velib');
-       velibStations(false);
-}
-
-function cronTraffic($cronmin, $force = false) {
-       _logSection('Traffic');
-       $cache = ROOT . '/cache/traffic.json';
-
-       $hour = date('G');
-       $day = date('w');
-       $limit = 3600;
-       $departure_in = 5;
-
-       if ($day > 0 && $day < 6 && $hour > 6 && $hour < 10) {
-               $limit = 60;
-       }
-       if ($force || !file_exists($cache) || filemtime($cache) < time() - $limit) {
-               $traffic = [
-                       'time' => date('H:i', time() + ($departure_in * 60)),
-                       'jams' => trafficJams(),
-                       'car' => itineraryIssy(),
-                       'subway' => itineraryIssy('transit'),
-                       'bike' => itineraryIssy('bicycling')
-               ];
-               $json = json_encode($traffic);
-               file_put_contents($cache, $json);
-               if (isset($_GET['force'])) {
-                       ob_end_clean();
-                       header('Content-type: application/json');
-                       echo $json;
-                       exit;
-               }
-       }
-}
 
 function cronPodcasts($cronmin) {
        checkSpottyLogin();
diff --git a/scripts/cron/flight.php b/scripts/cron/flight.php
deleted file mode 100644 (file)
index f437201..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-require_once "../import.php";
-$currentPos = getState('flight_pos', null);
-$currentFlight = getState('current_flight', null);
-
-if ($currentFlight == null) {
-    pickFlight($currentPos);
-}
-
-function pickFlight($pos = null)
-{
-    //
-    if ($pos = null) {
-
-    }
-
-    print_r(getStopedPlanes());
-}
-
-function getAirFrancePlanes()
-{
-    $raw = json_decode(file_get_contents("https://public-api.adsbexchange.com/VirtualRadar/AircraftList.json?fOpIcaoQ=AFR"))->acList;
-    $res = array();
-    foreach ($raw as $item) {
-        if (!in_array($item->Man, ['Boeing', 'Airbus'])) {
-            continue;
-        }
-        if (!isset($item->From) || !isset($item->To)) {
-            continue;
-        }
-        $res[] = $item;
-    }
-
-    return $res;
-}
-
-function getStopedPlanes()
-{
-    $planes = getAirFrancePlanes();
-    $res = array();
-    foreach ($planes as $plane) {
-        if (isset($plane->Spd) && $plane->Spd > 0) {
-            continue;
-        }
-        $res[] = $plane;
-    }
-    return $res;
-}
\ No newline at end of file
diff --git a/scripts/cron/traffic.php b/scripts/cron/traffic.php
deleted file mode 100644 (file)
index f050663..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-require_once 'cron.php';
-cronTraffic(1, true);
\ No newline at end of file
diff --git a/scripts/hotwater.php b/scripts/hotwater.php
deleted file mode 100644 (file)
index ac956b1..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-require_once "import.php";
-echo "\n\n";
-hotwaterCheckMode(true);
-echo "\n\n";
-echo getState('hotwater');
-if (isset($_GET['on'])) {
-    echo hotwater($_GET['on']);
-}
diff --git a/scripts/ical.php b/scripts/ical.php
deleted file mode 100644 (file)
index 0b2c1ca..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-header('Content-type: text/plain');
-require_once "import.php";
-
-isJerome();
\ No newline at end of file
diff --git a/scripts/jarvis.php b/scripts/jarvis.php
deleted file mode 100644 (file)
index b7b3015..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-require_once 'import.php';
-
-$auth = ['33664863307', '33662717540', '33646396295'];
-if (isset($_GET['from']) && !in_array($_GET['from'], $auth)) {
-    echo 'Désolé, je ne vous connais pas';
-} else {
-    echo jarvisCmd($_GET['question']);
-}
\ No newline at end of file
diff --git a/scripts/kodi.php b/scripts/kodi.php
deleted file mode 100644 (file)
index 098350d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-include "import.php";
-
-if ($_GET['action'] == 'sync_seen') {
-    kodiSyncPlayedStatus();
-}
\ No newline at end of file
diff --git a/scripts/lib/jarvis.php b/scripts/lib/jarvis.php
deleted file mode 100644 (file)
index 5475a37..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-function jarvisCmd($question)
-{
-    $c = sshCommand('/usr/local/bin/jarvis -j -x "' . addcslashes($question, '"') . '"', 'jarvis');
-
-    $o = preg_replace('/[\x00-\x1F\x7F]/', '', $c['output']);
-    $j = json_decode(trim($o), true);
-
-    if (!is_countable($j) || !count($j)) {
-        return 'Désolé, il y a eu un problème !';
-    }
-    foreach ($j as $k => $v) {
-        if (isset($v['answer'])) {
-            return $v['answer'];
-        }
-    }
-    return 'Désolé, je crois qu\'il y a eu un affreux malentendu entre nous :(';
-}
\ No newline at end of file
index 9866f4fefe755559d8a7a70a5b32825c604fb586..9145f6470e23dff51079ecd4d233b42849c67b1b 100644 (file)
@@ -15,7 +15,6 @@ require_once ROOT . '/scripts/lib/hue.php';
 require_once ROOT . '/scripts/lib/harmony.php';
 require_once ROOT . '/scripts/lib/scenes.php';
 require_once ROOT . '/scripts/lib/squeezebox.php';
-require_once ROOT . '/scripts/lib/jarvis.php';
 require_once ROOT . '/scripts/lib/mediarasp.php';
 require_once ROOT . '/scripts/lib/http.php';
 require_once ROOT . '/scripts/lib/pc.php';
@@ -29,8 +28,6 @@ require_once ROOT . '/scripts/lib/bricks.php';
 require_once ROOT . '/scripts/lib/youtubedl.php';
 require_once ROOT . '/scripts/lib/remoteinfos.php';
 require_once ROOT . '/scripts/lib/weatherstation.php';
-require_once ROOT . '/scripts/lib/velib.php';
-require_once ROOT . '/scripts/lib/traffic.php';
 require_once ROOT . '/scripts/lib/medialibrary.php';
 require_once ROOT . '/scripts/lib/heartbeats.php';
 require_once ROOT . '/scripts/lib/ssh.php';
@@ -290,24 +287,11 @@ function shortcut($s, $hash)
 <div class="icons"><span class="icon-day"></span><span class="icon-night"></span></div>
 <span class="temp"></span>
 <div class="temperatures"><span class="temp-min"></span><span class="temp-max"></span></div>';
-    } elseif ($s['type'] == 'traffic') {
-        $attrs['class'] = $s['type'] . ' info';
-        $attrs['data-init'] = "0";
-        $attrs['data-init-function'] = "updateTraffic";
-        $s['label'] = '<div class="departure">Départ à <span class="dtime"></span></div>
-<ul class="issy"><li class="car"></li><li class="subway"></li><li class="bike"></li></ul>
-<div class="total_jams"><span class="jams"></span> de bouchons</div>';
-
-    } else if ($s['type'] === 'lock') {
+    }  else if ($s['type'] === 'lock') {
         $attrs['class'] = $s['type'] . ' info';
         $attrs['data-init'] = "0";
         $attrs['data-init-function'] = "updateLocks";
         $s['label'] = '<div class="icon"></div>';
-    } elseif ($s['type'] == 'velib') {
-        $attrs['class'] = $s['type'] . ' info';
-        $attrs['data-init'] = "0";
-        $attrs['data-init-function'] = "updateVelib";
-        $s['label'] = '<div class="dtime"></div><ul></ul>';
     } elseif ($s['type'] == 'action') {
         $attrs['data-action'] = $s['action'];
         $attrs['data-device'] = isset($s['device']) ? $s['device'] : getCurrentConfig();
@@ -610,7 +594,6 @@ function makeNav($nav)
         'music' => '<div data-menu="music"><i class="fa fa-music" aria-hidden="true"></i><span>Musique & Radio</span></div>',
         'media' => '<div data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i><span>Medias & TV</span></div>',
         'coffee' => '<div data-menu="coffee"><i class="fa fa-oven" aria-hidden="true"></i><span>Cuisine / Café</span></div>',
-        'water' => '<div data-menu="water"><i class="fa fa-faucet-drip" aria-hidden="true"></i><span>Eau chaude</span></div>',
         'fan' => '<a href="/scripts/light.php?scene=' . config('ROOM') . '/fan/toggle" class="ajax"><i class="fa fa-fan" aria-hidden="true"></i><span>Ventilateur</span></a>',
         'remote' => '<div data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i><span>Télécommande</span></div>',
         'switch' => '<div data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i><span>Changer de pièce</span></div>',
index e3f1f2ce7c46c0dedeb3aae7e68356555b8d444d..f6f546b5938b77c65e427bd2e0dfac7913d38a63 100644 (file)
@@ -49,7 +49,6 @@ function offSdb()
 {
     execScene('sdb/ampli/off');
     sleep(10);
-    hotwaterAutoMode('1');
 }
 
 function offChambre()
index 3d26a4505c8da6cbe40b16b9e2b818e515924333..2c01bfaac21bf9e1cc2a1b0a99dc9bb825c41304 100644 (file)
@@ -288,7 +288,6 @@ $scenes = [
         ['type' => 'function', 'function' => 'stopAllSqueezebox'],
         ['type' => 'nightmode', 'mode' => '1'],
         ['type' => 'ecomode', 'mode' => '1'],
-        ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'],
     ],
     'salon/projector/on' => [
         ['type' => 'function', 'function' => 'epson', 'args' => [true, true]],
@@ -636,7 +635,6 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'home/hueoff'],
         ['type' => 'scene', 'scene' => 'salon/media/off'],
         ['type' => 'scene', 'scene' => 'salon/off', 'delay' => 2],
-        ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'],
         ['type' => 'function', 'function' => 'stopHarmony'],
         ['type' => 'function', 'function' => 'stopAllSqueezebox'],
     ],
@@ -649,7 +647,6 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'salon/auto'],
         ['type' => 'scene', 'scene' => 'cuisine/on'],
         ['type' => 'ecomode', 'mode' => '0'],
-        ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'],
         ['type' => 'scene', 'scene' => 'bureau/off'],
         ['type' => 'scene', 'scene' => 'chambre/off'],
     ],
@@ -658,7 +655,6 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'bureau/auto'],
         ['type' => 'scene', 'scene' => 'cuisine/on'],
         ['type' => 'ecomode', 'mode' => '0'],
-        ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'],
         ['type' => 'scene', 'scene' => 'salon/off'],
         ['type' => 'scene', 'scene' => 'chambre/off'],
         ['type' => 'ha', 'device' => HA_OFFICE_PLANE_SCREENS, 'action' => 'turn_off'],
@@ -734,24 +730,6 @@ $scenes = [
     'sdb/ampli/off' => [
         ['type' => 'ha', 'device' => HA_SDB_AMPLI, 'command' => 'turn_off', 'priority' => true],
     ],
-    'sdb/hotwater/auto' => [
-        ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['1']],
-    ],
-    'sdb/hotwater/auto/force' => [
-        ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['1', true]],
-    ],
-    'sdb/hotwater/eco' => [
-        ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['0']],
-        ['type' => 'function', 'function' => 'hotwater', 'args' => ['1']],
-    ],
-    'sdb/hotwater/max' => [
-        ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['0']],
-        ['type' => 'function', 'function' => 'hotwater', 'args' => ['2']],
-    ],
-    'sdb/hotwater/off' => [
-        ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['0']],
-        ['type' => 'function', 'function' => 'hotwater', 'args' => ['0']],
-    ],
     'sdb/off' => [
         ['type' => 'state', 'key' => 'sdb', 'value' => 0],
         ['type' => 'function', 'function' => 'stopSqueezeboxPlayer', 'args' => [$squeezeboxPlayers['Salle de bains'], false]],
index f2e646406570bf800a5b8ad9e544ab9b4825995d..246a80a065618750b01175230ba43e71cddb75e3 100644 (file)
@@ -181,12 +181,6 @@ function squeezePlayByName($musicName, $player, $volume = null, $playIfSync = tr
     }
 
     _squeezePlay($player, $volume);
-
-    if ($sdb) {
-        hotwaterCheckMode();
-        sleep(3);
-        hotwaterCheckMode();
-    }
 }
 
 function squeezePlayerOn($player)
@@ -203,7 +197,6 @@ function squeezePlayerOn($player)
 //        }
     } else if ($player == $squeezeboxPlayers['Salle de bains']) {
         execScene('sdb/ampli/on');
-        hotwaterCheckMode();
         if (getSqueezePlayerStatus($player) < 0) {
             phoneTask('Tortuga', 'sdb');
         }
diff --git a/scripts/lib/traffic.php b/scripts/lib/traffic.php
deleted file mode 100644 (file)
index a706902..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-function trafficJams() {
-       $dom = new DOMDocument();
-       @$dom->loadHTMLFile('http://www.sytadin.fr/');
-       $e = $dom->getElementById('cumul_bouchon');
-       if (null === $e) {
-               return '??';
-       }
-       $i = $e->getElementsByTagName('img')->item(0);
-       return intval((string)$i->getAttribute('alt'));
-}
-
-function itineraryIssy($mode = 'driving') {
-       global $departure_in;
-       $key = 'AIzaSyCmBfccaAxrhp5CH27sydD2n0jE-xFp9A8';
-       //$origin = '5 rue de Rochechouart, Paris';
-       //$origin = 'place_id:ChIJISH0cEBu5kcRtWqJGS8R9vc';
-       if ($mode === 'driving') {
-               $origin = 'place_id:ChIJ28lUzD5u5kcRQo1KXiy9xys';
-       } else {
-               $origin = 'place_id:ChIJfdFmjj9u5kcRUyCLnw-tkIU';
-       }
-       // $destination = '11 rue René Jacques, Issy-les-moulineaux';
-       $destination = 'place_id:ChIJ_zVpOo965kcRLVwpXuatEOo';
-       $departure = time() + ($departure_in * 60);
-       $transit_mode = '';
-       if ($mode == 'transit') {
-               $transit_mode = '&transit_mode=rail';
-       }
-       $res = json_decode(file_get_contents('https://maps.googleapis.com/maps/api/directions/json?mode=' . $mode . $transit_mode . '&languages=fr&departure_time=' . $departure . '&origin=' . urlencode($origin) . '&destination=' . urlencode($destination) . '&key=' . $key), true);
-       if ($mode == 'driving') {
-               return round($res['routes'][0]['legs'][0]['duration_in_traffic']['value'] / 60) + 10;
-       } else {
-               return round($res['routes'][0]['legs'][0]['duration']['value'] / 60);
-       }
-}
\ No newline at end of file
diff --git a/scripts/lib/velib.php b/scripts/lib/velib.php
deleted file mode 100644 (file)
index 5fb35c5..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-function velibStations($force = false)
-{
-    $cache = ROOT . '/cache/velib.json';
-
-    $hour = date('G');
-    $day = date('w');
-    $limit = 180;
-
-    if ($day > 0 && $day < 6 && $hour > 7 && $hour < 11) {
-        $limit = 60;
-    }
-
-    if ($force || !file_exists($cache) || filemtime($cache) < (time() - $limit)) {
-        $allcache = __DIR__ . '/../../cache/velib.all.json';
-        $ffversion = rand('105', '124');
-        $thversion = rand('1', '150');
-
-        `curl --max-time 10 'https://velib-metropole-opendata.smoove.pro/opendata/Velib_Metropole/station_status.json' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv$ffversion.0) Gecko/20100101 Firefox/$ffversion.0 TortugaHome/$thversion.0' --output $allcache`;
-        $alldata = json_decode(file_get_contents($allcache), true);
-
-        $stations = ['Cadet' => '9101', 'Bleue' => '9113', 'Folies bergères' => '9011', 'Square Montholon' => '9009', 'Le Pelletier' => '9014'];
-        $res = array();
-        foreach ($alldata['data']['stations'] as $n => $s) {
-            if (!in_array($s['stationCode'], $stations)) {
-                continue;
-            }
-            $res[$s['stationCode']] = $s;
-        }
-
-        $ordered = [];
-        foreach ($stations as $name => $s) {
-            if (isset($res[$s])) {
-                $data = $res[$s];
-                $o = ['name' => $name, 'enabled' => $data['is_returning'] && $data['is_renting'], 'nb' => 0, 'nbe' => 0];
-                if($o['enabled']) {
-                    foreach ($data['num_bikes_available_types'] as $k => $v) {
-                        foreach ($v as $type => $nb) {
-                            if ($type === 'mechanical') {
-                                $o['nbe'] = $nb;
-                            } else {
-                                $o['nb'] = $nb;
-                            }
-                        }
-                    }
-                }
-                $ordered['s' . $s] = $o;
-            }
-        }
-        $res = ['time' => date('H:i'), 'stations' => $ordered];
-        $json = json_encode($res);
-        file_put_contents($cache, $json);
-    } else {
-        $json = file_get_contents($cache);
-    }
-    return $json;
-}
\ No newline at end of file
diff --git a/scripts/velib.php b/scripts/velib.php
deleted file mode 100644 (file)
index 52dcc1b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-include "import.php";
-header('Content-Type: application/json');
-echo velibStations(true);
\ No newline at end of file
index 7121cf4d65d6367b3047a9f5900112734e31b13c..dee57100e7dd11e70de578008e81a94f701fe511 100644 (file)
@@ -309,44 +309,7 @@ section .col > *.velib li .n.green {
 section .col > *.velib li .n.blue {
   background-color: #59b0e3;
 }
-section .col > *.traffic {
-  padding-left: 0 !important;
-  padding-right: 0 !important;
-}
-section .col > *.traffic ul {
-  padding: 0.1em 0.5em;
-  text-align: left;
-}
-section .col > *.traffic ul li {
-  list-style: none;
-  text-align: right;
-  position: relative;
-  text-transform: lowercase;
-}
-section .col > *.traffic ul li:before {
-  font-family: Font Awesome\ 5 Pro;
-  position: absolute;
-  top: 0.2em;
-  left: 0;
-  width: 1.2em;
-  display: inline-block;
-  text-align: center;
-}
-section .col > *.traffic ul li.car:before {
-  content: "\f1b9";
-}
-section .col > *.traffic ul li.bike:before {
-  content: "\f206";
-}
-section .col > *.traffic ul li.subway:before {
-  content: "\f239";
-}
-section .col > *.traffic div {
-  font-size: 0.6em;
-}
-section .col > *.traffic div span {
-  font-size: 1em !important;
-}
+
 section .col > *.weather {
   position: relative;
 }
@@ -570,44 +533,7 @@ section accordion > a.velib li .n.green {
 section accordion > a.velib li .n.blue {
   background-color: #59b0e3;
 }
-section accordion > a.traffic {
-  padding-left: 0 !important;
-  padding-right: 0 !important;
-}
-section accordion > a.traffic ul {
-  padding: 0.1em 0.5em;
-  text-align: left;
-}
-section accordion > a.traffic ul li {
-  list-style: none;
-  text-align: right;
-  position: relative;
-  text-transform: lowercase;
-}
-section accordion > a.traffic ul li:before {
-  font-family: Font Awesome\ 5 Pro;
-  position: absolute;
-  top: 0.2em;
-  left: 0;
-  width: 1.2em;
-  display: inline-block;
-  text-align: center;
-}
-section accordion > a.traffic ul li.car:before {
-  content: "\f1b9";
-}
-section accordion > a.traffic ul li.bike:before {
-  content: "\f206";
-}
-section accordion > a.traffic ul li.subway:before {
-  content: "\f239";
-}
-section accordion > a.traffic div {
-  font-size: 0.6em;
-}
-section accordion > a.traffic div span {
-  font-size: 1em !important;
-}
+
 section accordion > a.weather {
   position: relative;
 }
index dcae52398fe0c7f2686ed8f5793c5f17d190acca..f36dc9b0693c1c2ce10ece944a6d857724ad1325 100644 (file)
@@ -339,180 +339,73 @@ section {
     }
   }
 
-  &.velib {
-    .dtime {
-      &:before {
-        font-family: @font-awesome;
-        content: "\f206";
-        margin-right: 0.3em;
-      }
-    }
-
-    ul {
+  div {
+    font-size: 0.6em;
 
+    span {
+      font-size: 1em !important;
     }
+  }
+}
 
-    li {
-      text-align: left;
-      list-style: none;
-      font-size: 0.55em;
-      margin-top: 0.3em;
-      clear: both;
-
-      &[data-enabled=false] {
-        .n {
-          &.blue, &.green {
-            background-color: #cc0000;
-            color: #cc0000;
-          }
-        }
-      }
-
-      .l {
-        max-width: 7.2em;
-        display: inline-block;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        overflow: hidden;
-        vertical-align: top;
-      }
-
-      .n {
-        float: right;
-        vertical-align: top;
-        margin-left: 0.2em;
-        border-radius: 50%;
-        display: inline-block;
-        height: 1.6em;
-        width: 1.6em;
-        border: 0.1em solid #fff;
-        text-align: center;
-        position: relative;
-        line-height: 1.4em;
-        font-size: 0.8em;
-        color: #fff;
-
-        &.green {
-          background-color: #a2b43a;
-        }
+&.weather {
+  position: relative;
 
-        &.blue {
-          background-color: #59b0e3;
-        }
-      }
-    }
+  .temp {
+    font-size: 1.3em;
+    text-align: center;
+    display: block;
   }
 
-  &.traffic {
-    padding-left: 0 !important;
-    padding-right: 0 !important;
-
-    ul {
-      padding: 0.1em 0.5em;
+  .icons {
+    span {
+      width: 50%;
+      display: inline-block;
       text-align: left;
 
-      li {
-        list-style: none;
+      &.icon-night {
         text-align: right;
-        position: relative;
-        text-transform: lowercase;
-
-        &:before {
-          font-family: @font-awesome;
-          position: absolute;
-          top: 0.2em;
-          left: 0;
-          width: 1.2em;
-          display: inline-block;
-          text-align: center;
-        }
-
-        &.car {
-          &:before {
-            content: "\f1b9";
-          }
-        }
-
-        &.bike {
-          &:before {
-            content: "\f206";
-          }
-        }
-
-        &.subway {
-          &:before {
-            content: "\f239";
-          }
-        }
       }
-    }
-
-    div {
-      font-size: 0.6em;
 
-      span {
-        font-size: 1em !important;
+      img {
+        width: 2.2em;
+        height: 2.2em;
+        position: relative;
+        top: -0.3em;
       }
     }
   }
 
-  &.weather {
-    position: relative;
+  .temperatures {
+    font-size: 0.7em;
 
-    .temp {
-      font-size: 1.3em;
+    span {
+      width: 50%;
+      display: inline-block;
       text-align: center;
-      display: block;
-    }
 
-    .icons {
-      span {
-        width: 50%;
-        display: inline-block;
-        text-align: left;
-
-        &.icon-night {
-          text-align: right;
-        }
-
-        img {
-          width: 2.2em;
-          height: 2.2em;
-          position: relative;
-          top: -0.3em;
-        }
+      &.temp-min {
+        color: cornflowerblue;
       }
-    }
-
-    .temperatures {
-      font-size: 0.7em;
-
-      span {
-        width: 50%;
-        display: inline-block;
-        text-align: center;
-
-        &.temp-min {
-          color: cornflowerblue;
-        }
-
-        &.temp-max {
-          color: orangered;
-        }
 
+      &.temp-max {
+        color: orangered;
       }
 
     }
-  }
 
-  span {
-    display: inline-block;
+  }
+}
 
-    .fa {
-      font-size: 3em;
-    }
+span {
+  display: inline-block;
 
+  .fa {
+    font-size: 3em;
   }
+
+}
+
 }