I’m having an issue with a Web.Get Route. I am using a separate GPS module so that I may keep a continuous cellular connection and log location quickly when necessary. The location data coming from the separate GPS module is correct.
My problem is that when data is logged to _web.qo from the Web.Get Route, the location data in the JSON is incorrect. The location in the body is correct because it is coming from the GPS module. It is almost as if it is seeing the last GPS location from the notecard gps that I used before switching to the separate module (just a wild guess).
I’m probably not doing this correctly, but……here is the Web.Get Route info…..
Here is the URL (removed the HTTPS:// to keep it from making it a link:
I have the body nested inside the body is because [.body.xxxx] was returning a null string, so I threw everything at the wall to see what would stick…and this worked (different issue, possibly).
“ny3.blynk.cloud/external/api/logEvent?token=[token]&code=vehicle_motion&description=[.body.body.vehicle]%20is%20[.body.body.motion]%0D%0ATracking%20Enabled:%20[.body.body.tracking_enabled]%0D%0A%0D%0A[.body.body.local_time]%20Location:%0D%0A[.body.body.location_url]“
And the JSONata:
{“body”:
{"local_time": $fromMillis(body.time*1000, '[Y0001]-[M01]-[D01] [h#1]:[m01]:[s01][P] [z]', body.tz_offset),
"vehicle": body.vehicle_name,
"location_url": "https://www.latlong.net/c/?lat=" & $string(body.latitude) & "&long=" & $string(body.longitude),
"motion": body.motion,
"tracking_enabled": body.tracking_enabled ? "Yes" : "No"
}
}
body.latitude, body.longitude, body.time, body.tz_offset, body.tracking_enabled are pulled from the original note created.
Here is the JSON in the _web.qo file:
{
“event”: “020ad850-82e5-4b18-a80d-xxxxxxxx”,
“when”: 1754249958,
“file”: “_web.qo”,
“body”: {
“body”: {
“local_time”: “2025-08-03 2:39:12pm GMT-05:00”,
“location_url”: “https://www.latlong.net/c/?lat=xx.0062&long=-yy.127”,
“motion”: “Stopped”,
“tracking_enabled”: “No”,
“vehicle”: “[name]”
}
},
“session”: “efa14688-dc49-4861-9eb3-xxxx”,
“best_id”: “dev:xxxx”,
“device”: “dev:xxxx”,
“product”: “product:com.xxx.xxxxx”,
“app”: “app:0de33366-45c4-40b5-b375-xxxx”,
“received”: 1754249969.282741,
“req”: “web.get”,
“best_location_type”: “triangulated”,
“best_location_when”: 1754179207,
“best_lat”: xx.915152,
“best_lon”: -yy.062451,
“best_location”: “city state”,
“best_country”: “US”,
“best_timezone”: “America/Chicago”,
“tower_when”: 1754182905,
“tower_lat”: xx.915892,
“tower_lon”: -yy.06781,
“tower_country”: “US”,
“tower_location”: “city state”,
“tower_timezone”: “America/Chicago”,
“tower_id”: “310,410,14976,461xxxxxxxxx”,
“tri_when”: 1754179207,
“tri_lat”: xx915152,
“tri_lon”: -yy.062451,
“tri_location”: “city state”,
“tri_country”: “US”,
“tri_timezone”: “America/Chicago”,
“tri_points”: 7,
“status”: “success”,
“fleets”: [
“fleet:27ac1d7c-4cd9-4bc6-b890-xxxxxxxx”
]
}
Thanks,
Joe