<project version="4">
<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$/config/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.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/switchbot.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/switchbot.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1642240002240" duration="1108000" />
<workItem from="1642761590471" duration="1992000" />
<workItem from="1642848701157" duration="3435000" />
- <workItem from="1642856038290" duration="5973000" />
- </task>
- <task id="LOCAL-00461" summary=".">
- <created>1617266964333</created>
- <option name="number" value="00461" />
- <option name="presentableId" value="LOCAL-00461" />
- <option name="project" value="LOCAL" />
- <updated>1617266964333</updated>
+ <workItem from="1642856038290" duration="8758000" />
</task>
<task id="LOCAL-00462" summary=".">
<created>1617871680635</created>
<option name="project" value="LOCAL" />
<updated>1642864397546</updated>
</task>
- <option name="localTasksCounter" value="510" />
+ <task id="LOCAL-00510" summary=".">
+ <created>1642864772532</created>
+ <option name="number" value="00510" />
+ <option name="presentableId" value="LOCAL-00510" />
+ <option name="project" value="LOCAL" />
+ <updated>1642864772532</updated>
+ </task>
+ <option name="localTasksCounter" value="511" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
'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'],
- 'sdb' => ['id' => 'sdb', 'shield' => '192.168.13.32'],
+ 'sdb' => ['id' => 'sdb', 'shield' => '192.168.13.32', 'host' => '192.168.13.63', 'user' => 'pi', 'password' => 'atacama'],
'avion' => ['id' => 'avion', 'host' => '192.168.13.5', 'user' => 'Tortuga', 'password' => '8nc4PuwzCScw&^Vi$Fh#&n', 'mac' => 'E0:D5:5E:68:67:B9'],
];
{
execScene('sdb/ampli/off');
offOMX('sdb');
+ hotwaterAutoMode('1');
}
function offChambre()
['type' => 'state', 'key' => 'sdb', 'value' => 0],
['type' => 'domoticz', 'scene' => 20, 'command' => false, 'priority' => true],
['type' => 'function', 'function' => 'stopSqueezeboxPlayer', 'args' => [$squeezeboxPlayers['Salle de bains'], false]],
- ['type' => 'function', 'key' => 'hotwaterAutoMode', 'args' => ['1']],
],
'sdb/on' => [
['type' => 'state', 'key' => 'sdb', 'value' => 1],
echo $player . ':' . $command . '<br />';
squeezeRequest($command, $player);
}
+
+ if ($player === 'Salle de bains') {
+ hotwaterCheckMode();
+ }
}
function squeezePlayerOn($player)
<?php
-function switchbot($device, $command = 'press')
+function switchbot($device, $command = 'press', $rpi = 'bureausun')
{
for ($i = 0; $i <= 2; $i++) {
- $res = sshCommand('/usr/bin/python3 /usr/local/python-host/switchbot_py3.py -d ' . $device . ' -c ' . $command, 'bureausun', true, true);
+ $res = sshCommand('/usr/bin/python3 /usr/local/python-host/switchbot_py3.py -d ' . $device . ' -c ' . $command, $rpi, true, true);
if (stristr($res['output'], 'Command execution successful')) {
break;
}
$res = '';
for ($i = 0; $i < $clicks; $i++) {
$res .= ' one click - ';
- $res .= print_r(switchbot($device));
+ $res .= print_r(switchbot($device, 'press', 'sdb'));
if ($i < $clicks - 1) {
sleep(2);
}