External Trigger

I am using BlueIris for my security system and it has the ability to call a script upon a trigger. What im looking to do is setup a zone on the camera for my walkway so that when someone goes up the walkway it turns on the front light for 5 min.

Im still really new to all of this so forgive me.

There are two main questions i have for this

  1. is there a way to use curl to turn a light on? most of the API docs i’ve come across are specific to smartapps, which seems a tad overkill considering i just want to toggle a light switch.
  2. is there a way to have the 5min shutoff only for when its triggered via the script (Without having the script sleep for 5 min and then shut it off)