BMW ConnectedDrive component

so what are you saying? i need to connect with BT/USB first to the car with the “connected app”
, then it will upload data to the portal, that information then can be downloaded to HA with this platform ?

Negative, I was just thinking that maybe the reason that you can send the navigation input from your phone is because you were connected via Bluetooth or USB to the car at the time.

I recently purchased a 1 Series from new and I wanted to ensure that it would be able to speak to HA. All of my investigations concluded that in order to retrieve the data, I’d need to have the Remote Services option added to ConnectedDrive for it to work properly.

ok, i think its too expensive for just the information we want :frowning:

In the US, subscriptions sometimes go on sale, e.g. Black Friday $30 deal a while back. Check your emails from BMW regularly (or sign up for emails) and maybe you’ll catch a good deal.

Ok, thnx. Good idea

@gerard33 Outstanding work on the changes that went into 0.98.0!

My log is now much cleaner and the errors that are there are more detailed. I still have to restart a few times when I restart HA, but as suspected, this is a BMW rather than a component issue; it seems that their web services often respond with 404s, 503 etc.

1 Like

The component released in version 98 is looking good. I can see the sunroof state even when it’s tilted open. Great!

I see there are some new icons on the overview, those are nice, too.

Re: maxfuel sensor. It still doesn’t have a unit attached. On my i3, this shows 8. Just 8. Not eight gills or 8 cups or 8 cubic centimeters. Just 8. My guess is this is 8 liters, because my fuel remaining sensor shows 2 (Imperial, not US*) gallons – and I think the tank is full – and with one significant figure, there’s 4 liters/gallon. This sensor should have a unit attached, and converted to the user’s units when required.

*This is another separate, unrelated, but significant bug in Home Assistant itself: US units of measure are not supported, only Imperial and SI. And particularly in volume units, these measures are meaningfully different.

Im also running the 98.1 but I still get lots of errors in the log when I try to add my F11:

remote services are booked and the app on my iPhone works as intended.

2019-08-30 22:15:40 ERROR (MainThread) [homeassistant.setup] Error during setup of component bmw_connected_drive
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 172, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 49, in setup
    accounts.append(setup_account(account_config, hass, name))
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 77, in setup_account
    cd_account = BMWConnectedDriveAccount(username, password, region, name, read_only)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 127, in __init__
    self.account = ConnectedDriveAccount(username, password, region)
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 55, in __init__
    self._get_vehicles()
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 192, in _get_vehicles
    logfilename='vehicles')
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 136, in send_request
    raise IOError(msg)
OSError: The BMW Connected Drive portal returned an error: SERVER_ERROR (received status code 500 and expected 200).

bmw_connected_drive:
  name:
    username: !secret bmw_cd_user
    password: !secret bmw_cd_pw
    region: rest_of_world
    read_only: true

anyone an idea what im doing wrong?

This is caused by the Connected Drive portal not being able to process the request correctly. Just restart HA a few times until it works. Check this post as well → BMW ConnectedDrive component - #464 by WhimsySpoon

Great to hear the sunroof is working correctly now :grinning:
Can you make an issue on bimmer_connected Github for the maxfuel sensor including a screenshot of the entity with it’s attributes? Looks like that sensor is not setup with a unit yet.

Did it.

Also, what do you think of unit “%” for HV battery (charging_level_hv)? It seems to be possible in general. E.g., the component for Epson Ecotank printers shows the remaining ink levels as %.

Thanks. Yes the percentage for charging_level_hv can be added.
Have some more questions on other sensors added to the GH issue.

Can I request that we NOT add % sign? I use the battery level in some notification automations inside NodeRED and I need it to be a number only for it to work. Perhaps a separate sensor that includes % sign could be created so we can choose which one we need for our HA?

This will be no issue as the state of the entity will stay the same. I will just add an unit of measurement attribute to the entity. HA uses that to show it in the frontend, but the state will not have the % so you can still use Nodered :smile:

Is it possible to get the turn on remote climate functionality or is that available in the apis?
3D remote view would also be nice :wink:

The remote climate service is already supported, the howto is described in the docs -> https://www.home-assistant.io/components/bmw_connected_drive/

My bad, I actually forgot I already set that up :sweat_smile:
Is it possible to actually get confirmation back that did execute successfully? Would be nice to set up a notification with simplePush to say hey this is done (because it fails sometimes even in the BMW app)

@gerard33 Would it be possible to include some retry login in the start up of the component?

I know this isn’t an issue with the component, rather BMW’s unreliable web service, but its painful if I need to restart HA because I’ve made a change to my config (totally unrelated to this component), only to find that I need to restart it another couple of times just to get a good connection to their web service.

I was thinking of that myself as well and checked it on Discord and that’s indeed possible.
Will do some testing and make a PR for this.

3 Likes

That’s great news, thanks! Happy to assist with any testing.