<project version="4">
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
- <change afterPath="$PROJECT_DIR$/offline.html" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/service-worker.js.template" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/scripts/lib/netflix.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/js/jquery.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/jquery.min.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/js/webapp.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/webapp.js" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/manifest.php" beforeDir="false" afterPath="$PROJECT_DIR$/manifest.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$/service-worker.js" beforeDir="false" afterPath="$PROJECT_DIR$/service-worker.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<workItem from="1602862886793" duration="1014000" />
<workItem from="1603095373591" duration="1368000" />
<workItem from="1603270756890" duration="3366000" />
- <workItem from="1603558842019" duration="7205000" />
- </task>
- <task id="LOCAL-00304" summary=".">
- <created>1582104447675</created>
- <option name="number" value="00304" />
- <option name="presentableId" value="LOCAL-00304" />
- <option name="project" value="LOCAL" />
- <updated>1582104447675</updated>
+ <workItem from="1603558842019" duration="12945000" />
</task>
<task id="LOCAL-00305" summary=".">
<created>1582130758226</created>
<option name="project" value="LOCAL" />
<updated>1603560834622</updated>
</task>
- <option name="localTasksCounter" value="353" />
+ <task id="LOCAL-00353" summary=".">
+ <created>1603626112636</created>
+ <option name="number" value="00353" />
+ <option name="presentableId" value="LOCAL-00353" />
+ <option name="project" value="LOCAL" />
+ <updated>1603626112636</updated>
+ </task>
+ <option name="localTasksCounter" value="354" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="872" y="161" key="#Plugins/0.0.2560.1040@0.0.2560.1040" timestamp="1596008801840" />
- <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2" timestamp="1603560831635">
+ <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2" timestamp="1603626109154">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1602171117745" />
- <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1603560831635" />
- <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1602146675515">
+ <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1603626109154" />
+ <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1603637447680">
<screen x="0" y="0" width="2560" height="1040" />
</state>
- <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1602146675515" />
+ <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1603637447680" />
<state x="781" y="165" key="SettingsEditor" timestamp="1596008871908">
<screen x="0" y="0" width="2560" height="1040" />
</state>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
console.log('👍', 'navigator.serviceWorker is supported');
- navigator.serviceWorker.register('/service-worker.js.template');
+ navigator.serviceWorker.register('/service-worker.js');
});
}
--- /dev/null
+<?php
+function netflixWatch($id, $device = null)
+{
+ sshCommand('/usr/bin/chromium-browser --kiosk --user-agent="Mozilla/5.0 (X11; CrOS armv7l 12371.89.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36" https://www.netflix.com/fr/login?nextpage=' . rawurldecode('https://www.netflix.com/SwitchProfile?tkn=3T22ISQ4C5D35OFFDZCBRKGBSI'), $device, false, false);
+
+ sshCommand('/usr/bin/chromium-browser --kiosk --user-agent="Mozilla/5.0 (X11; CrOS armv7l 12371.89.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36" https://www.netflix.com/fr/login?nextpage=' . rawurldecode('https://www.netflix.com/SwitchProfile?tkn=3T22ISQ4C5D35OFFDZCBRKGBSI'), $device, false, false);
+}
\ No newline at end of file
['type' => 'function', 'function' => 'wakeupPC', 'args' => ['avion']],
],
'bureau/l61/on' => [
- ['type' => 'domoticz', 'device' => '2074', 'command' => true],
+ ['type' => 'domoticz', 'device' => '2074', 'command' => true, 'priority' => true],
],
'bureau/l61/off' => [
- ['type' => 'domoticz', 'device' => '2074', 'command' => false],
+ ['type' => 'domoticz', 'device' => '2074', 'command' => false, 'priority' => true],
],
'bureau/lumineux' => [
['type' => 'scene', 'scene' => 'bureau/l61/on'],
}
if ($action['type'] == 'hue') {
- hueCommand($action,$transitionTime);
+ hueCommand($action, $transitionTime);
} else if ($action['type'] == 'insteon') {
insteonCommand($action['command']);
} else if ($action['type'] == 'delay' || $action['type'] == 'scene') {
-const CACHE_NAME = 'mpwa-cache-v1';
-const urlsToCache = ['./', 'index.php'];
-
-// Listen for the install event, which fires when the service worker is installing
-self.addEventListener('install', event => {
- // Ensures the install event doesn't complete until after the cache promise resolves
- // This is so we don't move on to other events until the critical initial cache is done
- event.waitUntil(
- // Open a named cache, then add all the specified URLs to it
- caches.open(CACHE_NAME).then(cache => cache.addAll(urlsToCache))
- );
+self.addEventListener('install', (event) => {
+ console.log('👷', 'install', event);
+ self.skipWaiting();
});
-// Listen for the activate event, which is fired after installation
-// Activate is when the service worker actually takes over from the previous
-// version, which is a good time to clean up old caches
-self.addEventListener('activate', event => {
- console.log('Finally active. Ready to serve!');
- event.waitUntil(
- // Get the keys of all the old caches
- caches
- .keys()
- // Ensure we don't resolve until all the promises do (i.e. each key has been deleted)
- .then(keys =>
- Promise.all(
- keys
- // Remove any cache that matches the current cache name
- .filter(key => key !== CACHE_NAME)
- // Map over the array of old cache names and delete them all
- .map(key => caches.delete(key))
- )
- )
- );
+self.addEventListener('activate', (event) => {
+ console.log('👷', 'activate', event);
+ return self.clients.claim();
});
-// Listen for browser fetch events. These fire any time the browser tries to load
-// any outside resources
-self.addEventListener('fetch', function (event) {
- // This lets us control the response
- // We pass in a promise that resolves with a response object
- event.respondWith(
- // Check whether we have a matching response for this request in our cache
- caches.match(event.request).then(response => {
- // It's in the cache! Serve the response straight from there
- if (response) {
- console.log('Serving response from the cache');
- return response;
- }
- // If it's not in the cache we make a fetch request for the resource
- return (
- fetch(event.request)
- // Then we open our cache
- .then(response => caches.open(CACHE_NAME))
- // Then we put the request into the cache, so we have it offline next time
- .then(cache => {
- // We have to clone the response as response streams can only be read once
- // This way we can put one copy in the cache and return the other to the browser
- cache.put(event.request, response.clone());
- return response;
- })
- .catch(response => {
- console.log('Fetch failed, sorry.');
- })
- );
- })
- );
-});
+// self.addEventListener('fetch', function(event) {
+// // console.log('👷', 'fetch', event);
+// event.respondWith(fetch(event.request));
+// });
\ No newline at end of file