ReneNulschDE / mbapi2020

Custom Component to integrate MercedesME devices into Home-Assistant
Other
157 stars 30 forks source link

Device Tracker no longer showing correctly #222

Closed jimmyfitz closed 5 months ago

jimmyfitz commented 5 months ago

The problem

In the last 2 updates (can't find the page to check version) my car's device_tracker stopped working. This has two impacts, the car Location no longer shows up on my HA map, and the Places sensor based on the car device_tracker is unknown.

What version of MBAPI2020 do use?

v0.13.0

What was the last working version of MBAPI2020?

v0.12.

What type of installation are you running?

Home Assistant OS

Diagnostics information

config_entry-mbapi2020-7086a365c1f5ed8be1b4c4865dab4803.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

jimmyfitz commented 5 months ago

This is the error log from the Places sensor showing that device_tracker isn't sending location. This error originated from a custom integration.

Logger: custom_components.places.sensor Source: custom_components/places/sensor.py:511 integration: Places: OpenStreetMap Sensor (documentation, issues) First occurred: April 9, 2024 at 7:02:23 PM (1 occurrences) Last logged: April 9, 2024 at 7:02:23 PM

(XXXXXX Location) Tracked Entity (device_tracker.XXXXXX_device_tracker) is not set or is not available. Not Proceeding with Update.

ReneNulschDE commented 5 months ago

The data in the log looks correct. Could you please check via Open your Home Assistant instance and show your state developer tools. if the device_tracker.XXXXXX_device_tracker is really missing.

Could be that your places sensor is too fast and gets loaded before the mb-component has created the senor.

jimmyfitz commented 5 months ago

It's there (and appears to show data) but ever since the update it's not working. I've now not only uninstalled and reinstalled Places but I've completely rebuilt my Home Assistant on a new box and the problem persists. Something is suddenly wrong about the way it's being presented (since it's not showing on the map either).

device_tracker.XXXXXX_device_tracker XXXXXX Device Tracker home source_type: gps latitude: -33.787601 longitude: 151.1157 gps_accuracy: 0 car: XXXXXX vin: XXXXXXXXXXXXXXXXX retrievalstatus: VALID timestamp: 2024-04-10T17:40:58 positionHeading: 217.9 friendly_name: XXXXXX Device Tracker

ReneNulschDE commented 5 months ago

Is your car in the home zone? Then it will not show up in the default map (this is standard HA behavior). You can add a map-tile on this tile the cars in the home zones are visible.

Let me check the places component, never used this one...

The HA core team changed a lot in the last two releases when it comes to component loadtimes. as said let me check...

ReneNulschDE commented 5 months ago

Places is working for me when I disable the option "Use GPS Accuracy"

jimmyfitz commented 5 months ago

Thanks Rene,

I'm not sure why it broke when I upgraded, but that definitely seems to be the cause of all my subsequent attempts to fix (by deleting and recreating the sensor) as that GPS accuracy setting defaults to on and I hadnt changed it.

So, it seems like it's a non-issue and user error. Apologies and thanks.


From: Rene Nulsch @.***> Sent: Wednesday, 10 April 2024 19:42 To: ReneNulschDE/mbapi2020 Cc: jimmyfitz; Author Subject: Re: [ReneNulschDE/mbapi2020] Device Tracker no longer showing correctly (Issue #222)

Places is working for me when I disable the option "Use GPS Accuracy"

— Reply to this email directly, view it on GitHubhttps://github.com/ReneNulschDE/mbapi2020/issues/222#issuecomment-2047043210, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIPAW7VEMQQGXVIKK662FWTY4UCOVAVCNFSM6AAAAABF74QO66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBXGA2DGMRRGA. You are receiving this because you authored the thread.Message ID: @.***>