BMW ConnectedDrive component

First time poster, long time lurker. I have been trying to avoid asking noob questions for the past week but I cannot get this set up for my MY2015 F15. My installation attempts have been both through HACS (by adding https://github.com/bimmerconnected/ha_custom_component in HACS) and manual (by copying github folders into custom_components).

I also installed the official bmw_connected_drive integration by simply adding my login/country/info in configuration.yaml. It looks like a consequence of my 3 different installation attempts resulted in two different ā€œBMW ConnectedDriveā€ integrations listed under Configuration -> Integrations.

I can see some services are listed and confirmed working, e.g. lock/horn/flash lights, but my problem is I cannot see ANY listed sensors or binary_sensors. The only bmw ā€œentityā€ listed in configuration entities is lock.x5_xdrive35d_lock. How do I get these sensors to show up? Do I need to be adding some entries under sensor: and binary_sensor: in my configuration.yaml? Iā€™m very new to this/HA with zero coding experience, so many thanks in advance!

Hi Sean, welcome to the community!

I would start by removing your instance from HACS and the custom_components directory and restart HA. Once restarted, confirm that anything BMW-related is gone.

Then, I would log into the BMW Connected Drive portal using your credentials. In my region, the URL is https://www.bmw-connecteddrive.co.uk. Once youā€™ve logged in, find a button called ā€œRemote Cockpitā€ and go there. Have a poke around in the remote cockpit and see what sensors your car is presenting.

If you donā€™t see any sensors (like door locks etc), itā€™s possible that your vehicle simply isnā€™t presenting them to ConnectedDrive, thus they wonā€™t be available to HA.

If you do see loads of sensors and controls, then we can start poking around in HA.

As an aside, how do you feel about your X5 as a car? My partner and I may need to replace our 1 Series with something larger in the near future and weā€™re giving some consideration to the X ranges. The X1, X2 and X3 seem too small for me, but the X5 is a big jump. Do you find itā€™s like throwing a barn around?

Hi Sean, as WhimsySpoon mentioned above you should not use the custom component from Github. We are using that one for development testing purposes only.

For installing the integration you can follow these instructions -> https://www.home-assistant.io/integrations/bmw_connected_drive/ as you already have used.

When your car doesnā€™t show any (binary) sensors and only the lock and services like horn etc are shown, it usually means the BMW API doesnā€™t provide us with the necessary data for that car. I see your car is from 2015? Based on other experiences that is too old to support this integration unfortunately.

Any errors in the HA logs when you (un)lock?

Is Remote Cockpit have a different name in the US? I canā€™t find that option anywhere @ connecteddrive.bmwusa.com after logging in. Also, to clarify, in addition to removing the beta BMW from HACS, when you say deleting the custom_component folders, you just mean the bmw folders, correct? Or are you saying remove the actual custom_component folder including my non-bmw folders and temporarily copy them somewhere while I troubleshoot? Should I also be removing and readding the official BMW integration by deleting/rebooting/readding my credentials from configuration.yaml?

Not a barn at all; I had the same opinion that the X3 et al felt, and looked, too small. I had a somewhat similar upgrade path as you in that I had several 3 series, but then decided to upgrade/go-bigger to the 5-series. I was happy with that transition, but then I jumped straight from the sedan lines to the X line with the X5 being the closest equivalent to what I was used to in the 5-series.

Ever since making the switch, I havenā€™t looked back. I love the X5ā€™s size and power. I also have the diesel engine so I get fantastic fuel economy and even better low-end torque. There are not a lot of diesel X5s in the US so I can easily catch other drivers off guard and just rocket away if I ever feel the need to put the pedal down. An added bonus is that the diesel N57 engine is rock-solid and has countless data points of being bulletproof and lasting forever. This would be a closer call if I had non-diesel and not only had to spend a fortune on gasoline but also lacked the low-end punchiness of the diesel. This is a long-winded way of saying I do not miss my sedans at all with my diesel X5!

Should those sensors, if available, automatically show up after adding my BMW credentials for the official integration in confirguration.yaml and a reboot? For what itā€™s worth, my actual BMW Connected mobile app shows things like remaining fuel, range, but unless Iā€™m mistaken, they only seem to update when my phone is inside the car and connected.

For me itā€™s also a little cumbersome to see some stuff and see it ā€œin actionā€ but what do you see when doing this:

Apologies, Sean. I should have been clearer. Only delete the BMW-related folder from custom_components. See @gerard33ā€™s comments below on how to configure this integration. You donā€™t need to install anything as itā€™s an actual integration shipped within HA.

I have to say that @gerard33 has done an amazing job on this component and itā€™s become so robust and reliable in recent months. Unfortunately the same cannot be said of the actual BMW Connected Drive service to which it talks, but that is beyond everyoneā€™s control!

Iā€™m afraid I donā€™t know what BMW USA call the Remote Cockpit (Iā€™m surprised it has a different name at all), but I have just gone to the US portal and notice that thereā€™s a picture of it running on a tablet on the login screen.

Itā€™s distinctly possible that itā€™s not giving you the option for Remote Cockpit at all if theyā€™ve decided that the vehicle is not new enough. As @gerard33 said, and based on your comments of what you can see in the mobile app, this just might not be possible on your particular vehicle.

Thanks for your advice on the X5. Itā€™s good to know that someone else has been on the same upgrade path. When all of this is over, Iā€™ll definitely take a look at it.

1 Like

If your car is supported the (binary) sensors will automatically show up. Based on what you mention that you only get updates on the app when the phone is in the car and connected, the sensors for your vehicle are not supported for this integration unfortunately.

Donā€™t use HACS for the installation (I think you meant the normal installation anyway as a test integration is only just added to HACS since a couple of days) but use the normal installation ā†’

Thanks for your kind words @WhimsySpoon. There are a lot of people helping to improve the bimmerconnected library and this integration luckily.

Ah! Sorry! I totally forgot that this was an actual component! Iā€™ve been spending too much time on custom components today. Iā€™ll edit my response accordingly.

Any one other has issues lastly to connect?

I have these issues since a while a lot. all seems to be working although I do not use it a lotā€¦


2020-06-27 22:40:30 ERROR (SyncWorker_18) [homeassistant.components.bmw_connected_drive] Could not connect to the BMW Connected Drive portal. The vehicle state could not be updated.
2020-06-27 22:40:30 ERROR (SyncWorker_18) [homeassistant.components.bmw_connected_drive] The BMW Connected Drive portal returned an error: UNAUTHORIZED (received status code 401 and expected 200).
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 141, in update
    self.account.update_vehicle_states()
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 251, in update_vehicle_states
    car.update_state()
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/vehicle.py", line 72, in update_state
    self.state.update_data()
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/state.py", line 130, in update_data
    params=params)
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 170, in send_request
    raise IOError(msg)
