Traccar.org (GPS/GPRS Tracker) custom platform

still same error :

17-04-18 16:18:45 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform traccar
Traceback (most recent call last):
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 159, in async_setup_platform
disc_info)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self  # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/hass/.homeassistant/custom_components/device_tracker/traccar.py", line 28, in setup_scanner
TraccarDeviceScanner(hass, config, see)
File "/home/hass/.homeassistant/custom_components/device_tracker/traccar.py", line 41, in __init__
self._update_info()
File "/home/hass/.homeassistant/custom_components/device_tracker/traccar.py", line 49, in _update_info
self._device_data = json.loads(self._devices.text)
File "/usr/lib/python3.4/json/__init__.py", line 318, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.4/json/decoder.py", line 343, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.4/json/decoder.py", line 361, in raw_decode
raise ValueError(errmsg("Expecting value", s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)

thank you for trying :slight_smile:

i rebooted my machine and traccar device tracker stopped working which got me thinking :wink:

the user that you use in the device tracker must be a administrator in the traccar platform…
Do you use the admin user for the device tracker?
or is your user an admin?

Good point ! i just saw that username and password was totally wrong! Will correct my credentials and restart hass.

I now use the admin account. the standard :stuck_out_tongue:

We are agree that i use the webinterface port instead of app port right?

SO! now i insert my admin credentials … no ererors occur… will check for device :slight_smile:

SEEMS to work jihaaaa… Just status wont work… thats because we commented out those two lines ?

There’s just one thing… it creates a device in known devices like #‘1’#

could you try the latest version from my github?
it should just be one device in HASS per device in traccar.
i.e. device_tracker.1

there is only one device yes … what did uchange ? don wanna break things :stuck_out_tongue:

I only added the encoding as first line.

Yeah already saw this :wink:

Hi guys, is this component working as expected and will be available from official hass components ?
I am using API for fetching gps coordinates from traccar and showing it as google maps card, but I would like show position on map as other devices.
thanks

Hi.
For me its still working fine.
No plans on making it official hoewever. I lack the knowledge. My programming skills are basic

Download from github and drop the plugin in a custom components folder.

How much data does this use I want to get a cheap sim but need to know what stuff I should get for it, large data or large sms pack?
Thanks

@koen01 Your original link to AliExpress doesn’t work anymore but is it one of these.

If so what do you have to do to modify it to point at a different service, the one I linked to appears to be setup to work with TrackerHome. I would prefer to log to my own servers which I already do for my mobile.

Im not sure about how much data it uses. Depends on the tracker and update frequency I think.
500mb per month? I have no option to monitor the data use of my sim

Traccar forums is a good place to start. You normally config the tracker via sms command. The commands differ per type/protocol.

Does this work with hass.io, as I cannot get the custom_componets directory recognized.

2017-08-10 22:46:13 ERROR (MainThread) [homeassistant.loader] Unable to find component device_tracker.traccar

i’m not familiar with hass.io

do you have a custom_components/device_tracker/ folder in your config folder?

Yes, I created it. Followed your example.
the:
traccar.py
is in this directory:
\HASSIO\config\custom_componets\device_tracker

And the device_tracker.yaml contains this:

  - platform: traccar
    username: *******@gmail.com
    password: **************
    host: http://demo4.traccar.org:5055