how to insert position to database via url or api

iotologist8 years ago

I needed this one since our GPRS in our area is not reliable, the only reliable is through SMS. I have an SMS server that receives location from the devices, then I have to post this location to the traccar server database via url or api, but I don't know how.

Please help :(

Anton Tananaev8 years ago

OsmAnd protocol would be the best option:

https://www.traccar.org/osmand/

iotologist8 years ago

I tried it on my site, but nothing happens.

http://52.221.252.197:5055/?id=test1212&lat=9.6729&lon=123.8730

Anton Tananaev8 years ago

Probably because you haven't registered your device on the server.

iotologist8 years ago

Oh yes, you're right Anton, I forgot the device identifier. Thank you Anton, as always you're amazing.

deathscythe7 years ago

Hi Anton, can I send via api using this port: 5133? My gps have tc56 protocol

Anton Tananaev7 years ago

@deathscythe, sorry, but I don't understand your question. How is API related to the device communication port?

deathscythe7 years ago

What I mean is our GPS is TC56, it could send SMS to our gateway however I'm not sure on how to update it in traccar.

Anton Tananaev7 years ago

How is your question related to the topic? Traccar only supports GPRS location updates at the moment.

deathscythe7 years ago

Here is a simple diagram of the process I want to achieve:

--------------     ------------         ---------------      ----------------------------
| GPS DEVICE |---->| SEND SMS | ------> | SMS GATEWAY | ---> | GATEWAY SERVER ACCESS API|
--------------     ------------         ---------------      ----------------------------

Will this be possible?

Anton Tananaev7 years ago

As long as you can push data to Traccar through a network connection, it should be possible to support it.

deathscythe7 years ago

Great, could you paste the link for the API docs to push gps coordinates, sensors information?

Anton Tananaev7 years ago

It's not API. To push data you can use any of the supported protocols:

https://www.traccar.org/protocols/

There is also HTTP protocol mentioned above.