Heartbeat and data sending do not work if the app is in the background

Madhav last month

so what will be the solution if we remove the application from background, we want that app will run on background

Anton Tananaev last month

If you kill the application, there's no solution.

panhard 20 days ago

I’d like to ask about the period when the application uploaded data using HTTP POST in JSON format. Later, you switched back to HTTP GET uploads. What was the reason for this? Is JSON unreliable?

Anton Tananaev 20 days ago

It is simpler format. And it was the original format, so we brought it back. JSON was forced on us by external dependency that we now eliminated.

panhard 20 days ago

I see. I asked because I also use the HTTP GET method on my server; I’m considering the JSON format, though, because it would be easier for me when uploading larger amounts of data—for example, from a buffer. Thanks!

Anton Tananaev 20 days ago

Why would it be easier?

panhard 19 days ago

I use these devices in cars; the hardware consists of ESP32, Neo-M8N, and Quectel LC29H components. Currently, I upload about 10 parameters simultaneously every 5 seconds: date, time, lat, lng, alt, speed, moon, HDOP, signal, and battery. If there is no internet coverage for some reason and the data cannot be uploaded, the device can store up to 3 hours' worth of data. However, it subsequently uploads the data in batches of five, because uploading more at once would make the URL too long—something the connection cannot always handle. I don't think there would be such a limitation if using HTTP POST with JSON.

panhard 19 days ago

How is the upload from the buffer handled in the Traccar client? It uploads the items one by one, right?

Anton Tananaev 19 days ago

It uploads one by one either way. That's why I don't really understand the point. If anything form upload is shorter, so upload should be faster and use less traffic.

panhard 19 days ago

I listed the hardware incorrectly. I used to use a NEO M8N GPS receiver and an AI Thinker A6 modem. Now, I use a Quectel LC29H GPS receiver and an Air780E 4G modem with an ESP32.

panhard 19 days ago

However, if I upload the data from a buffer, I could transmit much more data in a single upload; the URL length wouldn't be a limiting factor. Admittedly, when I first noticed this limitation (back in 2018), I was using a 2G modem, whereas now I use a 4G modem. Still, I’ll test both methods in a live environment.

Anton Tananaev 19 days ago

Traccar doesn't accept multiple locations in a single upload, so I have no idea what you're talking about.

panhard 19 days ago

This is what it looks like for me when it pushes one up:

http://serveraddress.hu/gps_upload_id.php?&00=105&01=20260907&02=152642&03=4723.489552&04=01726.264398&05=0&06=119&07=0.76&08=0.47&09=0.60&010=67&011=0.00&012=0.00&013=13.68&014=9&015=8&016=6&017=12&018=0&019=104&020=0&021=42&022=40&023=148.33&024=7&025="21630"&drb=1

And if he uploads 5:

http://serveraddress.hu/gps_upload_id.php?&00=106&01=20260907&02=152742&03=4723.490224&04=01726.264848&05=0&06=118&07=0.74&08=0.45&09=0.59&010=67&011=0.00&012=0.00&013=13.12&014=10&015=8&016=6&017=12&018=0&019=105&020=0&021=43&022=40&023=148.33&024=7&025="21630"&10=107&11=20260907&12=152752&13=4745.488850&14=01725.267776&15=13&16=118&17=0.68&18=0.45&19=0.51&110=70&111=0.00&112=0.00&113=12.85&114=10&115=8&116=6&117=12&118=0&119=106&120=1&121=44&122=40&123=119.29&124=7&125="21630"&20=108&21=20260907&22=152757&23=4745.475752&24=01725.292136&25=35&26=119&27=0.74&28=0.45&29=0.59&210=70&211=0.00&212=0.00&213=12.85&214=10&215=8&216=6&217=12&218=0&219=106&220=1&221=44&222=40&223=130.83&224=7&225="21630"&30=109&31=20260907&32=152802&33=4745.452334&34=01725.332492&35=59&36=119&37=0.74&38=0.45&39=0.59&310=70&311=0.00&312=0.00&313=12.74&314=10&315=8&316=6&317=12&318=0&319=106&320=1&321=44&322=40&323=132.94&324=7&325="21630"&40=110&41=20260907&42=152807&43=4745.419268&44=01725.383954&45=62&46=118&47=0.76&48=0.46&49=0.60&410=70&411=0.00&412=0.00&413=12.70&414=10&415=8&416=6&417=11&418=0&419=106&420=1&421=44&422=40&423=135.40&424=7&425="21630"&drb=5

That brings it to 1,155 characters. It's too many, but it still works.

Anton Tananaev 19 days ago

What Traccar product are you talking about? It seems like you're not using server or the client.

panhard 19 days ago

No. This is my own server and hardware.