<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
- <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment="." />
+ <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$/config/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.php" 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/homeassistant_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/homeassistant_device_event.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/automodes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/automodes.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/homeassistant.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/homeassistant.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/nightmode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/nightmode.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/pop.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/wcvmc.php" beforeDir="false" />
+ </list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
- <component name="PropertiesComponent">{
- "keyToString": {
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true",
- "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
- "RunOnceActivity.git.unshallow": "true",
- "RunOnceActivity.typescript.service.memoryLimit.init": "true",
- "SHELLCHECK.PATH": "C:\\Users\\vince\\AppData\\Roaming\\JetBrains\\IntelliJIdea2025.1\\plugins\\Shell Script\\shellcheck.exe",
- "Shell Script.Docker terminal.executor": "Run",
- "Shell Script.Update DNS.executor": "Run",
- "WebServerToolWindowFactoryState": "true",
- "WebServerToolWindowPanel.toolwindow.highlight.mappings": "true",
- "WebServerToolWindowPanel.toolwindow.highlight.symlinks": "true",
- "WebServerToolWindowPanel.toolwindow.show.date": "false",
- "WebServerToolWindowPanel.toolwindow.show.permissions": "false",
- "WebServerToolWindowPanel.toolwindow.show.size": "false",
- "deletionFromPopupRequiresConfirmation": "false",
- "git-widget-placeholder": "master",
- "ignore.virus.scanning.warn.message": "true",
- "junie.onboarding.icon.badge.shown": "true",
- "kotlin-language-version-configured": "true",
- "last_opened_file_path": "D:/Works/tortuga-home/images",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "project.structure.last.edited": "Project",
- "project.structure.proportion": "0.0",
- "project.structure.side.proportion": "0.2",
- "ruby.rails.projectView.checked": "true",
- "settings.editor.selected.configurable": "preferences.pluginManager",
- "vue.rearranger.settings.migration": "true"
+ <component name="PropertiesComponent"><![CDATA[{
+ "keyToString": {
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true",
+ "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
+ "RunOnceActivity.git.unshallow": "true",
+ "RunOnceActivity.typescript.service.memoryLimit.init": "true",
+ "SHELLCHECK.PATH": "C:\\Users\\vince\\AppData\\Roaming\\JetBrains\\IntelliJIdea2025.1\\plugins\\Shell Script\\shellcheck.exe",
+ "Shell Script.Docker terminal.executor": "Run",
+ "Shell Script.Update DNS.executor": "Run",
+ "WebServerToolWindowFactoryState": "true",
+ "WebServerToolWindowPanel.toolwindow.highlight.mappings": "true",
+ "WebServerToolWindowPanel.toolwindow.highlight.symlinks": "true",
+ "WebServerToolWindowPanel.toolwindow.show.date": "false",
+ "WebServerToolWindowPanel.toolwindow.show.permissions": "false",
+ "WebServerToolWindowPanel.toolwindow.show.size": "false",
+ "codeWithMe.voiceChat.enabledByDefault": "false",
+ "deletionFromPopupRequiresConfirmation": "false",
+ "git-widget-placeholder": "master",
+ "ignore.virus.scanning.warn.message": "true",
+ "junie.onboarding.icon.badge.shown": "true",
+ "kotlin-language-version-configured": "true",
+ "last_opened_file_path": "D:/Works/tortuga-home/images",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "project.structure.last.edited": "Project",
+ "project.structure.proportion": "0.0",
+ "project.structure.side.proportion": "0.2",
+ "ruby.rails.projectView.checked": "true",
+ "settings.editor.selected.configurable": "preferences.pluginManager",
+ "vue.rearranger.settings.migration": "true"
}
-}</component>
+}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\Works\tortuga-home\images" />
<workItem from="1774028822942" duration="792000" />
<workItem from="1774430967346" duration="6359000" />
<workItem from="1774441121722" duration="7518000" />
+ <workItem from="1774603188976" duration="327000" />
</task>
<task id="LOCAL-00502" summary=".">
<created>1641726946298</created>
<option name="project" value="LOCAL" />
<updated>1687259667913</updated>
</task>
- <option name="localTasksCounter" value="647" />
+ <option name="localTasksCounter" value="648" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
'Cuisine' => '00:04:20:2a:05:2e',
'Lit Jérôme' => 'b8:27:eb:62:d3:ce',
'Lit Vincent' => 'b8:27:eb:40:0e:e9',
- 'WC' => 'b8:27:eb:f6:1d:30',
'Salon' => '00:04:20:17:82:8b',
'Bureau' => 'dc:a6:32:50:70:42',
);
'salon' => ['Salon'],
'cuisine' => ['Cuisine'],
'sdb' => ['Salle de bains'],
- 'wc' => ['WC'],
];
$devices = [
'chambre' => ['id' => 'chambre', 'host' => '192.168.13.65', 'user' => 'pi', 'password' => 'atacama'],
'salon' => ['id' => 'salon', 'host' => '192.168.13.66', 'shield' => '192.168.13.40', 'user' => 'pi', 'password' => 'atacama'],
'bureau' => ['id' => 'bureau', 'shield' => '192.168.13.41'],
- 'wc' => ['id' => 'wc', 'host' => '192.168.13.67', 'user' => 'pi', 'password' => 'raspberry'],
'cuisine' => ['id' => 'cuisine', 'host' => '192.168.13.68', 'shield' => '192.168.13.31', 'user' => 'pi', 'password' => 'atacama'],
'bureausun' => ['id' => 'bureausun', 'host' => '192.168.13.70', 'shield' => '192.168.13.41', 'user' => 'pi', 'password' => 'atacama'],
'lit' => ['id' => 'lit', 'host' => '192.168.13.69', 'user' => 'pi', 'password' => 'atacama'],
_logSection('Cuisine');
updateCuisine();
- if ($cronmin % 2) {
- _logSection('WC VMC');
- checkWCVMC();
- }
}
function cronPing($cronmin)
if ($_GET['state'] === 'None') {
exit;
}
-const HA_SWITCH_BUREAU = 'event.double_interrupeur_cour_action';
-const HA_SWITCH_WC = 'event.interrupteur_wc_action';
+
const HA_CUBE_BUREAU = 'event.cube_bureau_action';
const HA_SWITCH_BEDROOM = 'binary_sensor.switch_bedroom';
const HA_CUBE_BATHROOM = 'sensor.0x00158d0005c19a86_action';
$action = 'projSensor';
$forceConfig = 'salon';
break;
- case HA_SWITCH_WC:
- $action = 'wcSwitch';
- $forceConfig = 'wc';
- break;
case HA_CUBE_BUREAU:
$forceConfig = 'bureau';
$action = 'cubeBureau';
return (int)haGetState($id);
}
-function wcSwitch()
-{
- switch ($_GET['state']) {
- case '1_double':
- case '2_double':
- case 'double':
- execScene('wc/spa', true);
- setState('wc', 1);
- break;
-
- case 'hold':
- case 'single':
- wcToggle();
- wcToggle();
- break;
- default:
- break;
- }
-}
-
-
function cubeBureau()
{
if (gloria()) {
}
updateCuisine();
}
- checkWCVMC();
}
function updateBureauAuto()
const HA_COCODRILO_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI0NjNhOWVhNzIyYzY0ZGRlODhkODY3ZDdhZDc2N2NmOSIsImlhdCI6MTc0OTA0MDkxNCwiZXhwIjoyMDY0NDAwOTE0fQ.0cwLyGhpd0XK4NaO2cK0686SNRor7jAQqdEDb9vos6Q';
const HA_COCODRILO_URL = 'http://cocodrilo.enhydra.fr:18832/';
-const HA_WC_VMC = 'switch.0x847127fffe280f20';
const HA_SDB_AMPLI = 'switch.0xa4c138168147c1b6';
const HA_ECO_BASIC = 'switch.ecomode_basic';
const HA_ECO_SUPER = 'switch.ecomode_super';
$chambre = 2;
$salon = 3;
$cuisine = 8;
-$wc = 9;
$bureau = 13;
$sdb = 14;
$cour = 11;
'home/hueoff' => [
['type' => 'hue', 'group' => 17, 'scene' => ['on' => false, 'effect' => 'none']],
],
- 'wc/on' => [
- ['type' => 'function', 'function' => 'wcOn'],
- ],
-
-// 'wc/nightambiance' => [
-// ['type' => 'hue', 'group' => $wc, 'scene' => ['effect' => 'none']],
-// ['type' => 'scene', 'scene' => 'wc/night'],
-// ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Nuit d\'été', $squeezeboxPlayers['WC'], 100, false]],
-// ],
-
- 'wc/spa' => [
- ['type' => 'hue', 'group' => $wc, 'scene' => ['effect' => 'colorloop', 'on' => true, 'brightness' => 128]],
- ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Rivière', $squeezeboxPlayers['WC'], 100]],
- ['type' => 'function', 'function' => 'wcVMCOff'],
- ],
'sdb/ampli/on' => [
['type' => 'ha', 'device' => HA_SDB_AMPLI, 'priority' => true],
sshCommand($cmd, 'litjerome');
}
-
-function wcVMCOn()
-{
- setState('lastVMCOn', time());
- // Start VMC
- haAction(HA_WC_VMC);
-}
-
-function wcVMCOff($timeout = 'auto')
-{
- if ($timeout === 'auto') {
- $d = time() - getState('lastVMCOn');
- if ($d <= 120) {
- $timeout = 1200;
- } else if ($d <= 300) {
- $timeout = 1800;
- } else {
- $timeout = 3200;
- }
- }
- $t = time() + $timeout;
- $max = max(getState('wcVMCOff', -1), $t);
- setState('wcVMCOff', $max);
- if ($max <= time()) {
- execScene('wc/vmc/off');
- }
-}
-
-function checkWCVMC()
-{
- $offtime = getState('wcVMCOff', -1);
- $time = time();
- if ($offtime == -1 || $offtime > $time || getState('lastVMCOn') > $offtime) {
- return;
- }
- execScene('wc/vmc/off');
-}
-
function delayHttpCall($url, $params, $delay)
{
try {
$player = _player($player);
$sdb = $player === 'Salle de bains' || $player == $squeezeboxPlayers['Salle de bains'];
- $wc = $player === 'WC' || $player == $squeezeboxPlayers['WC'];
$currentMusicKey = 'squeezeplaybyname_' . $player;
$s = getSqueezePlayerStatusName($player);
global $allmusics;
$m = $allmusics[$musicName];
- if ($wc) {
- squeezeRequest('pause', $player);
- if ($currentMusic !== $musicName) {
- setState($currentMusicKey, $musicName);
- foreach ($m['commands'] as $command) {
- echo $player . ':' . $command . '<br />';
- squeezeRequest($command, $player);
- }
- } else {
- squeezeRequest('button jump_fwd', $player);
- }
- } else {
- squeezeRequest('pause', $player);
- foreach ($m['commands'] as $command) {
- echo $player . ':' . $command . '<br />';
- squeezeRequest($command, $player);
- }
+ squeezeRequest('pause', $player);
+ foreach ($m['commands'] as $command) {
+ echo $player . ':' . $command . '<br />';
+ squeezeRequest($command, $player);
}
-
_squeezePlay($player, $volume);
}
<?php
require_once "import.php";
-$devices = ['entree', 'cuisine', 'salon', 'wc', 'bureau', 'chambre', 'sdb'];
+$devices = ['entree', 'cuisine', 'salon', 'bureau', 'chambre', 'sdb'];
foreach ($devices as $device) {
echo $device . ' : ' . getNightMode($device) . "<br>";
}
\ No newline at end of file
+++ /dev/null
-<?php
-
-define('TIMELIMIT', 1);
-$_GET['im'] = '5';
-include "import.php";
-
-if (getState('guest', '0') === '1' && $_GET['action'] == 'long') {
- $_GET['action'] = 'tap';
-}
-
-if ($_GET['button'] == 'wc') {
- if ($_GET['action'] == 'tap') {
- wcToggle();
- } else if ($_GET['action'] == 'double') {
- execScene('wc/spa');
- setState('wc', 1);
- } else if ($_GET['action'] == 'long') {
- execScene('home/alert');
- }
-} elseif ($_GET['button'] == 'sdb') {
- if ($_GET['action'] == 'tap') {
- sdbToggle();
- } else if ($_GET['action'] == 'double') {
- execScene('sdb/morning');
- } else if ($_GET['action'] == 'long') {
- execScene('home/alert');
- }
-}
\ No newline at end of file
+++ /dev/null
-<?php
-
-include "import.php";
-
-$rand = rand(100000, 1000000);
-setState('wcTimeout', $rand);
-sleep($_GET['delay']);
-if (getState('wcTimeout') == $rand) {
- execScene('wc/vmc/off');
-}
\ No newline at end of file
+++ /dev/null
-<?php
-include "import.php";
-wcToggle();
\ No newline at end of file
+++ /dev/null
-<?php
-include "import.php";
-checkWCVMC();
\ No newline at end of file