Hi, This should have no effect on the automations and so on. The ids for the sensors will be the same after new installation.
Hi,
Core: 2024.2.1
Supervisor: 2024.01.1
Operating System: 11.5
Integration version: Not sure where to find this, but I’m using the latest version
I’ve been using the integration successfully for a while (thank you!), but after the latest updates I’m getting “failed to set up”
I tried the “Delete authentication token file now. require a restart of Home Assistant after save.” option in the configuration, but after a restart I still get the following in the log:
Authentication failed. Please reauthenticate.
Refresh token is missing - reauth required
I’m not sure whether the issue was caused by the updates to HA itself or the integration as they were both released around the same time.
Any help is appreciated!
Thanks
To have a clean state, I would propose that you
- delete the integration from HA (Deletion from HACS is not required).
- delete the “.mercedesme-token-cache”-file in /config if present, delete the “.mercedesme-token-cache-…”-files in /config/.storage if present
- restart HA
- Add the integration again.
Please update to v0.10.1 too
Thanks, an uninstall and reinstall of the integration worked.
I didn’t have the token cache folders and was already running v0.10.1
Out of curiosity, any idea what may have caused it? I had to rename all the sensors to match my naming convention & dashboards, so an uninstall/reinstall is not a trivial troubleshooting step since it requires some manual rework (in my case at least).
Mostly though I’m just pleased it’s working again - thanks again for the prompt help!
Hi,
I’m not 100% why this is happening currently. Two streams that I analyze currently:
- Backup/Restore (a user prepared a backup before upgrade HA, between backup and upgrade the token was renewed by the component - so the refresh token in the backup is not valid anymore)
- Race condition between websocket component and rest-api.
Hi @snappa2000,
did you had the chance to try it? I have prepared the code already - just waiting for the final data input.
Hi Thomas
from where do you get the position and the heading?
br Dave
They are attributes from the device_tracker
:
state_attr('device_tracker.XXX_device_tracker', 'positionHeading')
Check my example from the rest_command
that I posted earlier, it’s all there.
Thomas
yep, captured and emailed. thanks
yes got it. but how did you get these device_tracker entities?
i don t have these. do i need to set up it manually?
Hi Dave,
the device_tracker is created whenever the location data is delivered from the MB servers on startup.
In most cases the service is not activated in the MB portal. (check: Service Management) After you activated the service, it can take a few hours until it is available via the api. Please reload the component to check if the device tracker gets created.
Second on the list of reasons: The license has expired. You can see this on the service management page too.
Third (and not that often): Something went wrong in the component. Download diagnostic report of the component and search for
location": {
Check if attributes “positionLat” and “positionLong” are existing and filled.
I have published a preview release v0.11.0-beta.1
You can test it via HACS, click in the HACS list on the three dots of the MB-component. Click “Refresh Information” and then on “Redownload” and select “Show beta versions”
New:
- Sensor: lastParkEvent (datetime), Attributes parkEventType (area of the car where the incident happened), parkEventLevel (level of the incident (low,medium,high) (see readme for int translation) (@snappa2000 : Thanks for the dataset)
- Sensor: Interior Protection (int), 0 and 1 = Not active, 2 = Active
- Add “_last_full_message” to diagnostic log (contains the original MB data)
Fixes:
Other:
- Protos updated to latest Google Protobuf version
"location": {
"name": "Location",
"latitude": null,
"longitude": null,
"heading": null,
"positionLat": {
"value": 0,
"retrievalstatus": 3,
"timestamp": "1707997772",
"display_value": null,
"unit": null
},
i think this is the problem
Did you checked the ServiceManagement page?
RetrievalStatus: 3 - comes from the MB API means (internal MB speak): Value has been retrieved from vehicle but is invalid (marked as invalid)
- So the MB-Server received some data from the car. Marked this as invalid. And delivered status 3 to this component. (Nothing that I can solve)
You can update to the beta version v.0.11.0 and check the diagnostic log again. the attribute _last_full_message contains the MB data.
Let me add p1.5: to my original list of reasons: You car does not support location information.
on the service page i can t find it.
but i search in the headunit and found the toggle for the location was deactivated in the car. now it is working
Hello. This is my first time posting so I am unsure how to create a new comment (hence the reply). I have been using this integration successfully for a while and yesterday it stopped working. I followed the steps above to delete everything and reinstall. That worked but only gave me a short list of entities. When I opened the configure window and selected ‘disable capabilities check’ and entered my pin code the rest of the entities showed up but everything is now unavailable again. Any idea how to fix this?
Hi all,
i´m new to HA (after many years in FHEM) and working with the mercedesme-integration is perfect.
Thanks for your work!
Is it possible to create a HA-Service to set the charging program?
car.range_electric → Attribute: selectedChargeProgram
0 means “standard”
1 means “Work”
2 meins “home”
Would be great! Thanks!
Christian
Hi Christian,
I have no access to a car with charge programs currently, nevertheless, I added the code. Can you test it? The code is in the master branch and you could select the master branch in HACS via Redownload.
Hi @HANerdinTraining ,
may I ask you to open a issue on github? please share all the information that are requested in the issue form. Please add also which sensors are missing when you NOT active the “disable capabi… check”
Thx
Rene
Hi Rene,
i have done a redownload and reboot. But there is no new service.
Maybe the problem is located in front of the screen?!?
But thanks a lot for your super fast development!
Regards
Christian
PS: Switching to Beta 0.11 → same result, no new service.