<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/chambre.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/chambre.php" 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/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" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1610050680817" duration="1480000" />
<workItem from="1610202160108" duration="2175000" />
<workItem from="1610280280433" duration="7383000" />
- <workItem from="1610462926782" duration="995000" />
- </task>
- <task id="LOCAL-00383" summary=".">
- <created>1605111184884</created>
- <option name="number" value="00383" />
- <option name="presentableId" value="LOCAL-00383" />
- <option name="project" value="LOCAL" />
- <updated>1605111184884</updated>
+ <workItem from="1610462926782" duration="1001000" />
+ <workItem from="1610483375018" duration="2127000" />
</task>
<task id="LOCAL-00384" summary=".">
<created>1605121533132</created>
<option name="project" value="LOCAL" />
<updated>1610463457269</updated>
</task>
- <option name="localTasksCounter" value="432" />
+ <task id="LOCAL-00432" summary=".">
+ <created>1610463936245</created>
+ <option name="number" value="00432" />
+ <option name="presentableId" value="LOCAL-00432" />
+ <option name="project" value="LOCAL" />
+ <updated>1610463936245</updated>
+ </task>
+ <option name="localTasksCounter" value="433" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
$c = chambre();
$shortcuts['lights'] = $c['all'];
- $favoriteslights = $c['favorites'];
+ $favoriteslights = array_merge([['type' => 'light', 'scene' => 'chambre/reading/fireplace', 'label' => 'Au coin du feu'],], $c['favorites']);
include "default.php";
$nav = ['home', 'lights', 'music', 'remote', 'coffee', 'switch', 'settings', 'alert', 'off'];
'Bureau' => '7e:23:f6:33:1d:3b',
);
+
$phones = array('vincent' => array(
'ip' => '192.168.13.31',
'key' => 'APA91bHeWfPc86eVpVzYDfQHdolELsdHdlNou2a2YoMWhBuAG9odAlfZLBjve9zDBq4U04e_zd2tA864El8Z2NfUh7XJktOHbU4F1mdmAVczklg5ZFRClvhX4f8fqfZ9YLG94NdBQbGn',
['type' => 'function', 'function' => 'bedbrightness', 'args' => [255]],
['type' => 'scene', 'scene' => 'chambre/cheminee'],
],
+ 'chambre/reading/fireplace' => [
+ ['type' => 'scene', 'scene' => 'chambre/chillout'],
+ ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Cheminée', $squeezeboxPlayers['Chambre']]],
+ ],
'chambre/reading' => [
['type' => 'nightmode', 'mode' => '0'],
['type' => 'state', 'key' => 'chambre', 'value' => 1],
{
setState('lastVMCOn', time());
// Start VMC
- domoticzSwitch(2205,true,'light', true);
+ domoticzSwitch(2205, true, 'light', true);
}
function wcVMCOff($timeout = 'auto')
if (!$stopIfSync && getState('syncsoiree') == '1') {
return;
}
+
squeezeRequest('sync -', $player);
squeezeRequest('stop', $player);
squeezeRequest('power 0', $player);
+
+ $room = getRoomBySqueezeboxPlayer($player);
+ if ($room == 'salon') {
+
+ } else if ($room === 'sdb') {
+ execScene('sdb/ampli/off');
+ } else if ($room === 'bureau') {
+ execScene('bureau/sound/off');
+ } else if ($room === 'chambre') {
+ denon(false);
+ }
+}
+
+function getRoomBySqueezeboxPlayer($player)
+{
+ global $squeezeboxPlayers, $squeezeboxPlayersByRoom;
+ $player = _player($player);
+ $p = array_search($player, $squeezeboxPlayers);
+ foreach ($squeezeboxPlayersByRoom as $room => $players) {
+ if (in_array($p, $players)) {
+ return $room;
+ }
+ }
+ return null;
}
function stopAllSqueezebox()
return $res['result']['_mode'] == 'play' ? 1 : 0;
}
-function stopSqueezebox($player)
+function stopSqueezebox($player, $stopIfSync = true)
{
- $commandes = ['stop', 'power 0', 'sync -'];
- foreach ($commandes as $commande) {
- squeezeRequest($commande, $player);
- }
+ stopSqueezeboxPlayer($player, $stopIfSync);
}
function stopPlayersIn($room)