mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Fixes
This commit is contained in:
1 parent
1415c0cf2d
commit
696ff07987
4 files changed
+9
-6
No files matched your search
@@ -62,6 +62,7 @@ class EndpointsApi extends ApiController{
|
||||
}
|
||||
|
||||
$device = DeviceManager::getDeviceByToken($obj['token']);
|
||||
DeviceManager::setHeartbeat($device['device_id']);
|
||||
|
||||
//Diagnostic
|
||||
if (isset($obj['settings'])){
|
||||
@@ -110,7 +111,7 @@ class EndpointsApi extends ApiController{
|
||||
if (!SubDeviceManager::getSubDeviceByMaster($device['device_id'], $key)) {
|
||||
SubDeviceManager::create($device['device_id'], $key, UNITS[$key]);
|
||||
}
|
||||
|
||||
|
||||
$subDeviceLastReordValue[$key] = $value['value'];
|
||||
RecordManager::create($device['device_id'], $key, round($value['value'],3));
|
||||
$logManager->write("[API] Device_ID " . $device['device_id'] . " writed value " . $key . ' ' . $value['value'], LogRecordTypes::INFO);
|
||||
|
||||
Reference in new issue
Block a user