This commit is contained in:
Václav Španinger 2021-02-15 14:03:15 +01:00
parent 485709d61f
commit 3d3b073131
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,9 @@ class EndpointsApi extends ApiController{
foreach ($obj['logs'] as $log) {
$deviceLogManager = new LogManager('../logs/devices/'. date("Y-m-d").'.log');
$deviceLogManager->setLevel(LOGLEVEL);
$deviceLogManager->write("[Device Log Msg] Device_ID " . $device['device_id'] . "->" . $log, LogRecordTypes::ERROR);
if ($log != 'HTTP_UPDATE_FAILD code-102 messageFile Not Found (404)'){
$deviceLogManager->write("[Device Log Msg] Device_ID " . $device['device_id'] . "->" . $log, LogRecordTypes::ERROR);
}
unset($deviceLogManager);
}
$this->response([

View File

@ -96,7 +96,7 @@ class RecordManager{
$dateTime = $dateTime->modify($periodLocal);
$dateTime = $dateTime->format('Y-m-d H:i:s');
$groupBy = strtoupper($groupBy).'(time)';
$sql = 'SELECT value, time, execuded FROM records
$sql = 'SELECT value, time, execuded, origin FROM records
WHERE
subdevice_id = ?
AND