Please Follow MercedesMe
It looks cool. I will try it out soon.
It is interesting that according to the readme you can monitor things like the doors, windows and light status. However I donât see anything for monitoring status of tires, battery, coolant, washer fluid etc. Or am I missing something? Also I wonder if it can (and indeed should) monitor the vehicle alarm status, and the collision alarm (in case someone bumps the car in the parking lot).
Yes, please give it a try.
I owned an BMW before and much more data is provided. The 1st goal of this binding is to provide the official supported data from Mercedes.
Iâm on the same page. Mercedes is providing much more data on their Mercedes Me App and I want these information too in openHAB - check control messages, tire pressure, max battery load, climatization, gps coordinates, service dates ⊠But simply it isnât accessible for now.
So letâs start with the official provided data and Iâll press Mercedes to provide more data for our purposes.
On the official supported data from Mercedes link that you provided, you had explicitly checked the âBYOCARâ package. I am not sure what âBYOCARâ is actually, but if you deselect it, the web page seems to imply that many if not most of the data that is available in Mercedes Me could also be available via the API.
BYOCAR is Build Your Own CAR and these APIs are free to access for everybody.
Select any other product and youâll have and / or
- sandbox version which provides only sample data
- trial version with strictly limited calls
- business version youâve to pay for
See Traffic Sign Product with only Trial and Business version
I love to have these data but
- sandbox data is useless for my specific vehicle
- trial will simply stop after a certain amount of queries
- business I donât want to pay for data of my vehicle
We need to stress MercedesâBenz /developers â The API platform by Mercedes-Benz in order to get more access to our own vehicles!
HI, thank you for the nice binding
Is it possible to set it up using âfilesâ instead of mainUI ?
Thanks Mads
Sure - added full example section in readme
Fantastic
Do you know if it is a one time limit? Or (say) a maximum number of queries per day? If the latter, we could perhaps build in a mechanism in the binding to prevent exceeding the limit? (I donât need to check my tires more than once per dayâŠ)
Hi @weymann
This is not obvious to me â Purpose URL: use link towards this binding description â
What link, do i need to find further down in the readme ??
EDIT: is it this link â GitHub - weymann/OH3-MercedesMe-Drops: Development Drops of openHAB MercedesMe binding â ??
Thanks Mads
Hi @weymann
Im trying to use the file based configuration.
I have made a new MercedesMe configuration for this binding, at first i tried to use the same on as i used with @spawny0815 solution.
But anyway i think its a problem with in Openhab, i get these errors.
2022-06-26 09:21:17.264 [INFO ] [g.mercedesme.internal.AccountHandler] - Config delivered ID 3xxxxxxxxxxxxxxxxxxxxxxxe, Secret exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxm, IP not set, Port 8090, scope offline_access mb:vehicle:mbdata:payasyoudrive mb:vehicle:mbdata:vehiclestatus mb:vehicle:mbdata:vehiclelock mb:vehicle:mbdata:fuelstatus mb:vehicle:mbdata:evstatus
2022-06-26 09:21:17.267 [INFO ] [g.mercedesme.internal.AccountHandler] - Config to edit Configuration[{key=fuelScope; type=Boolean; value=true}, {key=odoScope; type=Boolean; value=true}, {key=evScope; type=Boolean; value=true}, {key=clientId; type=String; value=3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxe}, {key=imageApiKey; type=String; value=exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc}, {key=callbackPort; type=BigDecimal; value=8090}, {key=lockScope; type=Boolean; value=true}, {key=callbackIp; type=String; value=192.168.0.101}, {key=clientSecret; type=String; value=exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxm}, {key=vehicleScope; type=Boolean; value=true}]
2022-06-26 09:21:17.285 [INFO ] [g.mercedesme.internal.AccountHandler] - Config not valid
2022-06-26 10:45:51.949 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:range#mileage REFRESH range#mileage
2022-06-26 10:45:51.981 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:range#range-electric REFRESH range#range-electric
2022-06-26 10:45:52.013 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:range#radius-electric REFRESH range#radius-electric
2022-06-26 10:45:52.044 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:range#soc REFRESH range#soc
2022-06-26 10:45:54.202 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:doors#driver-front REFRESH doors#driver-front
2022-06-26 10:45:54.234 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:doors#driver-rear REFRESH doors#driver-rear
2022-06-26 10:45:54.261 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:doors#passenger-front REFRESH doors#passenger-front
2022-06-26 10:45:54.270 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:doors#passenger-rear REFRESH doors#passenger-rear
2022-06-26 10:45:54.280 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:doors#deck-lid REFRESH doors#deck-lid
2022-06-26 10:45:54.289 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:doors#rooftop REFRESH doors#rooftop
2022-06-26 10:45:54.298 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:doors#sunroof REFRESH doors#sunroof
2022-06-26 10:45:54.307 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:lock#doors REFRESH lock#doors
2022-06-26 10:45:54.316 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:lock#deck-lid REFRESH lock#deck-lid
2022-06-26 10:45:54.325 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:lock#flap REFRESH lock#flap
2022-06-26 10:45:54.335 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:windows#driver-front REFRESH windows#driver-front
2022-06-26 10:45:54.344 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:windows#driver-rear REFRESH windows#driver-rear
2022-06-26 10:45:54.368 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:windows#passenger-front REFRESH windows#passenger-front
2022-06-26 10:45:54.404 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:windows#passenger-rear REFRESH windows#passenger-rear
2022-06-26 10:45:54.441 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:location#heading REFRESH location#heading
2022-06-26 10:45:54.477 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:image#image-data REFRESH image#image-data
2022-06-26 10:45:56.555 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:image#image-view REFRESH image#image-view
2022-06-26 10:45:56.566 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:image#clear-cache REFRESH image#clear-cache
2022-06-26 10:45:56.574 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:lights#interior-front REFRESH lights#interior-front
2022-06-26 10:45:56.583 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:lights#interior-rear REFRESH lights#interior-rear
2022-06-26 10:45:56.592 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:lights#reading-left REFRESH lights#reading-left
2022-06-26 10:45:56.601 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:lights#reading-right REFRESH lights#reading-right
2022-06-26 10:45:56.609 [INFO ] [g.mercedesme.internal.VehicleHandler] - Received mercedesme:hybrid:7000:A250e:lights#light-switch REFRESH lights#light-switch
2022-06-26 10:46:54.872 [WARN ] [g.mercedesme.internal.VehicleHandler] - Error getting data java.io.EOFException: HttpConnectionOverHTTP@bf2762::DecryptedEndPoint@38f90f{l=/192.168.0.101:49754,r=api.mercedes-benz.com/159.122.71.196:443,OPEN,fill=-,flush=-,to=1284717/0}
things:
Bridge mercedesme:account:7000 "MercedesMe" [ clientId="3xxxxxxxxxxxxxxxxxxxxxxxxxxxe", clientSecret="exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxm", imageApiKey="exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc", callbackIp="192.168.0.101", callbackPort=8090, odoScope=true, vehicleScope=true, lockScope=true, fuelScope=true, evScope=true] {
Thing hybrid A250e "Mercedes A250e" [ vin="Wxxxxxxxxxxxxxxxxxxxx0", refreshInterval=5, background=false, night=false, cropped=false, roofOpen=false, format="webp"]
}
EDIT: from the mainUI things, it seams that some of the configuration is running.
Configuration seen from mainUI
Thanks Mads
As far as Iâve observed itâs a one time limit as described. For images I called the API more than 5 times so I was able to get a full image set of my vehicle. But I needed to test the image caching and after a while I got 429
http responses.
Day change doesnât reset the counter, regeneration of Image API key also doesnât help.
Yes, I updated readme description to make it more clear
Everything right on yor side. Thereâs a bug in my code when Bridge is initialized the first time. I fixed it already in the Marketplace version.
For you I think simply deactivate
and activate
your Account Bridge should do the trick. Itâll not go online
but should forward you to the last setup step - the manual authorization
EDIT
One important note
If you share one Mercedes Developer project between the script solution by spawny0815 AND this binding only one will work! The token delivered will not be exchanged between these solutions.
Cleanest way is to create a new MB Developer project for this binding.
HI weymann
I did the disable / enable in mainUI, after this the callback thing was available
Now everything worked as described in the readme, i cant test fully because the car is a the dealer for service, i guess when they start working on the car items will be updated
Thanks Mads
@weymann just to confirm that I got it working for my car
However I do have a couple of feedbacksâŠ
- I have a petrol engine car without pay as you go insurance. So during the thing creation, I manually de-selected the EV status, and pay as you go insurance status, in both the Mercedes project settings, and in the OH thing creation. However with those settings, the Authorization Workflow failed with an error that the selected functions did not match (even though they actually did match, albeit with fewer selected functions). I then re-selected the EV status, and pay as you go insurance status in both the project and the OH thing, and then the workflow succeeded. And finally after the workflow had succeed the OH binding itself âauto-magicallyâ disabled the EV status, and pay as you go insurance status; presumably because it had detected that those features donât actually apply to my car.
- Minor point: there are two channels
doors#deck-lid
andlock#deck-lid
; and when you use OH main UI to auto-create the respective Items, it shows a naming error because OH tries to create both Items with the same Item name. So perhaps you should use unique names if possible. (There may be other channels with the same issueâŠ)
Nice to hear it works!
Thereâs 100% no magic in this binding especially thereâs no way to autodetect the Mercedes Developer project - otherwise I would implement this. But I know this is procedure is error prone and itâs worth to double check each step.
- double check your configuration settings are saved
- after this open the callback page in order the right scopes are set
In order to make it more transparent the callback page shows now the selected scopes too.
I see. The channel naming is ok but UI is creating Items from thing label
and channel label
. Both deck-lid
channels had the same label and so you ran into this conflict. Solved now!
Hi @weymann
im getting this error every 20-30min
2022-06-28 00:23:53.552 [WARN ] [g.mercedesme.internal.VehicleHandler] - Error getting data java.io.EOFException: HttpConnectionOverHTTP@1799efb::DecryptedEndPoint@71ade4{l=/192.168.0.101:51094,r=api.mercedes-benz.com/159.122.71.196:443,OPEN,fill=-,flush=-,to=1284234/0}
Most items are working, i have been driving the car, open/close windows, mainlight swith etc. BUT
I donât get any data in:
Odometer
Interior Front Light
Interior Rear Light
Main Light Switch
@weymann I am already finding some proposed corrections to your code. => May I suggest that you open your code as a DRAFT PR, so that I can give you feedback via the normal PR review process rather than in this thread?
EDIT: for example if one stops and restarts OH, then one must then disable and re-enable the MercMe account thingâŠ
If you enable logging log:set DEBUG org.openhab.binding.mercedesme
youâll see the API responses directly. For lights Iâve nearly the same status, Main light was included before but data vanished after certain point of time, never got any feedback for interior lights.
For odometer Iâm wondering a bit. Pls enable debug and check if some some Response 204
are occuring.