@@ -1118,6 +1118,8 @@ private static function eventAdd($event, $eqLogicId)
11181118 $ boxArray = json_decode ($ box , true );
11191119 }
11201120
1121+ $ data = json_decode ($ event ->getData (), true );
1122+
11211123 $ result = array (
11221124 "id " => $ event ->getId (),
11231125 "img " => $ event ->getLasted (),
@@ -1138,7 +1140,8 @@ private static function eventAdd($event, $eqLogicId)
11381140 "top_score " => $ event ->getTopScore (),
11391141 "type " => $ event ->getType (),
11401142 "isFavorite " => $ event ->getIsFavorite () ?? 0 ,
1141- "zones " => $ event ->getZones () ?? ''
1143+ "zones " => $ event ->getZones () ?? '' ,
1144+ "description " => $ data ['description ' ] ?? ''
11421145 );
11431146
11441147
@@ -1518,7 +1521,8 @@ public static function showEvents()
15181521 foreach ($ events as $ event ) {
15191522 $ date = date ("d-m-Y H:i:s " , $ event ->getStartTime ());
15201523 $ duree = round ($ event ->getEndTime () - $ event ->getStartTime (), 0 );
1521-
1524+ $ data = json_decode ($ event ->getData (), true );
1525+
15221526 $ result [] = array (
15231527 "id " => $ event ->getId (),
15241528 "img " => $ event ->getLasted (),
@@ -1539,7 +1543,8 @@ public static function showEvents()
15391543 "top_score " => $ event ->getTopScore (),
15401544 "type " => $ event ->getType (),
15411545 "isFavorite " => $ event ->getIsFavorite () ?? 0 ,
1542- "zones " => $ event ->getZones () ?? ''
1546+ "zones " => $ event ->getZones () ?? '' ,
1547+ "description " => $ data ['description ' ] ?? ''
15431548 );
15441549 }
15451550
@@ -2400,6 +2405,7 @@ private static function executeActionNewEvent($eqLogicId, $event)
24002405 $ camera = $ event ->getCamera ();
24012406 $ cameraId = eqLogic::byLogicalId ("eqFrigateCamera_ " . $ camera , "frigate " )->getId ();
24022407 $ label = $ event ->getLabel ();
2408+ $ description = $ event ->getData ();
24032409 $ zones = $ event ->getZones ();
24042410 $ score = $ event ->getScore ();
24052411 $ type = $ event ->getType ();
@@ -2460,7 +2466,7 @@ private static function executeActionNewEvent($eqLogicId, $event)
24602466 // vérifier si la condition de l'action est remplie
24612467 $ actionConditionIsActived = true ;
24622468 $ actionCondition = $ action ['actionCondition ' ];
2463- if ($ actionCondition != "" && ! jeedom::evaluateExpression ($ actionCondition )) {
2469+ if ($ actionCondition != "" && jeedom::evaluateExpression ($ actionCondition )) {
24642470 $ actionConditionIsActived = false ;
24652471 }
24662472 log::add ("frigate_Actions " , 'info ' , "║ Condition de l'action : " . $ actionCondition . ", etat : " . json_encode ($ actionConditionIsActived ));
@@ -2523,8 +2529,8 @@ private static function executeActionNewEvent($eqLogicId, $event)
25232529 }
25242530
25252531 $ options = str_replace (
2526- ['#time# ' , '#event_id# ' , '#camera# ' , '#cameraId# ' , '#score# ' , '#has_clip# ' , '#has_snapshot# ' , '#top_score# ' , '#zones# ' , '#snapshot# ' , '#snapshot_path# ' , '#clip# ' , '#clip_path# ' , '#thumbnail# ' , '#thumbnail_path# ' , '#label# ' , '#start# ' , '#end# ' , '#duree# ' , '#type# ' , '#jeemate# ' , '#preview# ' , '#preview_path# ' ],
2527- [$ time , $ eventId , $ camera , $ cameraId , $ score , $ hasClip , $ hasSnapshot , $ topScore , $ zones , $ snapshot , $ snapshotPath , $ clip , $ clipPath , $ thumbnail , $ thumbnailPath , $ label , $ start , $ end , $ duree , $ type , $ jeemate , $ preview , $ previewPath ],
2532+ ['#time# ' , '#event_id# ' , '#camera# ' , '#cameraId# ' , '#score# ' , '#has_clip# ' , '#has_snapshot# ' , '#top_score# ' , '#zones# ' , '#snapshot# ' , '#snapshot_path# ' , '#clip# ' , '#clip_path# ' , '#thumbnail# ' , '#thumbnail_path# ' , '#label# ' , '#description# ' , ' # start# ' , '#end# ' , '#duree# ' , '#type# ' , '#jeemate# ' , '#preview# ' , '#preview_path# ' ],
2533+ [$ time , $ eventId , $ camera , $ cameraId , $ score , $ hasClip , $ hasSnapshot , $ topScore , $ zones , $ snapshot , $ snapshotPath , $ clip , $ clipPath , $ thumbnail , $ thumbnailPath , $ label , $ description , $ start , $ end , $ duree , $ type , $ jeemate , $ preview , $ previewPath ],
25282534 $ options
25292535 );
25302536
@@ -3573,4 +3579,4 @@ private function toggleCameraSetting($frigate, $camera, $infoCmd, $setCmd)
35733579 }
35743580
35753581 /* * **********************Getteur Setteur*************************** */
3576- }
3582+ }
0 commit comments