Help with code for mailbox

Hi all. I just recently purchased a Veralite in order to accomplish a very easy function with my Blue Iris software and need some help optimizing the luup code. Technically I have a wireless sensor in my mailbox that triggers a scene when it’s opened and allows me to call a preset for my PTZ surveillance camera and trigger such camera in Blue Iris to record. The scene works, but the problem I’m having is that if the mailbox is opened and closed more than once the scene triggers are queueing? in the Veralite and activating the preset for whatever number of times the mailbox was opened. How can I add the ability to let’s say, if the mailbox is opened, not to retrigger for X amount of time? Is there an easier way to go about it? I think this can’t be too difficult to accomplish, I just don’t have any programming experience to help me fix this issue. Any help will be greatly appreciated.

This is my current code in Veralite (UI7):

luup.inet.wget(“http://[id]:[pw]@[ip]:[port]/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=2&arg3=0”,5)
luup.inet.wget(“http://[ip]:[port]/admin?camera=PTZ&trigger”,5)
luup.call_timer(“PTZ_BI_rec_retrigger”, 1, “13”, “”, “”)
function PTZ_BI_rec_retrigger()
luup.inet.wget(“http://[ip]:[port]/admin?camera=PTZ&trigger”,5)
end

Was wondering if anything ever happened with this.

there is a variable in the advanced tab for your triggering device, IgnoreTripTime, set this variable to be the amount of time you would not like notifications for after the first trip. I set mine for 2 minutes.

Do you know what metric the value in that field is? I’m assuming seconds. Default was set to 2.

yes, it’s in seconds