BMW ConnectedDrive component

That was exactly my intention as mentioned in that issue on Github :wink:
We’ll see if we get that working.

Good to see the camera config is working. It’s a nice addon :grinning:

Now we kind of need to document the camera config somewhere though (it’s hard to set up, with the templates and everything). Maybe in the device_tracker docs?
I don’t think that it really fits anywhere else?

Yes. I have this TAG: lscType is “NOT_SUPPORTED”

Yes indeed, but I first have to make a PR for the device tracker, because currently the part which gets the heading (and rounds it to steps of 30 degrees) is not available in the code. When I will do that, I will also add the documentation.
Currently this is only available in the custom component.

1 Like

Since yesterday i had several errros in the log indicating an HTTP 400 code because there was no data available. When I login to the BMW Connected Drive website, I have a message indicating that the tracking of the vehicle is disabled and can only be activated in the car.

Using the ConnectedDrive app on iOS I’m still able to see the correct location of the car. Does anyone face a similar situation and might this be caused by the Home Assistant component?

I guess I’ve got the same problem. The location of my car didn’t change since yesterday, so there might be an issue with connected drive?

In the android bmw app, everything is fine.

2018-04-11 11:01:16 ERROR (MainThread) [homeassistant.components.binary_sensor] bmw_connected_drive: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 188, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/binary_sensor/bmw_connected_drive.py", line 101, in update
    self._state = not vehicle_state.all_windows_closed
  File "/home/homeassistant/.homeassistant/deps/lib/python3.6/site-packages/bimmer_connected/state.py", line 191, in all_windows_closed
    return len(list(self.open_windows)) == 0
  File "/home/homeassistant/.homeassistant/deps/lib/python3.6/site-packages/bimmer_connected/state.py", line 186, in open_windows
    return [lid for lid in self.windows if not lid.is_closed]
  File "/home/homeassistant/.homeassistant/deps/lib/python3.6/site-packages/bimmer_connected/state.py", line 42, in _func_wrapper
    raise ValueError('No data available!')
ValueError: No data available!

Just tested on the latest 0.67.0b1 and it all seems to work with the “region” instead of country and with my bmw i3. However since it is an electrical car, the remaining_fuel in liter shows up empty and so is the remaining_range_fuel…

Good to see it’s working with the new version.

I am working on adding information for electric cars via new (binary) sensors. That also means that only the applicable sensors will be shown, so no fuel sensors in your case :grinning:

It’s already available in the custom component and is tested right now so my plan is to add this to HA shortly.

1 Like

I deactivated and activated the option of GPS tracking in my car and for now the error is gone. Hopefully forever :smile:

Very cool. Looking forward to it!

Upgraded to 0.67.1, changed config by replacing country by region. Doesn’t put out any errors, but i don’t get any valid data. Was working somehow (ability to start heating and flash lights etc…) before 0.65.

No. Seems that new API only works for some user… :frowning:

@iz3man, @ezar
In HA 0.67 this PR is implemented which uses a different API to enable cars from outside of Europe to work as well.

There are some cases known were no (or not all) data is available with the new API, more info on that is here.
We will try to find a solution / workaround for this.

Hi gerard33
Opened a new issue here:


Hope it worked from my phone :slight_smile:
Thanks
Regards

Hi! I’m new here so forgive me if I made some stupid errors. I tried to install the component but it doesn’t show in the panoramic and if I see the log I see

“Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 223, in async_update_ha_state
device_attr = self.device_state_attributes
File “/config/custom_components/switch/bmw_connected_drive.py”, line 75, in device_state_attributes
‘last_update’: self._vehicle.state.timestamp.replace(tzinfo=None),
File “/config/deps/lib/python3.6/site-packages/bimmer_connected/state.py”, line 69, in _func_wrapper
raise ValueError(‘No data available!’)
ValueError: No data available!”

What can I do? Thank you!

Can you try the latest version of the custom_component from here?

The error in your log is caused by the switches script and that is not used anymore and replaced by services which will also be part of the new HA version.

Hi,

I’m running 0.67.1, but are missing the climate, horn and lights function, can I just add the custom component? Will this over ride the HA component or do I need to change something?

@gerard33 - the component is now working with my US BMW i3!!! Let me know if there is anything specific you’d like me to test.

@gerard33 - Can you add these attributes for an i3? Works perfectly.

In HA 0.68 two things are added for BMW ConnectedDrive component:

  • climate, horn and lights are added as a service

  • a unique_id is added so you can change the name of a device in the frontend (click on the cog wheel)
    Screenshot_10

Example script for the services:

bmw_airco:
  sequence:
    - service: bmw_connected_drive.activate_air_conditioning
      data:
        vin: '<your_17_char_vin>'
bmw_horn:
  sequence:
    - service: bmw_connected_drive.sound_horn
      data:
        vin: '<your_17_char_vin>'
bmw_light:
  sequence:
    - service: bmw_connected_drive.light_flash
      data:
        vin: '<your_17_char_vin>'
bmw_refresh:
  sequence:
    - service: bmw_connected_drive.update_state