some fix and new firmware for shelly1

This commit is contained in:
unknown
2020-02-18 21:30:44 +01:00
parent e76b3127f3
commit 5a06a6c85a
20 changed files with 626 additions and 96 deletions

View File

@@ -38,6 +38,7 @@ Db::connect (DBHOST, DBUSER, DBPASS, DBNAME);
//Read API data
$json = file_get_contents('php://input');
$obj = json_decode($json, true);
$logManager->write("[API] Rest API request body -> decodet to json \n" . json_encode($obj, JSON_PRETTY_PRINT), LogRecordType::INFO);
//zabespecit proti Ddosu
if (isset($obj['user']) && $obj['user'] != ''){
@@ -69,9 +70,10 @@ if (DEBUGMOD != 1) {
//automationExecution
try {
AutomationManager::executeAll();
$fallbackManager = new FallbackManager(RANGES);
$fallbackManager->check();
AutomationManager::executeAll();
//LogKeeper::purge(LOGTIMOUT);
} catch (\Exception $e) {
$logManager->write("[Automation] Something happen during automation execution", LogRecordType::ERROR);
}