Page 7 of 8

Re: Mercedes Me (Connected Vehicle)

Posted: Thursday 09 February 2023 12:50
by kiddigital
jeroenbs wrote:Hi, thanks for the suggestion. But I don't think that is the problem, NSlookup work and wget works as well
Weird.. ‘problem’ is that these errors (numbers below 100) are errorcodes returned by the underlying OS libraries and not coming from within Domoticz. So it is not something that can be solved in Domoticz unfortunately.

As you are on Linux, try curl and see what happens. Look at the domoticz source or Merceders developer documentation to find the relvant URI’s to try.

Hopefully you find a solution because it is nice to see your car data in Domoticz Image

Re: Mercedes Me (Connected Vehicle)

Posted: Thursday 09 February 2023 13:29
by rolandbreedveld
Weet je zeker dat de de release hebt van 5 nov 2022, of later?
Zie Changelog:
Updated: Mercedes EV, new Token URL (changed November 2022)

ik doe het configureren en updaten trouwens met een scriptje (op een linux pc), die chrome lanceert, daar de token uithaalt, en via de domoticz api domoticz update.
scheelt wat werk, en zeker ook typefouten, als je wilt kan ik hem wel uploaden.

groet, Roland

Re: Mercedes Me (Connected Vehicle)

Posted: Thursday 09 February 2023 17:27
by jeroenbs
Graag,
vast bedankt.
Ik heb versie:

About Domoticz
Version: 2022.2 (build 15018)
Build Hash: 8ca84a967
Compile Date: 2023-01-31 16:52:49
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]
Active User: jeroenb

Groet,
Jeroen

Re: Mercedes Me (Connected Vehicle)

Posted: Saturday 11 February 2023 11:37
by jeroenbs
rolandbreedveld wrote: Thursday 09 February 2023 13:29 Weet je zeker dat de de release hebt van 5 nov 2022, of later?
Zie Changelog:
Updated: Mercedes EV, new Token URL (changed November 2022)

ik doe het configureren en updaten trouwens met een scriptje (op een linux pc), die chrome lanceert, daar de token uithaalt, en via de domoticz api domoticz update.
scheelt wat werk, en zeker ook typefouten, als je wilt kan ik hem wel uploaden.

groet, Roland
Als je dat scriptje zou kunnen delen graag
groet,
Jeroen

Re: Mercedes Me (Connected Vehicle)

Posted: Saturday 11 February 2023 11:41
by waltervl
Please keep English language on this forum...

Re: Mercedes Me (Connected Vehicle)

Posted: Saturday 11 February 2023 15:51
by jeroenbs
Ok sorry for the Dutch language in the previous part
I see now some devices "State, Open Alert, Odometer and Battert level"
What I did was set "API Protection: Allow Basic-Auth authentication over plain HTTP (API only)." in setup > settings > security section
regards,
Jeroen

Re: Mercedes Me (Connected Vehicle)

Posted: Saturday 11 February 2023 19:29
by kiddigital
jeroenbs wrote:Ok sorry for the Dutch language in the previous part
I see now some devices "State, Open Alert, Odometer and Battert level"
What I did was set "API Protection: Allow Basic-Auth authentication over plain HTTP (API only)." in setup > settings > security section
regards,
Jeroen
Hi @jeroenbs , that setting is not related (or should not be).

Great to hear that things work Image
Btw, it can take up to an hour before all devices are created so please leave ‘allow new device’ on.

After a while, could you disable the ‘allow basic-auth’ again and see if the Mercedes devices are still updated?

Re: Mercedes Me (Connected Vehicle)

Posted: Sunday 12 February 2023 8:48
by rolandbreedveld
[/quote]

Als je dat scriptje zou kunnen delen graag
groet,
Jeroen
[/quote]
Hi Jeroen, its enclosed, hope this will help

It only runs on Linux, perhaps with some mods on mac-osx
remove the .txt on the end

Re: Mercedes Me (Connected Vehicle)

Posted: Sunday 12 February 2023 9:06
by kiddigital
@rolandbreedveld , why and how often do you run this script?

There should be no need to run a script like this as the module automatically ‘refreshes’ its Token using the ‘refreshtoken’ it received when acquiring the ‘accesstoken’.

As long as the module keeps running, there is no need to ‘login’ again.

This is only needed sometimes for example when Mercedes updates their usage agreement. Automatic refresh is then blocked because consent is missing and therefor you need to go through the login procedure.

At my side, it runs for months without any need to provide a new accesscode.

Re: Mercedes Me (Connected Vehicle)

Posted: Sunday 12 February 2023 10:34
by rolandbreedveld
kiddigital wrote: Sunday 12 February 2023 9:06 @rolandbreedveld , why and how often do you run this script?
Hi kiddigital

Not very much, indeed, normally it's not needed.
I had to do it last november, when Mercedes changes the URL, en a few times, when my device was disconnected to long.
You can follow the manual procedure, but (nerd-as-I-am) I automated this.
so absolutely no need, to run it on regular base.

regards, Roland

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 13 February 2023 17:04
by jeroenbs
Hi,
an update from my side.
It works,! Thanks for all the support!
Some minor remarks, it took up to 24hours to receive new entries (at this moment 18) in Domoticz (in the documentation it is 1 hour, but after 1 hour I only had 4 )
I disabled the ‘allow basic-auth’ and the Mercedes devices are still updated.

