Home assistant not working with 5.1

Deborah 3 years ago

Hi,

I've tried to update to 5.1, but once the update is finished the official home assistant integration no longer receives data from traccar!
Is there a configuration to do or is it a bug?

Thanks

Anton Tananaev 3 years ago

Wait for 5.2. There are some known issues in 5.1.

Callifo 3 years ago

5.2 came out last night and I updated again, however I still get the same issue regarding the Geofence attribute being the wrong data type.

2022-07-18 21:24:53 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant_p3_10/lib/python3.10/site-packages/homeassistant/components/traccar/device_tracker.py", line 250, in _async_update
    await self._api.get_device_info(self._custom_attributes)
  File "/srv/homeassistant_p3_10/lib/python3.10/site-packages/pytraccar/api.py", line 117, in get_device_info
    geofence = self.geofences[dev["geofenceIds"][0]]
TypeError: 'NoneType' object is not subscriptable

Should this have been fixed in 5.2? Downgrading to 5.0 seems to fix it.

Anton Tananaev 3 years ago

Are you sure your device is in a geofence?

Callifo 3 years ago

No its not, I dont use Geofences.

Anton Tananaev 3 years ago

Then it seems like a bug in the Home Assistant.

Callifo 3 years ago

Its been introduced in 5.1/5.2 specifically, but I will go back to github and see what they say.

Anton Tananaev 3 years ago
Callifo 3 years ago

Ok, I'll bump my pytraccar version and see if that fixes it. Cheers

Callifo 3 years ago

That seems to have done it, much appreciated.

Deborah 3 years ago

Hi,

but what is pytraccar? I don't remember ever installing it.
Should it be installed on the traccar server or home assistant?

I also installed 5.2 but it still doesn't go

Anton Tananaev 3 years ago

It's probably a dependency of the home assistant package.

Deborah 3 years ago

I don't quite understand, I am using the official home assistant traccar integration (https://www.home-assistant.io/integrations/traccar/)
For the time being I am staying on 5.0 until that one is updated.
Thank you

Anton Tananaev 3 years ago