<project version="4">
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+ <change afterPath="$PROJECT_DIR$/config/coffee.php" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/scripts/ifttt.php" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/scripts/lib/ifttt.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/composer.json" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/composer.lock" beforeDir="false" afterPath="$PROJECT_DIR$/composer.lock" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/lib/hue.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/hue.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/default.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/default.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/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$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="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/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/light.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/light.php" afterDir="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="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<workItem from="1565597022811" duration="1470000" />
<workItem from="1565598552133" duration="873000" />
<workItem from="1565857750276" duration="198000" />
- <workItem from="1565857963461" duration="6119000" />
- </task>
- <task id="LOCAL-00153" summary=".">
- <created>1550561360205</created>
- <option name="number" value="00153" />
- <option name="presentableId" value="LOCAL-00153" />
- <option name="project" value="LOCAL" />
- <updated>1550561360205</updated>
+ <workItem from="1565857963461" duration="9853000" />
</task>
<task id="LOCAL-00154" summary=".">
<created>1550698148331</created>
<option name="project" value="LOCAL" />
<updated>1565598575548</updated>
</task>
- <option name="localTasksCounter" value="202" />
+ <task id="LOCAL-00202" summary=".">
+ <created>1565865380451</created>
+ <option name="number" value="00202" />
+ <option name="presentableId" value="LOCAL-00202" />
+ <option name="project" value="LOCAL" />
+ <updated>1565865380452</updated>
+ </task>
+ <option name="localTasksCounter" value="203" />
<servers />
</component>
<component name="TodoView">
--- /dev/null
+<?php
+$shortcuts['coffee'] = [
+ ['type' => 'ifttt', 'event' => 'coffee_on', 'label' => 'Allumer'],
+ ['type' => 'ifttt', 'event' => 'coffee_off', 'label' => 'éteindre'],
+ ['type' => 'separator', 'label' => 'Cafés'],
+ ['type' => 'ifttt', 'event' => 'coffee_vincent', 'label' => 'Vincent'],
+ ['type' => 'ifttt', 'event' => 'coffee_jerome', 'label' => 'Jérôme'],
+ ['type' => 'ifttt', 'event' => 'coffee_expresso', 'label' => 'Expresso'],
+ ['type' => 'ifttt', 'event' => 'coffee_americano', 'label' => 'Americano'],
+];
\ No newline at end of file
config('ROOM_NAME', 'Cuisine');
config('ROOM', 'cuisine');
config('SQUEEZEBOX_PLAYER', 'Cuisine');
-config('HIDEMASK_TIMEOUT',250);
+config('HIDEMASK_TIMEOUT', 250);
if (DISPLAYINTERFACE) {
- $c = cuisine();
+ $c = cuisine();
- $favoriteslights = [
- ['type' => 'volume', 'volume' => '5%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
- ['type' => 'volume', 'volume' => '5%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
- ];
- $favoriteslights = array_merge($favoriteslights, $c['favorites']);
+ $favoriteslights = [
+ ['type' => 'volume', 'volume' => '5%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
+ ['type' => 'volume', 'volume' => '5%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
+ ];
+ $favoriteslights = array_merge($favoriteslights, $c['favorites']);
- include "default.php";
+ include "default.php";
- $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
+ $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
<a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
<a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
<a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>
+ <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
<a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
<a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
<a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
], $favoriteslights, $roomshome);
include ROOT . '/config/settings.php';
+include ROOT . '/config/coffee.php';
profile('Set settings', __FILE__, __LINE__);
if (hasConfig('SQUEEZEBOX_PLAYER')) {
$nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
<a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
<a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
+ <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
<a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
<a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
<a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
<a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
<a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>
<a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>
+ <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
<a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
<a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
<a href="scripts/off.php" class="ajax"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
<a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
<a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>
<a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>
+ <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
<a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
<a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
<a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
CONFIG.SLEEPTYPE = 'off';
}
var defaultSleepTime = CONFIG.SLEEPSCREEN;
-var hideMaskTimeout=parseInt(CONFIG.HIDEMASK_TIMEOUT);
+var hideMaskTimeout = parseInt(CONFIG.HIDEMASK_TIMEOUT);
var defaultVolume = parseInt(CONFIG.VOLUME);
if (isNaN(defaultVolume)) {
defaultVolume = 0;
return true;
});
+ $(document).on(clickevent, '.ifttt', function () {
+ $.get('scripts/ifttt.php?event=' + $(this).data('event'));
+ return false;
+ });
+
$(document).on(clicktouchevent, 'a[data-menu]', function () {
$("#iframeHolder").hide();
window.location.hash = "#/section/" + $(this).data('menu');
--- /dev/null
+<?php
+require_once "import.php";
+ifttt($_GET['event']);
\ No newline at end of file
--- /dev/null
+<?php
+function ifttt($event)
+{
+ httpRequest('https://maker.ifttt.com/trigger/' . $event . '/with/key/5KxVqNj_tXibHw27u7uja');
+}
\ No newline at end of file
require_once ROOT . '/scripts/lib/heartbeats.php';
require_once ROOT . '/scripts/lib/ssh.php';
require_once ROOT . '/scripts/lib/cachemedia.php';
+require_once ROOT . '/scripts/lib/ifttt.php';
profile('Loaded libraries', __FILE__, __LINE__);
} else if ($s['type'] == 'harmonyactivity') {
$attrs['class'] = 'harmonyactivity';
$attrs['data-activity'] = $s['activity'];
+ } else if ($s['type'] == 'ifttt') {
+ $attrs['class'] = 'ifttt';
+ $attrs['data-event'] = $s['event'];
}
if (isset($s['seen']) && $s['seen']) {
['type' => 'scene', 'scene' => 'chambre/planetarium/off'],
['type' => 'function', 'function' => 'bedbrightness', 'args' => [255]],
['type' => 'phonetask', 'phone' => 'vincent', 'task' => 'Matin'],
+ ['type' => 'ifttt', 'event' => 'coffee_on'],
],
'chambre/deshumidificateur/on' => [
// ['type' => 'insteon', 'command' => '0?1138=I=0=0'],
['type' => 'phonetask', 'phone' => 'vincent', 'task' => 'Stop All Sounds'],
['type' => 'scene', 'scene' => 'salon/freebox/off'],
['type' => 'scene', 'scene' => 'sdb/ampli/off'],
+ ['type' => 'ifttt', 'event' => 'coffee_off'],
+ ['type' => 'ifttt', 'event' => 'oven_off'],
],
'home/welcome' => [
['type' => 'ecomode', 'mode' => '0'],
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') {
+ ifttt($action['event']);
}
}
}
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
}
+header a .fa-coffee {
+ -webkit-transform: scaleX(0.85);
+ transform: scaleX(0.85);
+ -webkit-transform-origin: 0 0;
+ transform-origin: 0 0;
+}
.fit {
transform-origin: 0 0;
-webkit-transform-origin: 0 0;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
}
+
+ .fa-coffee {
+ -webkit-transform: scaleX(0.85);
+ transform: scaleX(0.85);
+
+ -webkit-transform-origin: 0 0;
+ transform-origin: 0 0;
+ }
}
}