Hyundai Bluelink Integration

Thanks! It works!

Thanks so much for the Bluelink Integration.

I have a 2020 Hyundai Santa Fe. I’m getting only integer latitude and longitude locations from the integration. I tried Node-RED Bluelinky and discovered that Bluelink is returning only integer latitude and longitude in the vehicle status information. But, when location is queried it provides the full latitude and longitude values. One wonders what’s the point of these integer values in the status or if this is a Bluelink defect. Anyway, would it make sense to specifically request the vehicle location in the integration?

We are tracking this over here: GEO Location data is truncated Hyundai USA · Issue #196 · fuatakgun/kia_uvo · GitHub

This is resolved now. Give it a go for the latest version if you have a chance!

Issue was a API issue. Two commands exist for location. The typical one only gives integer but a direct query gives exact. Odd USA hyundai thing.

1 Like

Hi, Amazing integration. I have two Hyundia’s One Kona and the other an Ioniq. When I activate and log on to the integration, I only get the Hyundia Kona and not the Hyndia Ioniq? Does the integration support 2 cars or is there any way to force the integration to choose/show the other car.

1 Like

Not now but @cdnninja is working on a solution. We would love to help someone to test though.

Hi. Great Job!!!
Is it posible to get it from you?
Thanks.

@eximo84, can you share your lovelace yaml-code with us?

Sure, here you go. Slightly changed mind and using some custom cards

type: vertical-stack
cards:
  - type: picture
    image: /local/ionqi.png
    tap_action:
      action: none
    hold_action:
      action: none
    card_mod:
      style: |
        ha-card {
          --ha-card-background: transparent;
          box-shadow: none;
        }
  - type: custom:stack-in-card
    mode: vertical
    keep:
      background: false
      border_radius: false
      box_shadow: false
      margin: false
      outer_padding: false
    cards:
      - type: glance
        entities:
          - entity: binary_sensor.ioniq_plugged_in
            name: Charger
          - entity: binary_sensor.ioniq_charging
            name: EV Battery
          - entity: sensor.ioniq_range_by_ev
            name: Range
        show_state: true
        show_name: true
        state_color: true
      - type: custom:bar-card
        icon: mdi:battery-charging
        entities:
          - entity: sensor.ioniq_ev_battery
        columns: '0'
        entity_row: false
        direction: right
        positions:
          icon: outside
          indicator: 'off'
          name: 'off'
          minmax: 'off'
          value: inside
        severity:
          - color: '#4CAF50'
            from: '60'
            to: '100'
          - color: '#FFC107'
            from: '25'
            to: '60'
          - color: '#FF5722'
            from: '0'
            to: '25'
      - type: glance
        entities:
          - entity: binary_sensor.ioniq_tire_pressure_all
            name: Tyre Pressure
          - entity: sensor.ioniq_car_battery
            name: 12v Battery
          - entity: sensor.ionqi_battery_capacity_remaining
            name: Capacity
        show_state: true
        show_name: true
        state_color: true
      - type: markdown
        content: ___
      - type: glance
        entities:
          - entity: sensor.ev_mileage_since_last_charge
            name: Trip
          - entity: sensor.ev_comsumption
            name: Consumption
          - entity: sensor.ioniq_odometer
            name: Odometer
        show_state: true
        show_name: true
        state_color: true
      - type: custom:button-card
        entity: sensor.ioniq_last_update
        show_last_changed: true
        styles:
          grid:
            - grid-template-areas: '"i n l"'
            - grid-template-rows: 100%
            - grid-template-columns: 25% 45% 30%
          label:
            - justify-self: start
          name:
            - justify-self: end
            - margin-right: 10%
        name: 'Last Updated:'
        aspect_ratio: 7/1
        tap_action:
          action: call-service
          service: kia_uvo.force_update

6 Likes

@eximo84 Thanks for the yaml. I build with your input a great view, too.
Can you discribe how you calculate the “miles between charges”. And can you share the code for this and the lovelace yaml too. I think a own binary sensor and an jinja template can do this, but I down’t know how.

So i have a couple of helpers which are used to store statistics:

  1. EV Mileage Since Last Charge Base = this is the current odometer value when the car is plugged in
  2. EV Total Mile since last charge = this is the value from the template sensor “sensor.ev_mileage_since_last_charge”
  3. EV Battery Size = Set to 38.8 for my car

I have the following template sensors setup which are then used to calculate current milage, current battery remaining etc…

