AI based Alerts - &JSON is empty

Post Reply
PeteB
Posts: 4
Joined: Sat Apr 17, 2021 2:21 pm

AI based Alerts - &JSON is empty

Post by PeteB » Thu May 06, 2021 1:56 pm

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
User avatar
cayossarian
Posts: 6
Joined: Sat Apr 03, 2021 6:08 pm

Re: AI based Alerts - &JSON is empty

Post by cayossarian » Thu May 06, 2021 8:50 pm

Yeah, I tried &JSON in an alert/push and got nothing. I notified support and they indicated they would test it.
mlisted
Posts: 10
Joined: Sat Nov 09, 2019 1:19 am

Re: AI based Alerts - &JSON is empty

Post by mlisted » Fri May 07, 2021 9:11 am

Yep, doesn't work. But %001 works. It uses the memo, which is set to the detected object anyway.
PeteB
Posts: 4
Joined: Sat Apr 17, 2021 2:21 pm

Re: AI based Alerts - &JSON is empty

Post by PeteB » Fri May 07, 2021 10:25 am

Thanks for confirming.
PeteB
Posts: 4
Joined: Sat Apr 17, 2021 2:21 pm

Re: AI based Alerts - &JSON is empty

Post by PeteB » Sat May 08, 2021 10:01 am

Fixed in 5.4.4.8
atreyu
Posts: 46
Joined: Fri Nov 27, 2020 7:22 pm

Re: AI based Alerts - &JSON is empty

Post by atreyu » 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.
PeteB
Posts: 4
Joined: Sat Apr 17, 2021 2:21 pm

Re: AI based Alerts - &JSON is empty

Post by PeteB » Sun May 16, 2021 11:21 am

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.
atreyu
Posts: 46
Joined: Fri Nov 27, 2020 7:22 pm

Re: AI based Alerts - &JSON is empty

Post by atreyu » Sun May 16, 2021 6:36 pm

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
Post Reply