Mercedes Me (Connected Vehicle)
Moderator: leecollings
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Mercedes Me (Connected Vehicle)
Remember that the authorization code that you received (in the browser) is only valid for a short period of time (an hour if I remember correctly, have to look it up).
So you might have to get a new auth code and fill it in within Domoticz and try again. (Disable and enable hardware module again).
The way you describe things, it seems that you did the steps correctly.
You could try to start Domoticz with some debug flags (command line) to see if some more details are shown.
(Unfortunately I am not near a good working internet connection, so unable at the moment to look at things in detail).
So you might have to get a new auth code and fill it in within Domoticz and try again. (Disable and enable hardware module again).
The way you describe things, it seems that you did the steps correctly.
You could try to start Domoticz with some debug flags (command line) to see if some more details are shown.
(Unfortunately I am not near a good working internet connection, so unable at the moment to look at things in detail).
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
One RPi with Pi foundation standard touch screen to display Dashticz
-
- Posts: 9
- Joined: Tuesday 08 September 2020 9:30
- Target OS: Linux
- Domoticz version:
- Location: Germany
- Contact:
Re: Mercedes Me (Connected Vehicle)
Hi JP, Hi Domoticz community,
prior to using the connected car products (BYOCAR) you need to enable your Mercedes me account accordingly. You need the product "Vehicle Setup" and within this product the "Remote Retrieval" service needs to be activated. And both the Mercedes me account (email) and the Mercedes-Benz /developers account must match 1:1.
I am not sure if this relates to this authorization issue. But I think it's worth to point this out.
Regards,
Olaf from Mercedes-Benz /developers
prior to using the connected car products (BYOCAR) you need to enable your Mercedes me account accordingly. You need the product "Vehicle Setup" and within this product the "Remote Retrieval" service needs to be activated. And both the Mercedes me account (email) and the Mercedes-Benz /developers account must match 1:1.
I am not sure if this relates to this authorization issue. But I think it's worth to point this out.
Regards,
Olaf from Mercedes-Benz /developers
Mercedes-Benz /developers team
contact: [email protected]
contact: [email protected]
-
- Posts: 1
- Joined: Wednesday 20 November 2019 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11652
- Contact:
Re: Mercedes Me (Connected Vehicle)
Dear,
Where exactly can I see I have the product 'Vehicle setup ' and where do I activate the 'Remote retrieval'?
Br,D
Where exactly can I see I have the product 'Vehicle setup ' and where do I activate the 'Remote retrieval'?
Br,D
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Mercedes Me (Connected Vehicle)
You need to register yourself at the 'Mercedes Me' portal (which you probaly have done already) and make sure that your car is 'registered' to your account.
Within the 'car setting', there a (30+) services you can (de)activate and under the Comfort section their should be a service for 'remote vehicle data retrieval'. This one has to be active so data from the car can be retrieved at all.
The BYOCAR api's can than use this retrieved data as the input for the functionality of these API's.
Do you have the 'Mercedes Me' app (iOS, Android) installed on your phone/tablet? And does it show data?
As mentioned, you have to make sure that you use the same 'ID' (e-mailaddress + pass) to register as a Developer at mercedes, so the Developer functions (like BYOCAR) can be 'connected' to your Mercedes Me account and data.
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
One RPi with Pi foundation standard touch screen to display Dashticz
-
- Posts: 9
- Joined: Tuesday 08 September 2020 9:30
- Target OS: Linux
- Domoticz version:
- Location: Germany
- Contact:
Re: Mercedes Me (Connected Vehicle)
Dear All,
we have provided a Postman Collection for BYOCAR https://www.postman.com/mbdevelopers/wo ... umentation.
Feel free to use it. We think it might also help you in identifying potential issues in your local implementation.
Regards,
Olaf from Mercedes-Benz /developers
we have provided a Postman Collection for BYOCAR https://www.postman.com/mbdevelopers/wo ... umentation.
Feel free to use it. We think it might also help you in identifying potential issues in your local implementation.
Regards,
Olaf from Mercedes-Benz /developers
Mercedes-Benz /developers team
contact: [email protected]
contact: [email protected]
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Mercedes Me (Connected Vehicle)
Just wondering if you have been able to get everything working as it should? Let us know
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
One RPi with Pi foundation standard touch screen to display Dashticz
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Mercedes Me (Connected Vehicle)
And? Everything up and running now?
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
One RPi with Pi foundation standard touch screen to display Dashticz
-
- Posts: 2
- Joined: Wednesday 12 May 2021 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Mercedes Me (Connected Vehicle)
Hi,
Thank you for your help
I prepared another Raspberry with the last image of OS and Domoticz.
I could get a connection with my car but I lost it after 1 day.
I will try further.
Maybe one question: How can I define my Home position?
Regards
Thank you for your help
I prepared another Raspberry with the last image of OS and Domoticz.
I could get a connection with my car but I lost it after 1 day.
I will try further.
Maybe one question: How can I define my Home position?
Regards
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Mercedes Me (Connected Vehicle)
Great to hear it works (partly).JPY475 wrote:Hi,
Thank you for your help
I prepared another Raspberry with the last image of OS and Domoticz.
I could get a connection with my car but I lost it after 1 day.
I will try further.
Maybe one question: How can I define my Home position?
Regards
When you keep it running, the authorization tokens get refreshed automatically.
But if it is not connected for a longer period (I think more that 24 hours), you probably have to generate a new access token (login in via the browser) and put that token into Domoticz.
Way easier to just keep it running
The Home position is the Home position of Domoticz (settings screen).
But at the moment, the BYOcar API’s do not provide any location information so nothing is done with it. The car will always be ‘at home’ even when it isn’t. The reason it is there is because for other cars like Tesla a location is available and the MercedesMe integration on Domoticz shares a lot of code/functionality with other Domoticz car modules.
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
One RPi with Pi foundation standard touch screen to display Dashticz
-
- Posts: 7
- Joined: Wednesday 28 November 2018 12:55
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Mercedes Me (Connected Vehicle)
dear team,
great initiative. I would like to add this to my domoticz environement however, I get this login error:
I tested my username and password on the mercedes me site and they work. So I do not understand why I cannot login with the same credentials
I also checked the Vehicle setup: All service are enabled and valid to somewhere in 2022 or indefinite. So why doesn't it work.
I only have an mercedes me account and no developer account. Can this be it?
great initiative. I would like to add this to my domoticz environement however, I get this login error:
Code: Select all
2021-06-28 15:25:55.904 MercedesC220D: Attempting login (using provided Authorization code).
2021-06-28 15:25:56.162 Status: MercedesC220D: Received 400/401.. During authorisation proces. Aborting!
2021-06-28 15:25:56.162 Error: MercedesC220D: Failed to get token.
2021-06-28 15:25:56.162 Error: MercedesC220D: Login unsuccessful!
2021-06-28 15:25:56.162 Error: MercedesC220D: Aborting due to too many failed authentication attempts (and prevent getting blocked)!
I tested my username and password on the mercedes me site and they work. So I do not understand why I cannot login with the same credentials
I also checked the Vehicle setup: All service are enabled and valid to somewhere in 2022 or indefinite. So why doesn't it work.
I only have an mercedes me account and no developer account. Can this be it?
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Mercedes Me (Connected Vehicle)
Hi @marcowork,marcowork wrote:dear team,
great initiative. I would like to add this to my domoticz environement however, I get this login error:
Code: Select all
2021-06-28 15:25:55.904 MercedesC220D: Attempting login (using provided Authorization code). 2021-06-28 15:25:56.162 Status: MercedesC220D: Received 400/401.. During authorisation proces. Aborting! 2021-06-28 15:25:56.162 Error: MercedesC220D: Failed to get token. 2021-06-28 15:25:56.162 Error: MercedesC220D: Login unsuccessful! 2021-06-28 15:25:56.162 Error: MercedesC220D: Aborting due to too many failed authentication attempts (and prevent getting blocked)!
I tested my username and password on the mercedes me site and they work. So I do not understand why I cannot login with the same credentials
I also checked the Vehicle setup: All service are enabled and valid to somewhere in 2022 or indefinite. So why doesn't it work.
I only have an mercedes me account and no developer account. Can this be it?
Where you able to follow the steps as described in the first posts of this topic?
Make sure you have all API’s activated.
Then use the login url (see start posts) to get your access code that should be entered within Domoticz.
And make sure that ‘enable new hardware’ is on for at least 2 hours as it takes a while before all available data is put into custom sensors (when enabled).
Let us know if you get it running…
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
One RPi with Pi foundation standard touch screen to display Dashticz
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Mercedes Me (Connected Vehicle)
@marcowork,
Did you get it running ?
Did you get it running ?
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
One RPi with Pi foundation standard touch screen to display Dashticz
- 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)
created my mercedes develop account, with multiple projects,
when using tis url with my ID :
https://id.mercedes-benz.com/as/authori ... state=test
I get:
Error
Oops
Looks like something is not right. Please contact your administrator.
400 - Invalid redirect_uri
looks like it's not working , or did I miss something
In Domoticz I get a login failure
when using tis url with my ID :
https://id.mercedes-benz.com/as/authori ... state=test
I get:
Error
Oops
Looks like something is not right. Please contact your administrator.
400 - Invalid redirect_uri
looks like it's not working , or did I miss something
In Domoticz I get a login failure
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
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Mercedes Me (Connected Vehicle)
@rolandbreedveld
Did you configure the redirect_uri (https://localhost) also in your Project (see Project Credentials) within the Mercedes Developers Console?
The redirect_uri needs to be known, otherwise the redirect will not happen.
Did you configure the redirect_uri (https://localhost) also in your Project (see Project Credentials) within the Mercedes Developers Console?
The redirect_uri needs to be known, otherwise the redirect will not happen.
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
One RPi with Pi foundation standard touch screen to display Dashticz
- 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)
The rederect URL is :kiddigital wrote: ↑Tuesday 27 July 2021 14:33 @rolandbreedveld
Did you configure the redirect_uri (https://localhost) also in your Project (see Project Credentials) within the Mercedes Developers Console?
The redirect_uri needs to be known, otherwise the redirect will not happen.
https://localhost
In Domiticz:
2021-07-27 15:35:16.147 EQA250: Attempting login (using provided Authorization code).
2021-07-27 15:35:16.669 Status: EQA250: Received 400/401.. During authorisation proces. Aborting!
2021-07-27 15:35:16.669 Error: EQA250: Failed to get token.
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
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Mercedes Me (Connected Vehicle)
So you were able to get an authorization_token in the URL after logging in on the MercedesMe portal?rolandbreedveld wrote: ↑Tuesday 27 July 2021 15:34 ...
In Domiticz:
2021-07-27 15:35:16.147 EQA250: Attempting login (using provided Authorization code).
2021-07-27 15:35:16.669 Status: EQA250: Received 400/401.. During authorisation proces. Aborting!
2021-07-27 15:35:16.669 Error: EQA250: Failed to get token.
Just checking.. your account for MercedesME is the same as on the Dev Portal?
Once you get an authorization_token, this code is only valid for a short time (I thought 60 minutes). Try to get a new authorization_token and try again.
If the authorization_token contains a '+' or '/' character, apply for a new one as I think there might be an encoding issue with these characters.
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
One RPi with Pi foundation standard touch screen to display Dashticz
- 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)
@kiddigital
it finaly works,
The URL is changed, with the current one You'll get no login screen but a: "The requested scope is invalid"
you have to add "&prompt=login consent" to the URL, the correct URL will be:
Had to do it twice, it's important that the car is "alive", first time I get "waking up the car", after a while the authentication was timed out.
regards Roland
it finaly works,
The URL is changed, with the current one You'll get no login screen but a: "The requested scope is invalid"
you have to add "&prompt=login consent" to the URL, the correct URL will be:
Code: Select all
https://id.mercedes-benz.com/as/authorization.oauth2?response_type=code&client_id=<CLIENT-ID>&redirect_uri=https://localhost&scope=mb:vehicle:mbdata:vehiclestatus%20mb:vehicle:mbdata:fuelstatus%20mb:vehicle:mbdata:payasyoudrive%20mb:vehicle:mbdata:vehiclelock%20mb:vehicle:mbdata:evstatus%20offline_access&state=test&prompt=login%20consent
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
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Mercedes Me (Connected Vehicle)
Great
Thx for reporting, new to me But that's the benefit of the refresh_token usage, once it is running and keeps running, no need to re-authenticaterolandbreedveld wrote: ↑Wednesday 28 July 2021 17:17 The URL is changed, with the current one You'll get no login screen but a: "The requested scope is invalid"
you have to add "&prompt=login consent" to the URL, the correct URL will be:Had to do it twice, it's important that the car is "alive", first time I get "waking up the car", after a while the authentication was timed out.Code: Select all
https://id.mercedes-benz.com/as/authorization.oauth2?response_type=code&client_id=<CLIENT-ID>&redirect_uri=https://localhost&scope=mb:vehicle:mbdata:vehiclestatus%20mb:vehicle:mbdata:fuelstatus%20mb:vehicle:mbdata:payasyoudrive%20mb:vehicle:mbdata:vehiclelock%20mb:vehicle:mbdata:evstatus%20offline_access&state=test&prompt=login%20consent
regards Roland
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
One RPi with Pi foundation standard touch screen to display Dashticz
- 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)
That's right, it's only for the first time.Thx for reporting, new to me But that's the benefit of the refresh_token usage, once it is running and keeps running, no need to re-authenticate
Found it on https://developer.mercedes-benz.com/con ... umentation right column.
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
- 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)
@kiddigital
Is there a way to send commands to the car?
I'm looking for a way to stop/start charging, when my solar panels are producing energy.
Is there a way to send commands to the car?
I'm looking for a way to stop/start charging, when my solar panels are producing energy.
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
Who is online
Users browsing this forum: No registered users and 0 guests