- platform: template
  sensors:
    ev_mileage_since_last_charge: 
      value_template: "{{ states('sensor.ioniq_odometer') | int - states('input_number.ev_mileage_since_last_charge_base') | int }}"
    ionqi_battery_capacity_remaining:
      unit_of_measurement: "kWh"
      value_template: "{{ ((states('input_number.ionqi_battery_capacity') | float * states('sensor.ioniq_ev_battery') | float ) / 100) | round(1) }}"
    ev_comsumption:
      unit_of_measurement: "mi/kWh"
      value_template: "{{ (states('sensor.ev_mileage_since_last_charge') | float / ((states('input_number.ionqi_battery_capacity') | float - states('sensor.ionqi_battery_capacity_remaining') | float ))) | round(1) }}"

And here are my automations to update the helpers when the car is plugged in

alias: Update EV Mileage Stats
description: Updates mileage stats after EV charger is connected
trigger:
  - platform: state
    entity_id: binary_sensor.ioniq_plugged_in
    from: 'off'
    to: 'on'
condition: []
action:
  - service: input_number.set_value
    data_template:
      entity_id: input_number.ev_total_mileage_since_last_charge
      value: '{{states(''sensor.ev_mileage_since_last_charge'') | float }}'
  - service: input_number.set_value
    data_template:
      entity_id: input_number.ev_mileage_since_last_charge_base
      value: '{{states(''sensor.ioniq_odometer'') | float }}'
mode: single

Hope this helps

7 Likes

Someone here having issues with the location? Mine is not updating anymore.

check the location from your app. Sometimes, location is not being updated through force_update call (in a strange way)

Hi eximo84,

thanks for the input. With your hints I build the UI. And it looks great.
I will implement the automation for total_mileage_since_last_charge soon.

So here my current views and yamls

# lovelace yaml
type: vertical-stack
cards:
  - type: picture-entity
    entity: device_tracker.os_ev_czech_20_location
    image: http://xxxxxxxx/local/tmp/Hyundai-Kona.png
    name: Hyundai Kona
    show_name: true
    show_state: true
  - type: custom:bar-card
    entities:
      - entity: sensor.os_ev_czech_20_ev_battery
        name: Akkukapazität in Prozent
        animation:
          state: 'on'
        icon: mdi:car-battery
        color: '#161616'
        severity:
          - from: '25'
            to: '100'
            color: '#006600'
          - from: '15'
            to: '25'
            color: '#c1c100'
          - from: '0'
            to: '15'
            color: '#660000'
      - entity: sensor.os_ev_czech_20_ev_battery_kw
        min: '0'
        max: '64'
        animation:
          state: 'on'
        icon: mdi:car-battery
        color: '#212121'
        name: Akkukapazität
        complementary: false
        severity:
          - from: '20'
            to: '50'
            color: '#006600'
          - from: '10'
            to: '20'
            color: '#c1c100'
          - from: '0'
            to: '10'
            color: '#660000'
      - entity: sensor.os_ev_czech_20_range_by_ev
        name: Reichweite
        max: '396'
        min: '0'
        color: '#161616'
        severity:
          - from: '100'
            to: '500'
            color: '#006600'
          - from: '50'
            to: '100'
            color: '#c1c100'
          - from: '0'
            to: '50'
            color: '#660000'
    positions:
      icon: inside
      minmax: inside
    style: |-
      bar-card-iconbar {
        padding-left: 35px;
      }
      bar-card-value {
        padding-left: 1.5em;
      }
      bar-card-min {
        position: absolute;
        padding-left: 6px;
      }
      bar-card-max {
        position: absolute;
        padding-left: 91%;
      }
      bar-card-divider {
        display: none;
      }
      bar-card-currentbar, bar-card-backgroundbar {
        border-radius: 8px;
      }
  - type: grid
    square: false
    cards:
      - type: glance
        show_icon: true
        show_name: true
        show_state: true
        state_color: false
        theme: slate
        entities:
          - entity: binary_sensor.os_ev_czech_20_engine
            name: Motor
      - type: glance
        show_icon: true
        show_name: true
        show_state: true
        state_color: false
        theme: slate
        entities:
          - entity: binary_sensor.os_ev_czech_20_plugged_in
            name: Laden
      - type: glance
        show_icon: true
        show_name: true
        show_state: true
        state_color: false
        theme: slate
        entities:
          - entity: binary_sensor.os_ev_czech_20_charging
            name: Laden
      - type: button
        tap_action:
          action: toggle
        entity: lock.os_ev_czech_20_door_lock
        icon_height: 45px
        show_state: true
        name: Türen
        theme: slate
      - type: glance
        show_icon: true
        show_name: true
        show_state: true
        state_color: false
        theme: slate
        entities:
          - entity: binary_sensor.os_ev_czech_20_trunk
            name: Kofferraum
      - type: glance
        show_icon: true
        show_name: true
        show_state: true
        state_color: false
        theme: slate
        entities:
          - entity: binary_sensor.os_ev_czech_20_hood
            name: Motorhaube
      - type: glance
        show_icon: true
        show_name: true
        show_state: true
        state_color: false
        theme: slate
        entities:
          - entity: binary_sensor.os_ev_czech_20_tire_pressure_all
            name: Reifendruck
      - type: glance
        show_icon: true
        show_name: true
        show_state: true
        state_color: false
        theme: slate
        entities:
          - entity: binary_sensor.os_ev_czech_20_air_conditioner
            name: Klimaanlage
  - type: custom:mini-graph-card
    name: Akkukapazität der letzten 7 Tage
    align_icon: left
    hours_to_show: 168
    points_per_hour: 1
    upper_bound: 100
    lower_bound: 0
    entities:
      - entity: sensor.os_ev_czech_20_ev_battery
    show:
      labels: true
      animate: true
    color_thresholds:
      - value: 20
        color: '#00ff00'
      - value: 10
        color: '#ff0000'
  - type: custom:button-card
    entity: sensor.os_ev_czech_20_last_update
    secondary_info: last-changed
    show_last_changed: true
    name: 'Zuletzt aktuallisiert:'
    styles:
      grid:
        - grid-template-areas: '"i n l"'
        - grid-template-rows: 100%
        - grid-template-columns: 15% 58% 27%
      label:
        - justify-self: start
      name:
        - justify-self: end
        - margin-right: 40%

