Skip to content
Permalink
Browse files

Updates

* Simple devices: new type -- openable (gates, curtains, etc.)
* Simple devices: homekit sync for openable devices
* Simple devices: ability to switch methods on Actions tab
* Minor tweaks
  • Loading branch information...
sergejey committed Sep 24, 2019
1 parent 886c37a commit 58e919aeb71520d0a002c039d29d84b82812f937
@@ -123,6 +123,47 @@
background-color:yellow;
}

.opentype_curtains .device-icon {
background-image: url(../cms/scenes/styles/switch/i_shtory_off.png);
}
.opentype_curtains .device-icon.on {
background-color:yellow;
background-image: url(../cms/scenes/styles/switch/i_shtory_on.png);
}

.opentype_window .device-icon {
background-image: url(../cms/scenes/styles/switch/i_window_off.png);
}
.opentype_window .device-icon.on {
background-color:yellow;
background-image: url(../cms/scenes/styles/switch/i_window_on.png);
}

.opentype_door .device-icon {
background-image: url(../cms/scenes/styles/switch/i_door_off.png);
}
.opentype_door .device-icon.on {
background-color:yellow;
background-image: url(../cms/scenes/styles/switch/i_door_on.png);
}

.opentype_shutters .device-icon {
background-image: url(../cms/scenes/styles/switch/i_jaluzi_off.png);
}
.opentype_shutters .device-icon.on {
background-color:yellow;
background-image: url(../cms/scenes/styles/switch/i_jaluzi_on.png);
}

.opentype_gates .device-icon {
background-image: url(../cms/scenes/styles/switch/i_gate_off.png);
}
.opentype_gates .device-icon.on {
background-color:yellow;
background-image: url(../cms/scenes/styles/switch/i_gate_on.png);
}


.device-icon.temperature {
background-image: url(../cms/scenes/styles/informer/i_temp.png);
}
@@ -19,13 +19,19 @@
set_time_limit(0);
$db_filename = ROOT . 'database_backup/db.sql';
$connected = false;
while (!$connected)
{
while (!$connected) {
echo "Connecting to database..." . PHP_EOL;
if (file_exists($db_filename) && !IsWindowsOS()) {
echo "Restarting mysql service..." . PHP_EOL;
exec("sudo service mysql restart"); // trying to restart mysql
sleep(5);
}
$connected = $db->Connect();
sleep(5);
if (!$connected) {
sleep(5);
}
}
echo "CONNECTED TO DB" . PHP_EOL;
@@ -100,15 +106,14 @@
//restoring database backup (if was saving periodically)
$filename = ROOT . 'database_backup/db.sql';
if (file_exists($filename))
if (file_exists($db_filename))
{
echo "Running: mysql restore from file: " . $filename . PHP_EOL;
DebMes("Running: mysql restore from file: " . $filename);
echo "Running: mysql restore from file: " . $db_filename . PHP_EOL;
DebMes("Running: mysql restore from file: " . $db_filename);
$mysql_path = (substr(php_uname(), 0, 7) == "Windows") ? SERVER_ROOT . "/server/mysql/bin/mysql" : 'mysql';
$mysqlParam = " -u " . DB_USER;
if (DB_PASSWORD != '') $mysqlParam .= " -p" . DB_PASSWORD;
$mysqlParam .= " " . DB_NAME . " <" . $filename;
$mysqlParam .= " " . DB_NAME . " <" . $db_filename;
exec($mysql_path . $mysqlParam);
}

0 comments on commit 58e919a

Please sign in to comment.
You can’t perform that action at this time.