Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action trigger URLs -> programming a delay after sending each one of them to BI #266

Open
balqosz opened this issue Jul 22, 2021 · 4 comments

Comments

@balqosz
Copy link

balqosz commented Jul 22, 2021

Hi VorlonCD!

Is it possible to add a small delay between sending urls to BI?
I'm having problems sending trigger and flagalert=2 commands. If sending them through AITool, BI doesn't mark the alert, it remains without confirmation, until a new alert is sent to BI again... but then again, this new alert keeps without confirmation until a new alert is received... and so on. So the first alert in the list is always without confirmation (not showing it at least until the next alert)

So I tried a simple batch file (.bat) as external program from AItool, and it is working as expected, it flags the alert inmediatly. I show you the batch file content below:

"C:\Program Files (x86)\cURL\bin\curl.exe" "http://127.0.0.1:9955/admin?trigger&camera=mycam&user=####&pw=####"
timeout /t 1
"C:\Program Files (x86)\cURL\bin\curl.exe" "http://127.0.0.1:9955/admin?flagalert=2&camera=mycam&user=#####&pw=####"

As you see, there is a "1 second timeout" between commands. It works. The alert is being flagged almost instantly. Maybe a smaller value works too, perhaps 200ms, I don't know.

Or maybe there is a hidden setting in json file to try?

Thank you!

@balqosz balqosz changed the title Action trigger URLs Action trigger URLs -> programming a delay after sending each one of them to BI Jul 22, 2021
@balqosz balqosz closed this as completed Jul 22, 2021
@balqosz balqosz reopened this Jul 22, 2021
@johnseybert
Copy link

I see this behavior as well and wasn't sure what was going on or how to duplicate it to troubleshoot. Seemed random at times. Good to know you were able to track it down!

@VorlonCD
Copy link
Owner

So flagalert=2 and trigger both in the same URL doesnt work? What is 2 vs 1? why use 2?

@balqosz
Copy link
Author

balqosz commented Jul 22, 2021

I was using all in one url, but I was having problems so began to investigate why it was happening.
I saw the same behaviour when sending the url through the web browser. But then, I tried separated urls in the web browser, and it worked. Then the final step was that a small delay was needed, because sending the all-in-one url in two steps without a delay, had the same behaviour as sending one url.

(one url) http://127.0.0.1/....&trigger&flagalert=2 ===? FAIL

(two urls) http://127.0.0.1/....&trigger and then http://127.0.0.1/...&flagalert=2 ===> FAIL

(two urls + delay) http://127.0.0.1/....&trigger / 1 sec delay / and then http://127.0.0.1/...&flagalert=2 ===> OK

Maybe a BI bug?

@aesterling
Copy link

aesterling commented Aug 25, 2021

I read the info below on page 214 of the Blue Iris help file PDF. Do we know if these commands have changed in a recent release? Or is that unrelated to this problem?

x = 0 mark the most recent alert as canceled (if not previously confirmed).
x = 1 mark the most recent alert as flagged.
x = 2 mark the most recent alert as confirmed.
x = 3 mark the most recent alert as flagged and confirmed.
x = -1 reset the flagged, confirmed, and cancelled states

VorlonCD added a commit that referenced this issue Nov 14, 2021
…to 500ms and will be a delay that will be applied between most actions, even individual trigger URL calls. @balqosz  #266

- Allow for reading BlueIris lat/long settings when the stored number uses a comma rather than period (some non-US countries)  Thanks @johngianni !
- Recompile in Visual Studio 2022, .NET 4.8, and update NuGet packages
- Version on startup now detects Win11.
- Try to prevent telegram Could not create SSL/TLS secure channel exception on Win7.  @xanthos84  #267
- All AITOOL temp files now go to %TEMP%\_AITOOL rather than directly in the temp folder.   This temp folder will be cleaned out on startup of AITOOL.   @balucanb #287
- Added GUI option for how old the files in "Alert images folder" can get before they are removed.  This defaults to 30 days and is now checked every hour, just before a new file is copied in.  @42ism  #260
- Show warning when INPUT PATH is the same as 'Copy alert images to folder' path in actions.   This has caused a number of issues in the past.  @balucanb #287
- In History tab > settings, added 'Merge Duplicate Predictions'.   It defaults to merging them, but you may want to turn it off as seen in this:  #251
- Added ability in the Deepstack tab (deepstack for windows only) to run each custom model with a specific MODE.
- Pushover:   [This needs testing!!]   In actions, you can now send messages at different priorities based on the time of day.    So if PRIORITY was set to 'Normal | Emergency' and TIME was set to 'Dawn-Dusk | Dusk-Dawn' then only emergency priority would be used at night.    All fields can have more than one item separated by a PIPE symbol and it is best, although not required if all fields have an equal number of items.  If they DONT, it will default to the FIRST item in each field.  @162884  #254
- Action to activate/maximize the BI window.  It will maximize the BI window IF it is installed on the same machine AITOOL is running on.   I put this feature in because the BI per-camera feature Trigger > 'Restore/focus app window' restores focus for ANY movement, not just when AITOOL triggers.
- Hero:  https://theoatmeal.com/comics/hero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants