Mercedes Me (Connected Vehicle)

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
rolandbreedveld
Posts: 156
Joined: Wednesday 09 March 2016 11:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
Raspberry Pi(SSD)+UPS HAT,Dashticz on WallTablet,HomeBridge, P1, HarmonyHub,FritzBox,API to 123Solar+ABB-PowerOne+SMA,ESP-Leds(flashed LSC),Tasmota,Shelly,MQTT,Mosquito,Node-Red,http://wiki.breedveld.net/index.php?title=RPiWaterMeter, Mercedes-Me
jeroenbs
Posts: 7
Joined: Monday 06 February 2023 14:24
Target OS: Linux
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
jeroenbs
Posts: 7
Joined: Monday 06 February 2023 14:24
Target OS: Linux
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
User avatar
waltervl
Posts: 5793
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by waltervl »

Please keep English language on this forum...
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
jeroenbs
Posts: 7
Joined: Monday 06 February 2023 14:24
Target OS: Linux
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
rolandbreedveld
Posts: 156
Joined: Wednesday 09 March 2016 11:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
Attachments
get_mercedes_token.sh.txt
(3.69 KiB) Downloaded 58 times
Raspberry Pi(SSD)+UPS HAT,Dashticz on WallTablet,HomeBridge, P1, HarmonyHub,FritzBox,API to 123Solar+ABB-PowerOne+SMA,ESP-Leds(flashed LSC),Tasmota,Shelly,MQTT,Mosquito,Node-Red,http://wiki.breedveld.net/index.php?title=RPiWaterMeter, Mercedes-Me
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
rolandbreedveld
Posts: 156
Joined: Wednesday 09 March 2016 11:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
Raspberry Pi(SSD)+UPS HAT,Dashticz on WallTablet,HomeBridge, P1, HarmonyHub,FritzBox,API to 123Solar+ABB-PowerOne+SMA,ESP-Leds(flashed LSC),Tasmota,Shelly,MQTT,Mosquito,Node-Red,http://wiki.breedveld.net/index.php?title=RPiWaterMeter, Mercedes-Me
jeroenbs
Posts: 7
Joined: Monday 06 February 2023 14:24
Target OS: Linux
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
harrykausl
Posts: 181
Joined: Sunday 13 November 2016 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Germany
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
harrykausl
Posts: 181
Joined: Sunday 13 November 2016 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Germany
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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.
frankdep
Posts: 12
Joined: Saturday 14 September 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by frankdep »

Server is actually down since Friday 14/4/2023 18:51
https://developer.mercedes-benz.com/status
Attachments
2023-04-17 18_42_11-Clipboard.png
2023-04-17 18_42_11-Clipboard.png (209.95 KiB) Viewed 1747 times
jeroenbs
Posts: 7
Joined: Monday 06 February 2023 14:24
Target OS: Linux
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by jeroenbs »

Yes, first I thought, something wrong here. I have the same problem
frankdep
Posts: 12
Joined: Saturday 14 September 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by frankdep »

https://developer.mercedes-benz.com/status
Back online since 18/4 2:07, All OK now
User avatar
rolandbreedveld
Posts: 156
Joined: Wednesday 09 March 2016 11:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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)
Raspberry Pi(SSD)+UPS HAT,Dashticz on WallTablet,HomeBridge, P1, HarmonyHub,FritzBox,API to 123Solar+ABB-PowerOne+SMA,ESP-Leds(flashed LSC),Tasmota,Shelly,MQTT,Mosquito,Node-Red,http://wiki.breedveld.net/index.php?title=RPiWaterMeter, Mercedes-Me
frankdep
Posts: 12
Joined: Saturday 14 September 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post 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....
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest