FlightAware Discussions

SetAlert not getting notifications

I was able to receive alerts through our webhook and I am able to receive test notifications, however starting yesterday we cannot get an alert to come through. We only want an alert for a specific flight and at this time, we only care when the aircraft reaches the gate, or if the flight is cancelled or diverted. Here is what I am passing in:

alert_id: 0
indent = ENY4049
origin = KDFW
destination : KMSY
date_start = 1609880100 (2:55PM CST)
date_end= 1609880100 (2:55PM CST)
channels = {16 e_diverted e_cancelled} {split_block_times 1}
enabled = true

alert_id: 0
Ident: ENY4194
origin = KCVG
destination : KDFW
date_start = 1609867200 (12:20AM EST)
date_end= 1609867200 (12:20AM EST)
channels = {16 e_diverted e_cancelled} {split_block_times 1}
enabled = true

When I do a GetAlerts call, I get the alert information and I see the date_start/date_end are the same for both alerts and set to 12:00AM GMT, however since they do not match what I passed in, Im not sure if that is some kind of error or the times are set as default. However, there was an earlier flight with the same number #4194, and we only wanted the second one.

{“GetAlertsResult”:{“num_alerts”:2,“alerts”:[{“alert_id”:38043714,“enabled”:true,“description”:“Envoy Air 4049 (KDFW → KMSY)”,“type”:“Form_Airline”,“ident”:“ENY4049”,“user_ident”:"",“aircrafttype”:"",“origin”:“KDFW”,“destination”:“KMSY”,“date_start”:1609804800,“date_end”:1609804800,“channels”:[{“channel_id”:-1,“channel_name”:“split_block_times”},{“channel_id”:16,“channel_name”:“FlightXML push”,“mask_summary”:"",“e_filed”:false,“e_departure”:false,“e_arrival”:false,“e_diverted”:true,“e_cancelled”:true,“target_address”:""}],“alert_created”:1609866100,“alert_changed”:1609866100},{“alert_id”:38043713,“enabled”:true,“description”:“Envoy Air 4194 (KCVG → KDFW)”,“type”:“Form_Airline”,“ident”:“ENY4194”,“user_ident”:"",“aircrafttype”:"",“origin”:“KCVG”,“destination”:“KDFW”,“date_start”:1609804800,“date_end”:1609804800,“channels”:[{“channel_id”:-1,“channel_name”:“split_block_times”},{“channel_id”:16,“channel_name”:“FlightXML push”,“mask_summary”:"",“e_filed”:false,“e_departure”:false,“e_arrival”:false,“e_diverted”:true,“e_cancelled”:true,“target_address”:""}],“alert_created”:1609866100,“alert_changed”:1609866100}]}}

Am I doing this correctly, are the epoch values incorrect due to timezone differences. This function is very intermittent which I suspect the problem being due to the way I am calling the method. I looked through the discussions as much as I could to get to this point, but when I am seeing intermittent errors its time to ask.

Any help on these issues would be greatly appreciated.

When configuring alert start and end times the value will be rounded to the whole day. This day should represent the same day as the departure airport’s local time.

Generally setting a date_start and date_end at the same time isn’t advisable. If you are setting the alert shortly before departure just setting only the date_end is enough.

Another method, if you already have the faFlightID from a method like FlightInfoEx, is to set the alert with the faFlightID as the ident value. None of the other location or time filters would need to be set since the alert would only work for that faFlightID. This can guarantee a single alert will only trigger for a single flight