Skip to content

Commit f1cdd0a

Browse files
committed
Logs
1 parent 38af0be commit f1cdd0a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/class/frigate.class.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2820,6 +2820,7 @@ private static function processCameraData($eqCamera, $key, $data)
28202820
}
28212821

28222822
if (in_array($innerKey, $objects)) {
2823+
log::add("frigateDetect", 'debug', $eqCamera->getHumanName() . ', Objet : ' . $innerKey. ', Etat : ' . json_encode($innerValue));
28232824
// mise à jour pour la caméra
28242825
self::handleObject($eqCamera, $innerKey, $innerValue);
28252826
// mise à jour pour l'équipement event
@@ -2849,7 +2850,7 @@ private static function processCameraData($eqCamera, $key, $data)
28492850
break;
28502851

28512852
case 'all':
2852-
log::add("frigateDetect", 'info', $eqCamera->getHumanName() . ' => Valeur motion state : ' . json_encode($innerValue));
2853+
log::add("frigateDetect", 'debug', $eqCamera->getHumanName() . ', Objet : ' . $innerKey . ', Etat : ' . json_encode($innerValue));
28532854
// mise à jour pour la caméra
28542855
self::handleAllObject($eqCamera, $innerKey, $innerValue);
28552856
// mise à jour pour l'équipement event
@@ -2889,22 +2890,22 @@ private static function handleObject($eqCamera, $key, $innerValue)
28892890
$infoCmd = self::createCmd($eqCamera->getId(), "Détection " . $key, "binary", "", "info_detect_" . $key, "JEEMATE_CAMERA_DETECT_EVENT_STATE", 0);
28902891
$infoCmd->event($innerValue);
28912892
$infoCmd->save();
2893+
log::add("frigateDetect", 'debug', $eqCamera->getHumanName() . ', Objet : ' . $key . ', Valeur enregistrée : ' . json_encode($innerValue));
28922894
}
28932895
}
28942896
private static function handleAllObject($eqCamera, $key, $innerValue)
28952897
{
28962898
$value = 0;
28972899
if (isset($innerValue["active"])) {
28982900
$value = ($innerValue["active"] !== 0) ? 1 : 0;
2899-
log::add("frigateDetect", 'info', $eqCamera->getHumanName() . ', active value : ' . $value);
29002901
} elseif (isset($innerValue) && !is_array($innerValue)) {
29012902
$value = ($innerValue !== 0) ? 1 : 0;
2902-
log::add("frigateDetect", 'info', $eqCamera->getHumanName() . ', value : ' . $value);
29032903
}
29042904

29052905
$infoCmd = self::createCmd($eqCamera->getId(), "Détection tout", "binary", "", "info_detect_all", "JEEMATE_CAMERA_DETECT_EVENT_STATE", 0);
29062906
$infoCmd->event($value);
29072907
$infoCmd->save();
2908+
log::add("frigateDetect", 'debug', $eqCamera->getHumanName() . ', Objet : ' . $key . ', Valeur enregistrée : ' . json_encode($innerValue));
29082909

29092910
}
29102911
private static function updateCameraState($eqCamera, $type, $state, $jeemateState)

0 commit comments

Comments
 (0)