Hi to all.
I think what i am trying is something new, 'cause a have no seen nothing here to help me.
I’m Phd. Transportation Student from The University of Puerto Rico.
We are working i a project to locate Buses using cellphones. We want to get the location of a cell phone that has a client service that transmit several attributes (like geographic location) to a server.
I started to test the programs that store and transmit the location.
First, i have downloaded the client in my cellphone. The program i have use is called Traccar.
Once installed, i run the app, and it gives a cell a unique id. Device Identifier
I have to specifies the server address. The address is shown in the next figure.
And then, start the services.
After the installation in my cellphone, i go to the server address: demo.traccar.org, and introduce my credentials
Once done, the webb loads, and i can see the location of my phone.
And the geographic coordinates (latitude, longitude) of my device
The question is, How can i get the latitude, longitude, speed, time-stamp or other information, using the Get Service Node ?
i have followed the basics of " Sending a GET Request to a REST service" that is in this link:
The address of the server:
My credentials:
But all i can get is this output, without the information that i need.
I have read in that link : Api Call Get/Put Python - Traccar , that the folowing code works in Python3.:
import json
import requests
###Settings####
TCurl = '' #Server address of traccar system i.e. 'http://demo.traccar.org'
TCportR = '' #port for traccar system usually ':8082'
Traccar_user = '' #User for traccar (user needs to have access to group in where devices are located)
Traccar_password = '' #Traccar User password
headers = {'Content-type': 'application/json', 'Accept': 'application/json'}
data={
'id':None,
'name':'RWS 20',
'uniqueId':'SEA-244690995',
'lastUpdate':None,
'positionId':'',
'groupId':15,
'attributes':{},
'phone':'',
'model':'',
'contact':'',
'category':'boat',
'disabled':False,
'status':None
}
response = requests.post(TCurl + TCportR + '/api/devices', auth=(Traccar_user, Traccar_password), headers=headers, data=json.dumps(data))
print (response.content)
print (response.status_code)
I have trying to use it in the Python source node, but with no luck.
Please, somebody help me in that.