MyBMW Binding

It’s time to distribute the first drop of the MyBMW binding. Since weeks the BMW ConnectedDrive binding users (and me) are recognizing shutdowns of several APIs:

  • Last Drive Statistics
  • Lifetime Statistics
  • Navigation Destinations
  • Remote Commands like Flash Lights & Lock Car
  • Charging Profile
  • Some pictures are not working anymore

Approx. one year ago BMW replaced ConnectedDrive with MyBMW App. This binding shall reflect MyBMW functionality into openHAB. Nearly everything changed under the hood and also the provided data changed:

  • Statistics for lifetime and last drive => not present anymore
  • Navigation Destinations => not present anymore
  • Several channels like SoC_Max, remaining charging time, … => not present anymore
  • Charge Statistics => new
  • Charge Sessions => new
  • Tire Pressures => new

Please give it a try and I highly appreciate your honest feedback!
Bundles (jar & kar) can be downloaded from my github drop repo. Version 3.3 is working in my personal environment OH3.1.

Special shout out to the bimmer_connected project! Without this great work I’m pretty sure development would take months longer!

7 Likes

Thanks for your work Bernd!
I think it´s really frustating what BMW is doing with the ConnectedDrive functionality.
My F30 from 11/2017 feels like an 10 year old car after switching to the MyBMW app.
Most of the features i used daily are missing or moved behind multiple pages inside the app.

Hi Bernd,
would it make sense to test it for a non eletric BMW? I’d test the “Fahrzeug finder”, “Belüftungstimer” and “Tankfüllstand” features if supported by your app.
Cheers
Marco

Great! :slight_smile:

But how/what to configure with this binding? Is it the same as ConnectedDrive binding, or is it completely new?

Sure, please test any car. Unit tests are covering API fingerprints for

  • 4 combustion
  • 5 plugin-hybrid
  • 3 electric

vehicles. So in principle it should work. If there’s a problem it needs to be analyszed!

Your vehicle data fingerprint is printed each time the Discovery Scan is executed for debug purpose.

Slightly different.

Bridge needs your MyBMW App login user and password. Advanced settings provides language which is AUTODETECT by default.You can overwrite this with any language you want and see if the result is appropriate.

In vehicle only change possibility is refreshInterval - vin and brand needs to match to your vehicle.

Great, works fine for me, so far!

But, a general question; before, I used some old script based bmw interface in oh (probabaly the first available one, since I have had i3’s for quite some time now). In that setup I had a switch “Climate Now”, that I used frequently. I suspect that might be possible with the “Remote Service Command” but how?

Channel remote command contains these options.
image