OSError: The BMW Connected Drive portal returned an error: UNAUTHORIZED (received status code 401 and expected 200).

image

I just added the official component, and my car was discovered and it added all of the entities, but I donā€™t see it under the integrations page. Is this expected?

Hi all, I aleady installed this component and Iā€™m a little bit confuesed regarding the lock status.
Iā€™m sending the lock.lock service to the car when Iā€™m home and the state is ā€˜onā€™. That works successfull. The car is locked but the alarm is not activated.
The binary_sensors instead doesnā€™t show this result. The BMW connected app neither
image
image

So if I have a trigger once per hour which asks for the lock status, the lock.lock service will be triggered everytime because there is no change in status.

Is there any possibility to get the information about the real car lock state?

Has anyone seen this error before? Canā€™t find any mention of it.

Failed to call service bmw_connected_drive/activate_air_conditioning. 'str' object has no attribute 'read_only'

Trying to call these services in HA (using vin), but get the same error every time.

bmw_connected_drive.activate_air_conditioning
bmw_connected_drive.light_flash
bmw_connected_drive.sound_horn

Would like to activate climate control using Siri, (94ah i3s), has anyone got this feature to work?

I have mine setup as a Script and works great for me

inside my scripts.yaml:

bmwclimate:
  alias: Activate Comfort Climate
  sequence:
  - data:
      vin: XXXXXXXXXXXXXX
    service: bmw_connected_drive.activate_air_conditioning

Getting same message, its something within HA:

Failed to call service script/bmwclimate. 'str' object has no attribute 'read_only'

Can you share your config of the BMW integration? Looks like you set the readonly option to true in which case you canā€™t access those services.

Contents of /config/configuration.yaml:

bmw_connected_drive:
  name:
    username: email address
    password: password
    region: north_america
    read_only: false

# HA BUTTON/BOOLEAN TO HAVE BUTTON IN HA TO CONTROL NODE-RED BMW CAR SCRIPT
input_boolean:
  bmw_connected_drive_activate_air_conditioning:
    name: bmw_connected_drive_activate_air_conditioning
    initial: off
    icon: mdi:car

Edit your post to remove your account details. And change your password ASAP.

1 Like

That looks good.
What happens if you call the service from HA with the default VIN from the example? See the picture below. That should give the following error in the log: Could not find a vehicle for VIN WBANXXXXXX1234567.

And can you remove the read_only item from the config? That is default set to false so no need for it and I want to be sure that this is not causing the error as that says no attribute 'read_only'.