Traccar.org (GPS/GPRS Tracker) custom platform

try without https:// but with http:// in the traccar server url in the configuration.yaml

does your manual say something about continous; tracking via gprs? or something like GPRS mode on/off ?
Normally these this have to be set once to gprs reporting instead of sms reporting.
see for example chapter 6.9 from this tracker manual (the one i use):
https://www.obd2-shop.eu/files/gps306a_b-user%20manual.pdf

Do you have any device added in the traccar server? Iā€™m guessing the components crashes because there are no results returned or the results returned donā€™t contain the values its looking for. (there is no error checking on this component).

If someone with more python skills than me feels inclinded to add this , feel free to do so :slight_smile:

It looks like I setup the gprs correct (no need to change this once the DNS is accepted).
image

However, I canā€™t get any device added in the Traccar server, I tried both using my IMEI and the version with 11 characters and a zero

Canā€™t get it to work and itā€™s driving me crazy.
It is reporting itā€™s position fine:

Obviously Iā€™m doing something wrong. Can someone sum up all the neccessary steps?

First set up traccar:

  • Are the ports for traccar open/forwarded on your modem/router/rpi? Are they accessible from outside your network?

  • Are you using the correct portnumber for traccar? Check protocol / port number combination for your device. I see you are using port 5002? my devices works only with port 5001 and it seems to use the same command syntax as yoursā€¦maybe try 5001 instead of 5002?

  • What does the traccar server log say? Itā€™s in /opt/traccar/logs/
    it should say something like this if your device is not configured yet in traccar, if you are not seeing anything your port config is wrong or ip/gateway settings on the obd tracker.

    2017-10-06 21:54:53 DEBUG: [78151A2E: 5001 < xx.xx.xx.xx] HEX: 696d65693a3836383638333032373834383335312c747261636b65722c2c2c4c2c2c2c302c2c302c2c2c2c2c302c2c2c2c3b
    2017-10-06 21:54:53 WARN: Unknown device - 868683027848351 (xx.xx.xx.xx)

  • add a device to traccar using the , in the above example, ā€œ868683027848351ā€ as identifier.

Setup home-assistant:

add this to your configuration.yaml and restart home-assistant

device_tracker:
  - platform: traccar
    username: your admin username
    password: your admin password
    host: http://ip:portnumber 

note its http not https

@koen01 thanks for your instructions. It looks like the problem starts with the communication from my device to Traccar servers. Canā€™t get it online in the demo servers. I have to figure that out first.

Ok. Check your portnumber on the GPS tracker config.
Try 5001 instead of 5002

image
Still nothing:
image

My phone is reporting OK via the client app with port 5055 (and yes, I also tried that port for my tracker but doesnā€™t do anyting).

P.S. I also tried without the ā€œhttp://ā€

What does check+password say?
I assume this is the correct sms command for your tracker.

Are you able to see the traccar logs? Maybe ask at the traccar forums about configuring your device.

image

Looks like it does need a username and password.

I canā€™t access the logs because Iā€™m using the demo server.

I have username and password die apn set to Vodafone.

Update: Iā€™ve made some progress.

I finally got Traccar running on my Pi after installing version 3.8.
I donā€™t have any errors in my log now using:

  - platform: traccar
    username: <redacted>@gmail.com
    password: <redacted>
    host: http://<redacted>.duckdns.org:5002

I can access the running instance from my browser, however I get prompted with a login screen:
image

Can this be the reason why my device canā€™t report its data to the server?

Vodafone APN username and password are set.

HEX in my log translate to the following:

GET / HTTP/1.1
Host: 10.0.0.20:5002
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-US,nl-NL;q=0.8,nl;q=0.6,en;q=0.4

I did not know those things existed.

The link is not working, is this below similar? Where will they get the power from? Will they send only GPS data or which other sort of data?

https://www.amazon.it/Autool-TK206OBD-Localizzatore-geo-fence-dispositivo/dp/B01ID3A0QY/ref=sr_1_1?ie=UTF8&qid=1507463812&sr=8-1&keywords=obdii+gps

Looks like the exact same thing as mine from the outside:

Power is drawn directly from OBD2 port. I donā€™t know which data is send, thatā€™s exactly the part where Iā€™m struggling with :frowning: .

first:
Correct the configuration.yaml so that the component uses the traccar web port (not the port the tracker uses to report to). This is 8082 by default.
Default username + password for traccar server is admin/admin

tracking devices do not need username/password for reporting.

I forwarded external port 5002 to internal port 8082 (to my Raspberry). Web GUI shows up when browsing to port 5002.
username admin and password admin donā€™t make any difference.

from what I red there are 2 types:

  • the one with gps tracking
  • the one which reads disgnostic data

DOesā€™t seem exist one that gives the two types of data in one single device ā€¦

you are doing it wrong.
8082 is for you to login via browser
5001 / 5002 is for the tracker to report to.
you need both ports forwarded to the same port on the rpi.

ā€¦