Unfortunately I’ve to apply a small fix for `Climate & Charge now. But I think this will be fixed soon! Stop currently not wokring for me!

OK, no worries about the fix. But what is the syntax doing that? I suppose I need to create a rule, that sends this, right? Do I just sent “Climate Control”, and that is interpreted as start now? Or is there a “Climate Control” “ON” or “OFF”?
Sorry for the basic questions… :smile:

Many thanks to @weymann for creating the new binding for the new BMW app/api. Hopefully BMW will add the missing features from the former app to the new one step by step.

First tests with my PHEV (BMW X1) are very successful, so it seems the new binding works very well.

  • Charging and connector status, door and window status, fuel and battery status, fuel-battery-hybrid range, location, charging history and service interval information work very well.
  • Air pressure values for tires aren’t shown in my case, but these values are also not shown in the original BMW app. So I assume my car simply doesn’t provide this information.
  • As I don’t use charging profiles I can’t test them.

So far I found only one suggestion about (further) improvement:

  • Change item type of window and door status items from STRING to CONTACT with value OPEN / CLOSED

Finally again many thanks for your efforts with the BMW bindings.

I’m very new to OH (installed OH only this week) and still learning to use it. I found the BMW Connected Drive binding and managed to get it working. Only now I noticed this MyBMW binding so I will install it soon.

I have G21 330e. One thing which is missing in the official Android app is the ability to change the maximum charging current. Would it be possible to add this feature to this binding?

I can say that this BMW binding is really awesome, many thanks for your efforts.

As I’m very new to OH how to install this binding (manually)?

EDIT: Managed to install it and I can see the items populated. Really awesome, many thanks!

This is exactly where I’m struggeling a bit:

  • In ConnectedDrive it was just able to start climate-control, not stop!
  • I added the controls for start / stop - starting works, stopping refuses to work
  • In MyBMW App I’m also only able to start climate control

Does anyone have the ability to stop climate control via MyBMW App? And if yes cross check with the binding functionality?

I already thought about Door & Window Status as Contact. BMW API is returning Strings as status and in the old API some additional values besides OPEN / CLOSED were reported

  • intermediate for partial open windows
  • invalid for not present doors or immoveable windows

So yes, Conatct Channel looks fine reporting the status, but String keeps a bit more openness for additional values.

1 Like

Currently it’s not possible. Also in the data structures I cannot find a value which can be changed.

@weymann thanks for all your work, sorry but I can’t get this binding working in openhab 3.2.0 and I assume it should? Every time the binding attempted discovery it shows blank [].
Hopefully the following is useful but I wouldn’t be surprised if these bits are insignificant:
The first time I dropped it in the addons folder and added the bridge thing, I saw this warning (couldn’t get it to show after the first time):

[WARN ] [ing.mybmw.internal.handler.MyBMWProxy] - Authorization Exception: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

I also saw unsatisfied dependencies (only the first time I installed)

Dependency not satisfied: $000
Dependency not satisfied: $001
Dependency not satisfied: $002
Dependency not satisfied: $003
Not all dependencies satisfied, cannot activate

But then it looked as though these were satisfied maybe?

For dependency $000, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.io.net.http.HttpClientFactory, org.openhab.core.io.net.http.WebSocketFactory}={service.id=706, service.bundleid=176, service.scope=bundle, component.name=org.openhab.core.io.net.http.internal.WebClientFactoryImpl, component.id=77}] service: [null]]]
For dependency $001, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.thing.type.DynamicStateDescriptionProvider, org.openhab.binding.mybmw.internal.handler.MyBMWOptionProvider}={service.id=1613, service.bundleid=234, service.scope=bundle, component.name=org.openhab.binding.mybmw.internal.handler.MyBMWOptionProvider, component.id=375}] service: [null]]]
For dependency $002, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.i18n.TranslationProvider, org.openhab.core.i18n.LocaleProvider, org.openhab.core.i18n.LocationProvider, org.openhab.core.i18n.TimeZoneProvider, org.openhab.core.i18n.UnitProvider}={location=52.43452377764607,-1.4680055156350138,81, service.id=647, service.bundleid=151, service.scope=bundle, component.name=org.openhab.core.internal.i18n.I18nProviderImpl, language=en, service.config.label=Regional Settings, measurementSystem=SI, component.id=20, timezone=Europe/London, service.config.category=system, region=GB, service.config.description.uri=system:i18n, service.pid=[org.openhab.i18n, org.openhab.i18n]}] service: [null]]]
For dependency $003, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.i18n.TranslationProvider, org.openhab.core.i18n.LocaleProvider, org.openhab.core.i18n.LocationProvider, org.openhab.core.i18n.TimeZoneProvider, org.openhab.core.i18n.UnitProvider}={location=52.43452377764607,-1.4680055156350138,81, service.id=647, service.bundleid=151, service.scope=bundle, component.name=org.openhab.core.internal.i18n.I18nProviderImpl, language=en, service.config.label=Regional Settings, measurementSystem=SI, component.id=20, timezone=Europe/London, service.config.category=system, region=GB, service.config.description.uri=system:i18n, service.pid=[org.openhab.i18n, org.openhab.i18n]}] service: [null]]]

I of course tried restarting openhab with a clean cache, re-installing the binding, re-adding the thing, manually adding my vehicle with its vin. Everything I tried resulted in the same empty discovery []

OK, thanks for the info.

I can start/stop climate in my 330xe using the Android app.

When trying Add Items from Thing only item I can see in the list for climate is A/C at Departure Time (see attached screen copy).

Thanks a lot for all your effort! It is working great for me.

I noticed these topics:

  • range#electric is showing the fuel range

  • range#fuel is showing the hybrid range just like range#hybrid

Regarding the tire pressure:
If you add this to the item label it is showing the pressure: [%.1f %unit%]

The mapping of the command seem to be dirrerent now.
I had this mapping: mappings=["lock"=" Zu ", "unlock"=" Auf ", "light"="Blinken", "horn"=" Hupe ", "climate"="Klima"]

Can someone tell me the correct one?

Same for the ImageView. This is not working anymore: mappings=["Default"="Standard", "Front"="FRONT", "Rear"="REAR", "Side"="SIDE", "Dashboard"="DASHBOARD", "Driverdoor"="DRIVERDOOR"]

Hi, Using the latest Binding for me Start and Stop Climate works just fine …Thanks a lot for your effort…
Let me know if I shall provide more detailed information.
Service Execution State: Climate Now Stop Executed

1 Like

Phew, this looks tricky.
Shall run for OH3.2, I build against newest git branch 3.3 which works for 3.1 as I can see from the responses.

Don’t worry here. I get this also rarely - seems to be an async issue. First vehicle update may fail but after that it recovers.

Never seen that before. I can imagine you see this only after dropping the bundle into addons folder. Seems to be a problem in the basic class creation. But in this case I wonder you receive an empty response instead of a real error.

I put some more info messages in the newest bundles, especially during creation. Perhaps this helps a bit more. You can send me the logs via direct message in order not to create a full debug session here. If we find the problem we can post the solution.

1 Like