<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$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/lib/denon.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/denon.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/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/servers/logcat.php" beforeDir="false" afterPath="$PROJECT_DIR$/servers/logcat.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/install.md" beforeDir="false" afterPath="$PROJECT_DIR$/install.md" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/ecomode.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/ecomode.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/tools/xplanet/xplanet-earth" beforeDir="false" afterPath="$PROJECT_DIR$/tools/xplanet/xplanet-earth" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/tools/xplanet/xplanet-suncurve" beforeDir="false" afterPath="$PROJECT_DIR$/tools/xplanet/xplanet-suncurve" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1640778900839" duration="879000" />
<workItem from="1640787196827" duration="2522000" />
<workItem from="1641573994164" duration="2000" />
- <workItem from="1641574032847" duration="1662000" />
- </task>
- <task id="LOCAL-00452" summary=".">
- <created>1613738341286</created>
- <option name="number" value="00452" />
- <option name="presentableId" value="LOCAL-00452" />
- <option name="project" value="LOCAL" />
- <updated>1613738341287</updated>
+ <workItem from="1641574032847" duration="3254000" />
</task>
<task id="LOCAL-00453" summary=".">
<created>1613816554456</created>
<option name="project" value="LOCAL" />
<updated>1640788248690</updated>
</task>
- <option name="localTasksCounter" value="501" />
+ <task id="LOCAL-00501" summary=".">
+ <created>1641578230504</created>
+ <option name="number" value="00501" />
+ <option name="presentableId" value="LOCAL-00501" />
+ <option name="project" value="LOCAL" />
+ <updated>1641578230506</updated>
+ </task>
+ <option name="localTasksCounter" value="502" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
`sudo add-apt-repository ppa:ondrej/php;sudo add-apt-repository ppa:ondrej/apache2;sudo apt-get update`
-`apt update;apt install composer python3-certbot-apache wakeonlan adb lynx at redis php7.4-fpm php7.4-opcache php7.4-json php7.4-xml php7.4-curl php7.4-redis php7.4-igbinary php7.4-ssh2 php7.4-soap php7.4-sockets php7.4-mysql php7.4-gd php7.4-exif php7.4-imap php7.4-mbstring `
+`apt update;apt install composer python3-certbot-apache wakeonlan adb lynx at redis php7.4-fpm php7.4-opcache php7.4-json php7.4-xml php7.4-curl php7.4-redis php7.4-igbinary php7.4-ssh2 php7.4-soap php7.4-sockets php7.4-mysql php7.4-gd php7.4-exif php7.4-imap php7.4-mbstring xplanet`
`useradd --gid www-data --shell /bin/bash tortugahome`
`mkdir -p /var/log/tortugahome/profiles/;chown -R tortugahome:www-data /var/log/tortugahome`
$res = getEcoMode();
-if (!$res && in_array(config('DEVICE'), ['bureau', 'bureausun'])) {
- $res = getDomoticzDeviceStatus(391) === 'Closed' ? '1' : '0';
-}
+
die($res);
if (!$force && $mode == $currentMode) {
return;
}
- echo 'switch eco mode :: force ('.$force.') :: (' . $mode . ') :: former (' . $currentMode . ')' . "\n";
+ echo 'switch eco mode :: force (' . $force . ') :: (' . $mode . ') :: former (' . $currentMode . ')' . "\n";
setState('triggeredEcomode', $mode);
$scenes = [0 => 'off', 1 => 'on', 2 => 'super'];
function getNightMode()
{
- if(config('DEVICE')==='sdb'){
- $h=date('G');
- if($h>6 && $h<21){
+ $device = config('DEVICE');
+ if ($device === 'sdb') {
+ $h = date('G');
+ if ($h > 6 && $h < 21) {
return false;
}
}
+ if ($device === 'salon') {
+ if (getState('salon') !== 'off') {
+ return false;
+ }
+ }
+ if ($device === 'bureau' || $device === 'bureausun') {
+ if (getDomoticzDeviceStatus(391) === 'Closed') {
+ return true;
+ }
+ if (getState('bureau_gradient') !== 'off') {
+ return false;
+ }
+ }
+ if ($device === 'entree' || $device === 'cuisine') {
+ $lights = [15, 18, 1, 58, 59, 57, 56, 55, 37];
+ $hueLights = getHueInstance()->getLights();
+ foreach ($lights as $l) {
+ $light = $hueLights[$l];
+ if ($light->isReachable() && $light->isOn()) {
+ return false;
+ }
+ }
+
+ }
return getState('night') == '1';
}
function getEcoMode()
{
- $res = getState('ecomode','0');
+ $res = getState('ecomode', '0');
if ($res == '0' && getNightMode()) {
$res = '1';
}
#!/bin/sh
month=$(date +%m)
-ln -sf "/var/www/home/tools/xplanet/world.topo.bathy.2004$month.3x5400x2700.png" "/var/www/home/tools/xplanet/earth.png"
-xplanet -config /var/www/home/tools/xplanet/config -longitude 2.3343236 -latitude 36 -geometry 300x300 -num_times 1 -output /var/www/home/images/earth.png
\ No newline at end of file
+ln -sf "/home/tortugahome/www/tools/xplanet/world.topo.bathy.2004$month.3x5400x2700.png" "/home/tortugahome/www/tools/xplanet/earth.png"
+xplanet -config /home/tortugahome/www/tools/xplanet/config -longitude 2.3343236 -latitude 36 -geometry 300x300 -num_times 1 -output /home/tortugahome/www/images/earth.png
\ No newline at end of file
#!/bin/sh
month=$(date +%m)
-ln -sf "/var/www/home/tools/xplanet/world.topo.bathy.2004$month.3x5400x2700.png" "/var/www/home/tools/xplanet/earth.png"
-xplanet -config /var/www/home/tools/xplanet/config -longitude 2.3343236 -geometry 1600x1200 -projection rectangular -num_times 1 -output /var/www/home/images/suncurve.png
\ No newline at end of file
+ln -sf "/home/tortugahome/www/tools/xplanet/world.topo.bathy.2004$month.3x5400x2700.png" "/home/tortugahome/www/tools/xplanet/earth.png"
+xplanet -config /home/tortugahome/www/tools/xplanet/config -longitude 2.3343236 -geometry 1600x1200 -projection rectangular -num_times 1 -output /home/tortugahome/www/images/suncurve.png
\ No newline at end of file