mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-12 02:04:34 +00:00
Updater Log Message + api tweeks
This commit is contained in:
1 parent
ceeb002b6e
commit
801e26dda9
2 files changed
+8
-2
No files matched your search
+7
-1
@@ -61,8 +61,14 @@ if (file_exists($localBinary)) {
|
||||
$logManager->write("[Updater] version PHP: " . md5_file($localBinary), LogRecordType::INFO);
|
||||
if ($_SERVER['HTTP_X_ESP8266_SKETCH_MD5'] != md5_file($localBinary)) {
|
||||
sendFile($localBinary);
|
||||
//get device data
|
||||
$device = DeviceManager::getDeviceByMac($macAddress);
|
||||
$deviceName = $device['name'];
|
||||
$deviceId = $device['device_id'];
|
||||
//logfile write
|
||||
$logManager->write("[Device] device_ID " . $deviceId . "was just updated to new version", LogRecordType::WARNING);
|
||||
$logManager->write("[Device] version hash:" . md5_file($localBinary), LogRecordType::INFO);
|
||||
//notification
|
||||
$deviceName = DeviceManager::getDeviceByMac($macAddress)['name'];
|
||||
$notificationMng = new NotificationManager;
|
||||
$notificationData = [
|
||||
'title' => 'Info',
|
||||
|
||||
Reference in new issue
Block a user