Packet format
The data is sent to server in HTTP POST requests / MQTT publish messages.
This is the sample packet format that is sent from the device, its a JSON array, there will be multiple fields depending on the updates, you can disable or enable what you want in the code.
{"resource":[{"devid":"861657072373444","time":"2024-07-20 11:49:03","etype":"REBOOT","lat":"16.5","lon":"28.0","vbat":"3.725","speed":"0.000000,"nlat":""15.665236,"nlon":"13.56125","vmbat":"12.0","ncsq":"31,99","pInt":"60"}]}
The array can be a single object as above or have multiple objects like below
{"resource":[{"devid":"861657072373444","time":"2024-07-20 11:49:03","etype":"REBOOT","lat":"16.5","lon":"28.0","vbat":"12.389","speed":"0.000000","nlat":""15.665236,"nlon":"13.56125","vmbat":"12.0","ncsq":"31,99","pInt":"60"},
{"devid":"861657072373444","time":"2024-07-20 11:50:03","etype":"REBOOT","lat":"16.5","lon":"28.0","vbat":"12.389","speed":"0.000000","nlat":""15.665236,"nlon":"13.56125","vmbat":"12.0","ncsq":"31,99","pInt":"60"},
{"devid":"861657072373444","time":"2024-07-20 11:51:03","etype":"REBOOT","lat":"16.5","lon":"28.0","vbat":"12.389","speed":"0.000000","nlat":""15.665236,"nlon":"13.56125","vmbat":"12.0","ncsq":"31,99","pInt":"60"}]}
Acknowledgment : The device firmware expects an acknowledgement string "logid" by default, because thats what we use in our server. You can change it to whatever value you like. Its in XHTTP_Request function. For google scripts it expects response value as "Moved" . If it doesn't receive the acknowledgement text, it will keep repeating the packets.
Last updated