And I have a view for the daily driven kilometers. The custom:mini-graph-card can do this, but I have a second logic for this with the utility_meter integration. Here I make the change your hints for mileage_since_last_charge and an automation. Thanks therefore!

# lovelace yaml
type: vertical-stack
cards:
  - type: custom:mini-graph-card
    name: gefahrene Kilometer der letzten 7 Tage
    align_icon: left
    hours_to_show: 336
    points_per_hour: 1
    entities:
      - entity: sensor.os_ev_czech_20_odometer
        color: '#212121'
    show:
      labels: true
      animate: true
  - type: custom:mini-graph-card
    name: gefahrene Kilometer pro Tag
    align_icon: left
    hours_to_show: 336
    entities:
      - entity: sensor.os_ev_czech_20_ev_daily_odometer
        show_graph: false
      - entity: sensor.os_ev_czech_20_odometer
    aggregate_func: delta
    group_by: date
    show:
      graph: bar
    color_thresholds:
      - value: 0
        color: '#383C45'
      - value: 1
        color: '#161616'
  - type: custom:mini-graph-card
    name: gefahrene Kilometer pro Tag
    align_icon: left
    hours_to_show: 168
    entities:
      - entity: sensor.os_ev_czech_20_ev_daily_odometer
        show_graph: false
      - entity: sensor.os_ev_czech_20_ev_daily_odometer
    aggregate_func: delta
    group_by: date
    show:
      graph: bar
    color_thresholds:
      - value: 0
        color: '#383C45'
      - value: 1
        color: '#161616'
# configuration.yaml
utility_meter:
  os_ev_czech_20_ev_daily_odometer:
    source: sensor.os_ev_czech_20_odometer
    name: "OS EV CZECH 20 EV Daily Odometer"
    cycle: daily
  os_ev_czech_20_ev_monthly_odometer:
    source: sensor.os_ev_czech_20_odometer
    name: "OS EV CZECH 20 EV Monthly Odometer"
    cycle: monthly
3 Likes

So i use card-mod to remove the name from picture-entity card like so:

My graph isnt ideal, i tried mini-graph but it averages my values and i dont want that. I am using apex-chart but i only want to plot a point on the graph each time the mileage between charges changes, currently it will fill in a months worth but can duplicate if it doesnt change regularly.

1 Like

Hello All,
I have installed this integration via HACS, however I am not able to find configuration UI anywhere? Can someone help and guide me how to access/configure this integration - where I have to put username and password for BlueLink account?
Thank you!

Have you checked integrations page to add the integration? After downloading custom integration over hacs, you need to setup over here;

Yes, I was checking this but was not showing. However I did restart of HA, removal of intagration and afterwards installed it again and all worked. Thanks!

Hi, Thanks for the integration. Would you happen to know why I get only these entities for my 21’ Kona Electric. These are not that helpful and I’ve seen that Ioniq and Ioniq 5 integrations at least give useful stuff out (like SOC, or even some controls).

The only control I have is door lock…

I would say create a GitHub issue and dump your data sensor attributes into it. we had noticed slight differences between API responses for different cars and models.

1 Like