regards, Jeroen

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 13 February 2023 17:11
by kiddigital
Great!

And yes, it sometimes takes longer because if the car hasn’t moved for sometime, the API does not send any (updated) data until something changes (like the car has been driven or doors opened, etc.).

And if we don’t receive data, no devices are created. Unfortunately their is no way to (initially) get the current state and we have to wait till updates arrive.

Good reason to take the care for a drive

Re: Mercedes Me (Connected Vehicle)

Posted: Saturday 15 April 2023 9:54
by harrykausl
I have a Mercedes-Hybrid car (B250e). Is it possible, to get the connected event if the car loading is plugged in (is there a device for plugged) ? Thanks

Re: Mercedes Me (Connected Vehicle)

Posted: Saturday 15 April 2023 11:06
by kiddigital
harrykausl wrote:I have a Mercedes-Hybrid car (B250e). Is it possible, to get the connected event if the car loading is plugged in (is there a device for plugged) ? Thanks
Maybe, but we need to see if there is something in the data that can be used for it. Can you capture or manually perform the API request and response?

Re: Mercedes Me (Connected Vehicle)

Posted: Saturday 15 April 2023 11:26
by harrykausl
I can't capture the data. But I use evcc for loading and there's also the connection to mercedes me (it seems to be the same as in the plugin). And there I get for example soc and so on.

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 17 April 2023 18:43
by frankdep
Server is actually down since Friday 14/4/2023 18:51
https://developer.mercedes-benz.com/status

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 17 April 2023 19:28
by jeroenbs
Yes, first I thought, something wrong here. I have the same problem

Re: Mercedes Me (Connected Vehicle)

Posted: Tuesday 18 April 2023 13:14
by frankdep
https://developer.mercedes-benz.com/status
Back online since 18/4 2:07, All OK now

Re: Mercedes Me (Connected Vehicle)

Posted: Tuesday 06 June 2023 10:16
by rolandbreedveld
Hi
since 4 day's the token refresh is not working.

So I have to do the initial procedure again (lucky I have a script for it), but after 1 hour working fine this happens:

2023-06-05 13:07:39.151 Status: EQA250: Executing command: Get All states
2023-06-05 13:07:41.980 EQA250: General/Percentage (EQA250 Battery Level)
2023-06-05 13:07:41.992 EQA250: General/Custom Sensor (EQA250 Odometer)
2023-06-05 13:07:42.007 EQA250: General/Alert (EQA250 Open Alert)
2023-06-05 13:07:42.026 EQA250: Light/Switch (EQA250 doorstatusrearleft)

2023-06-05 13:08:41.374 Error: EQA250: Failed to perform GET request (401)!
2023-06-05 13:08:41.374 Status: EQA250: Received 401.. Let's try to (re)authorize again!
2023-06-05 13:08:42.456 Status: EQA250: Received unhandled HTTP returncode 502 !
2023-06-05 13:08:42.456 Error: EQA250: Failed to get token.
2023-06-05 13:08:42.456 Error: EQA250: Failed to refresh login credentials.
2023-06-05 13:08:42.457 Error: EQA250: No access token available.
2023-06-05 13:08:42.457 Error: EQA250: No access token available.
2023-06-05 13:08:42.457 Error: EQA250: No access token available.
2023-06-05 13:08:42.457 Error: EQA250: Failed to get awake state (available resources)!

after that, every minute this is repeating:

2023-06-06 08:45:19.957 Error: EQA250: No access token available.
2023-06-06 08:45:19.958 Error: EQA250: No access token available.
2023-06-06 08:45:19.958 Error: EQA250: No access token available.
2023-06-06 08:45:19.958 Error: EQA250: No access token available.
2023-06-06 08:45:19.958 Error: EQA250: Failed to get awake state (available resources)!
2023-06-06 08:45:19.958 Status: EQA250: Car awake detection: Car asleep
2023-06-06 08:45:19.958 Status: EQA250: Waking up car.
2023-06-06 08:45:19.969 EQA250: General/Alert (EQA250 State)
2023-06-06 08:45:19.988 EQA250: General/Alert (EQA250 State)

Re: Mercedes Me (Connected Vehicle)

Posted: Tuesday 06 June 2023 12:38
by frankdep
Hi Roland
Thanks for your post. I have the same issue since 1/6/2023.
I have tried to create new project and credentials .
This process is working but the issue with the token remains :
2023-06-06 12:19:30.579 Mercedes: Attempting login (using provided Authorization code).
2023-06-06 12:19:31.235 Status: Mercedes: Received (400) Bad Request.. Unexpected unless something has changed! ({"error":"invalid_request","error_description":"invalid auth code"})
2023-06-06 12:19:31.236 Error: Mercedes: Failed to get token.
2023-06-06 12:19:31.236 Error: Mercedes: Login unsuccessful!

I have asked the support on mercedes developpers and they say that nothing is wrong on their side.
They are also referring to the migration in 11/2022 asking for a renewals of credentials with a new URL.
https://developer.mercedes-benz.com/con ... ation_2022
In my case this was already anticipated so no result.
Still continuing my attempts to get in....