Packet format
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":"12.389","speed":"0.000000"}]}
The array can 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"},
{"devid":"861657072373444","time":"2024-07-20 11:50:03","etype":"REBOOT","lat":"16.5","lon":"28.0","vbat":"12.389","speed":"0.000000"},
{"devid":"861657072373444","time":"2024-07-20 11:51:03","etype":"REBOOT","lat":"16.5","lon":"28.0","vbat":"12.389","speed":"0.000000"}]}
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