Page 1 of 1
AI based Alerts - &JSON is empty
Posted: Thu May 06, 2021 1:56 pm
by PeteB
Hi All,
I'm trying to log the details associated with AI confirmed alerts to file in a comma separated format. Unfortunately, the new &JSON macro that should contain the raw DS output looks to be empty. (BI 5.4.4.5)
Alert Command: C:\Windows\System32\cmd.exe
Alert Parameters: /C "echo %c,&CAM,&TYPE,&MEMO,&JSON,Done 1>>d:/BlueIris/Scripts/alerts.txt
The output file contains entries like: 06/05/2021 14:46:16,deckcam,MOTION_A,person:88%,,Done
Anyone confirm or see what I am doing wrong ?
Thanks, Pete
Re: AI based Alerts - &JSON is empty
Posted: Thu May 06, 2021 8:50 pm
by cayossarian
Yeah, I tried &JSON in an alert/push and got nothing. I notified support and they indicated they would test it.
Re: AI based Alerts - &JSON is empty
Posted: Fri May 07, 2021 9:11 am
by mlisted
Yep, doesn't work. But %001 works. It uses the memo, which is set to the detected object anyway.
Re: AI based Alerts - &JSON is empty
Posted: Fri May 07, 2021 10:25 am
by PeteB
Thanks for confirming.
Re: AI based Alerts - &JSON is empty
Posted: Sat May 08, 2021 10:01 am
by PeteB
Fixed in 5.4.4.8
Re: AI based Alerts - &JSON is empty
Posted: Sat May 15, 2021 4:17 pm
by atreyu
PeteB wrote: ↑Thu May 06, 2021 1:56 pmI'm trying to log the details associated with AI confirmed alerts to file in a comma separated format.
Just curious, what are you trying to do with the log? I send the &MEMO to Home Assistant which logs it and bounces it back to a BI macro so it can be shown on an overlay.
Re: AI based Alerts - &JSON is empty
Posted: Sun May 16, 2021 11:21 am
by PeteB
atreyu wrote: ↑Sat May 15, 2021 4:17 pm
PeteB wrote: ↑Thu May 06, 2021 1:56 pmI'm trying to log the details associated with AI confirmed alerts to file in a comma separated format.
Just curious, what are you trying to do with the log? I send the &MEMO to Home Assistant which logs it and bounces it back to a BI macro so it can be shown on an overlay.
I am seeing DeepStack processing times vary from 60ms - 600ms (DS GPU version on i5-7500 with GT 1030). I was hoping that &JSON would provide a better way to capture processing time to try and understand the variation. Unfortunately, this is not one of the values provided so back to scrapping the log.
Re: AI based Alerts - &JSON is empty
Posted: Sun May 16, 2021 6:36 pm
by atreyu
Ah. You could massage the log in Excel and get the numbers. The truly determined could tweak a Power Query to automate the massaging.
Well you got me curious, so I massaged my logs. I filtered the Message for "DeepStack:*ms" and that should only get results. Copied that to a new table then extracted the time with a custom function. I was initially thinking I would run the function on the full list, but ended up with the filtered table copy. A pivot table later and I see which cameras take longer than others. Interesting!
Code: Select all
Public Function msExtract(strInput As String) As Integer
Dim aryInter As Variant
Dim strInter As String
Dim result As Integer
result = 0
If Left(strInput, 9) = "DeepStack" Then
If InStr(1, strInput, "Nothing Found") = 0 Then
aryInter = Split(strInput, " ")
strInter = aryInter(UBound(aryInter))
result = CInt(Left(strInter, Len(strInter) - 2))
End If
End If
msExtract = result
End Function