Loc-enhanced event webhook ~ 50% success/failure rate

My webhook integration is failing roughly 50% of the time and I don’t quite understand why. Hoping someone can see the issue.

I am using a Tracker One with close to default firmware.

The loc-enhanced event is triggering the webhook in this format:
location,equipment={{{PARTICLE_DEVICE_ID}}} lat={{{loc.lat}}},lon={{{loc.lon}}},alt={{{loc.alt}}},temp={{{loc.temp}}} {{{loc.time}}}

When looking at the logs, i noticed loc-enhanced reports in two different formats. It seems the data is different depending on the value of “lck”.

The integration works when the “lck” value is 1 and has the longer data string, but doesn’t work when it is 0 with the shorter data string. Why would this be?

“data”: “{"cmd":"loc","time":1669052942,"loc":{"lck":0,"cell":60,"batt":96.5,"temp":23.2,"time":1669052942,"lat":48.044313,"lon":-71.460554,"h_acc":32},"trig":["imu_m"],"req_id":370,"v":2,"src":["cell","wifi"]}”,

“data”: “{"cmd":"loc","time":1669055203,"loc":{"lck":1,"time":1669055203,"lat":48.044324,"lon":-71.460564,"alt":162.3,"hd":0,"spd":0.06,"h_acc":12,"hdop":10.8,"v_acc":10000000,"vdop":16.6,"cell":60,"batt":96.5,"temp":23},"trig":["lock"],"req_id":372,"v":2,"src":["cell","wifi"]}”,

Do you mean that the integration isn’t firing, or your server is not responding as expected?

One thing is that when location fusion is used (“lck”:0), the altitude (“alt”) is not available so {{loc.alt}} will return an empty string, which could cause confusion especially if you are expecting a number or generating JSON.