ConnectedCar Binding myAudi, Volkswagen, VW ID, Skoda, Enyaq, Seat, Ford, WeCharge

Did you setup privacy correct?

Yes. And as per the logs above, if privacy was set, then I wouldnā€™t be getting my vehicle location coming through on the API call. Itā€™s the correct vehicle position coming into OH, just no channel being created.

Iā€™m wondering whether this is the bug:

Latitudes and longitudes are only valid if theyā€™re positive, but that would mean this doesnā€™t work for anyone west of Greenwich, including the entire US. So Iā€™d find it hard to believe Iā€™d be the first person to encounter this.

Anyway, I have absolute no idea how I would go about building this and testing it, and given the author seems to have dropped off, I suspect Iā€™m stuffed.

jepp, seems the wrong way to test whether the position is valid, even 0,0 would be a valid position (at least for a ship, as itā€™s ā€œunder Ghanaā€ an ā€œleft to Gabunā€ in the Atlantic Ocean).

Right, after much mucking about having to install Java stuff (shudder), I got the damn thing to build and switched it to checking if anything but 0, which seems to have fixed it. And that then opens up a heap more bugs in the OpenStreeMap resolution (I turned it off in the Thing).

I picked what I thought was the latest branch from @Wolfgang_Rosenauer 4.1.x-connectedcar. I donā€™t know if this is right, and I can see that branch itself out of date from the OH monorepo. My fork is here, and Iā€™ve put my build here.

If somebody gives me idiot-level instructions of what needs to be done, Iā€™m willing to sacrifice myself to the OH keepers and create a PR into the main repo or whatever needs to be done to put this into the market.

So I donā€™t know if Iā€™m looking at the latest code, but assuming I am, can anyone explain what this is hoping to achieve:

Itā€™ll take the object for climate (same pattern used for all entities), and turn it into JSON for sending. Brilliant, itā€™s the penultimate line Iā€™m struggling with. What I believe it is doing is finding any instances of ā€œcarCapturedTimestampā€ (which exists) and replaces it with the entire JSON string again, which leads to some right borked JSON which then fails. Looks like a lot of effort has gone into doing something, but clearly it shouldnā€™t be this.

I started using CarConnectivity since 2 weeks because I was not able to get it to work with this binding. This service delivers the data via MQTT (or even via a webinterface). The developer will integrate several brands in the future (for now VW, Skoda, Seat, Cupra).

I also created a small widget to display some info (still wip). You can click on some numbers to get basic graphs.


uid: car_widget_v2
tags:
  - VW
props:
  parameters:
    - context: item
      default: mqtt_id7_soc
      description: soc
      label: soc
      name: itemSOC
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_range
      description: range
      label: range
      name: itemRange
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_lastUpdate
      description: last update
      label: last update
      name: itemLastUpdate
      required: true
      type: TEXT
    - context: item
      default: id7-side-left
      description: image
      label: image
      name: itemImage
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_odometer
      description: odometer
      label: odometer
      name: itemOdometer
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_connected
      description: connected
      label: connected
      name: itemConnected
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_windows
      description: windows
      label: windows
      name: itemWindows
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_doors
      description: doors
      label: doors
      name: itemDoors
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_doors_lock
      description: doors lock
      label: doors lock
      name: itemDoorsLock
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_clima_temp
      description: climate temperature
      label: climate temperature
      name: itemClimaTemp
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_clima_window
      description: climate window
      label: climate window
      name: itemClimaWindow
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_clima_seat
      description: climate seat
      label: climate seat
      name: itemClimaSeat
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_is_active
      description: is active
      label: is active
      name: itemIsActive
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_state
      description: state
      label: state
      name: itemState
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_charging_state
      description: charging_state
      label: charging_state
      name: itemChargingState
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_charging_type
      description: charging_type
      label: charging_state
      name: itemChargingType
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_charging_power
      description: charging_power
      label: charging_power
      name: itemChargingPower
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_charging_rate
      description: charging_rate
      label: charging_rate
      name: itemChargingRate
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_charging_connector_connection_state
      description: charging_connector_connection_state
      label: charging_connector_connection_state
      name: itemChargingConnectorConnectionState
      required: true
      type: TEXT
    - context: item
      default: mqtt_id7_charging_connector_lock_state
      description: charging_connector_lock_state
      label: charging_connector_lock_state
      name: itemChargingConnectorLockState
      required: true
      type: TEXT
timestamp: Mar 4, 2025, 11:04:30 AM
component: f7-card
config:
  class:
    - no_padding
    - no_margin
  style:
    border-radius: var(--f7-card-expandable-border-radius)
    box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.1)
    margin-left: 5px
    margin-right: 5px
    noShadow: false
    padding: 0px
  title: ID.7
slots:
  default:
    - component: f7-block
      config:
        style:
          display: flex
          flex-direction: row
          position: absolute
          right: 0px
          top: 0px
      slots:
        default:
          - component: oh-button
            config:
              action: popup
              actionModal: page:id7_location
              color: gray
              iconF7: map_fill
              iconSize: 18
              outline: false
              round: true
              style:
                margin-right: -10px
                margin-top: 5px
              visible: true
          - component: oh-button
            config:
              action: popup
              actionModal: widget:energy_control
              actionModalConfig:
                itemPrefix: Onkyo
              color: gray
              iconF7: gear_alt_fill
              iconSize: 18
              outline: false
              round: true
              style:
                margin-right: -10px
                margin-top: 5px
              visible: true
    - component: f7-row
      config:
        style:
          align-items: left
          justify-content: left
          margin-left: 10px
          margin-top: 10px
        visible: true
      slots:
        default:
          - component: oh-icon
            config:
              color: white
              height: 30
              icon: iconify:mdi:battery-60
              style:
                margin-right: 10px
          - component: Label
            config:
              style:
                font-size: 17px
                font-weight: 700
                margin-left: 0px
              text: Battery
    - component: f7-row
      config:
        style:
          align-items: center
          justify-content: center
          margin-left: 20px
          margin-top: 10px
        visible: true
      slots:
        default:
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: '=items[props.itemSOC].numericState < 25 ? "red" :
                      items[props.itemSOC].numericState < 70 ? "orange" :
                      "green"'
                    height: 30
                    icon: '=items[props.itemSOC].numericState < 25 ? "iconify:mdi:battery-low" :
                      items[props.itemSOC].numericState < 70 ?
                      "iconify:mdi:battery-medium" : "iconify:mdi:battery-high"'
                    style:
                      margin-right: 10px
                - component: oh-link
                  config:
                    action: analyzer
                    actionAnalyzerChartType: ""
                    actionAnalyzerCoordSystem: time
                    actionAnalyzerItems: =[props.itemSOC]
                    color: white
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemSOC].numericState + '%'
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: '=items[props.itemSOC].numericState < 20 ? "red" :
                      items[props.itemSOC].numericState < 70 ? "orange" :
                      "green"'
                    height: 30
                    icon: '=items[props.itemSOC].numericState < 20 ? "iconify:mdi:gauge-empty" :
                      items[props.itemSOC].numericState < 45 ?
                      "iconify:mdi:gauge-low" :
                      items[props.itemSOC].numericState < 70 ?
                      "iconify:mdi:gauge" : "iconify:mdi:gauge-full"'
                    style:
                      margin-right: 10px
                - component: oh-link
                  config:
                    action: analyzer
                    actionAnalyzerChartType: ""
                    actionAnalyzerCoordSystem: time
                    actionAnalyzerItems: =[props.itemRange]
                    color: white
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemRange].numericState + 'km'
    - component: f7-row
      config:
        style:
          align-items: left
          justify-content: left
          margin-left: 10px
          margin-top: 10px
        visible: "=items[props.itemChargingState].state == 'OFFF' ? 'false' : 'true'"
      slots:
        default:
          - component: oh-icon
            config:
              color: white
              height: 30
              icon: iconify:mdi:electric-charger
              style:
                margin-right: 10px
          - component: oh-link
            config:
              action: variable
              actionVariable: showCharging
              actionVariableValue: "=vars.showCharging == false ? true : false"
              color: white
              style:
                font-size: 17px
                font-weight: 700
                margin-left: 0px
              text: Charging
    - component: f7-row
      config:
        style:
          align-items: center
          justify-content: center
          margin-left: 20px
          margin-top: 10px
        visible: "=items[props.itemChargingState].state == 'OFF' || vars.showCharging ==
          false ? 'true' : 'false'"
      slots:
        default:
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: '=items[props.itemChargingPower].numericState > 0 ? "green" : "gray"'
                    height: 30
                    icon: '=items[props.itemChargingType].state == "ac" ?
                      "iconify:mdi:ev-charger-type2" :
                      items[props.itemChargingType].state == "dc" ?
                      "iconify:mdi:ev-charger-ccs2" : "iconify:mdi:ev-charger"'
                    style:
                      margin-right: 10px
                - component: oh-link
                  config:
                    action: analyzer
                    actionAnalyzerChartType: ""
                    actionAnalyzerCoordSystem: time
                    actionAnalyzerItems: =[props.itemChargingPower]
                    color: white
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemChargingPower].numericState + 'kW'
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: '=items[props.itemChargingRate].numericState > 0 ? "green" : "gray"'
                    height: 30
                    icon: iconify:mdi:camera-timer
                    style:
                      margin-right: 10px
                - component: oh-link
                  config:
                    action: analyzer
                    actionAnalyzerChartType: ""
                    actionAnalyzerCoordSystem: time
                    actionAnalyzerItems: =[props.itemChargingRate]
                    color: white
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemChargingRate].numericState + 'km/h'
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: '=items[props.itemChargingConnectorConnectionState].state == "connected"
                      ? "green" : "gray"'
                    height: 30
                    icon: '=items[props.itemChargingConnectorConnectionState].state == "connected" ?
                      "iconify:mdi:power-plug" : "iconify:mdi:power-plug-off"'
                    style:
                      margin-right: 10px
                      margin-left: 10px
                - component: oh-icon
                  config:
                    color: '=items[props.itemChargingConnectorLockState].state == "OPEN" ? "gray" :
                      "green"'
                    height: 30
                    icon: '=items[props.itemChargingConnectorLockState].state == "OPEN" ?
                      "iconify:mdi:lock-open" : "iconify:mdi:lock"'
                    style:
                      margin-right: 10px
    - component: f7-row
      config:
        style:
          align-items: center
          justify-content: center
          margin-left: 20px
          margin-top: 10px
        visible: "=items[props.itemChargingState].state == 'OFFF' ? 'false' : 'false'"
      slots:
        default:
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: '=items[props.itemChargingConnectorConnectionState].state == "connected"
                      ? "green" : "gray"'
                    height: 30
                    icon: '=items[props.itemChargingConnectorConnectionState].state == "connected" ?
                      "iconify:mdi:power-plug" : "iconify:mdi:power-plug-off"'
                    style:
                      margin-right: 10px
                - component: oh-link
                  config:
                    color: white
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemChargingConnectorConnectionState].state
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: '=items[props.itemChargingConnectorLockState].state == "OPEN" ? "gray" :
                      "red"'
                    height: 30
                    icon: '=items[props.itemChargingConnectorLockState].state == "OPEN" ?
                      "iconify:mdi:lock-open" : "iconify:mdi:lock"'
                    style:
                      margin-right: 10px
                - component: oh-link
                  config:
                    color: white
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemChargingConnectorLockState].state
    - component: f7-row
      config:
        style:
          align-items: left
          justify-content: left
          margin-left: 10px
          margin-top: 10px
        visible: true
      slots:
        default:
          - component: oh-icon
            config:
              color: white
              height: 30
              icon: iconify:mdi:temperature-lines
              style:
                margin-right: 10px
          - component: oh-link
            config:
              action: variable
              actionVariable: showClimate
              actionVariableValue: "=vars.showClimate == false ? true : false"
              color: white
              style:
                font-size: 17px
                font-weight: 700
                margin-left: 0px
              text: Climate
    - component: f7-row
      config:
        style:
          align-items: center
          justify-content: center
          margin-left: 20px
          margin-top: 10px
        visible: "=vars.showClimate == false ? true : false"
      slots:
        default:
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: gray
                    height: 30
                    icon: iconify:mdi:temperature
                    style:
                      margin-right: 10px
                      margin-left: 15px
                - component: oh-link
                  config:
                    color: gray
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemClimaTemp].numericState + 'Ā°C'
                - component: oh-icon
                  config:
                    color: '=items[props.itemClimaWindow].state == "ON" ? "green" : "gray"'
                    height: 30
                    icon: iconify:mdi:car-defrost-front
                    style:
                      margin-right: 10px
                      margin-left: 40px
                - component: oh-icon
                  config:
                    color: '=items[props.itemClimaSeat].state == "ON" ? "green" : "gray"'
                    height: 30
                    icon: iconify:mdi:car-seat-heater
                    style:
                      margin-right: 10px
                      margin-left: 10px
    - component: f7-row
      config:
        style:
          align-items: left
          justify-content: left
          margin-left: 10px
          margin-top: 10px
        visible: true
      slots:
        default:
          - component: oh-icon
            config:
              color: white
              height: 30
              icon: iconify:mdi:car-side
              style:
                margin-right: 10px
          - component: Label
            config:
              style:
                font-size: 17px
                font-weight: 700
                margin-left: 0px
              text: Odometer
    - component: f7-row
      config:
        style:
          align-items: center
          justify-content: center
          margin-left: 30px
          margin-top: 10px
        visible: true
      slots:
        default:
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: gray
                    height: 30
                    icon: iconify:mdi:gauge-full
                    style:
                      margin-right: 10px
                - component: oh-link
                  config:
                    action: analyzer
                    actionAnalyzerChartType: ""
                    actionAnalyzerCoordSystem: time
                    actionAnalyzerItems: =[props.itemOdometer]
                    color: white
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemOdometer].numericState + 'km'
    - component: f7-row
      config:
        style:
          align-items: left
          justify-content: left
          margin-left: 10px
          margin-top: 10px
        visible: true
      slots:
        default:
          - component: oh-icon
            config:
              color: white
              height: 30
              icon: iconify:mdi:car-settings
              style:
                margin-right: 10px
          - component: oh-link
            config:
              action: variable
              actionVariable: showStatus
              actionVariableValue: "=vars.showStatus == false ? true : false"
              color: white
              style:
                font-size: 17px
                font-weight: 700
                //margin-left: 0px
                //font-weight: bold
                //font-size: 20px
                //margin: 0px 0px
              text: ="Status"
    - component: f7-row
      config:
        style:
          align-items: center
          justify-content: center
          margin-left: 30px
          margin-top: 10px
        visible: "=vars.showStatus == false ? true : false"
      slots:
        default:
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: gray
                    height: 30
                    icon: iconify:mdi:key-variant
                    style:
                      margin-right: 10px
                - component: oh-link
                  config:
                    color: white
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemIsActive].state
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: gray
                    height: 30
                    icon: iconify:mdi:list-status
                    style:
                      margin-right: 10px
                - component: oh-link
                  config:
                    color: white
                    style:
                      //font-weight: bold
                      font-size: 20px
                      margin: 0px 0px
                    text: =items[props.itemState].state
    - component: f7-row
      config:
        style:
          align-items: center
          justify-content: center
          margin-left: 20px
          margin-top: 10px
        visible: "=vars.showStatus == false ? true : false"
      slots:
        default:
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-icon
                  config:
                    color: '=items[props.itemDoorsLock].state == "CLOSED" ? "green" : "red"'
                    height: 30
                    icon: '=items[props.itemDoorsLock].state == "CLOSED" ?
                      "iconify:mdi:car-door-lock" :
                      "iconify:mdi:car-door-lock-open"'
                    style:
                      margin-right: 10px
                      margin-left: 15px
                - component: oh-icon
                  config:
                    color: '=items[props.itemDoors].state == "CLOSED" ? "gray" : "red"'
                    height: 30
                    icon: iconify:mdi:car-door
                    style:
                      margin-right: 10px
                      margin-left: 10px
                - component: oh-icon
                  config:
                    color: '=items[props.itemWindows].state == "CLOSED" ? "gray" : "red"'
                    height: 30
                    icon: iconify:mdi:window-closed
                    style:
                      margin-right: 10px
                      margin-left: 10px
    - component: f7-row
      config:
        style:
          align-items: center
          justify-content: center
          margin-left: 0px
          margin-top: -50px
          margin-bottom: -50px
        visible: true
      slots:
        default:
          - component: f7-col
            config:
              class:
                - display-flex
                - justify-content-left
            slots:
              default:
                - component: oh-image
                  config:
                    url: ='/static/icons/' + props.itemImage + '.png'
                    style:
                      //position: absolute
                      //left: 16px
                      //top: 100px
                      //height: 25px
                      opacity: 1
                      width: 100%
                      object-fit: cover
    - component: f7-card-footer
      slots:
        default:
          - component: Label
            config:
              //  color: '=items[props.itemConnected].state == "ON" ? "white" : "red"'
              text: '="Last update: " + dayjs(items[props.itemLastUpdate].state).fromNow()'
          - component: oh-button
            config:
              color: gray
              iconF7: arrow_2_circlepath
              iconSize: 18
              outline: false
              round: true
              style:
                margin-right: -10px
                margin-top: 5px
              visible: true
2 Likes

Hi @wars ,

EDIT March 11th:
I got carconnectivity running in my terminal and the webui succesfullly shows relevant data from my cupra formentor. Next, Iā€™d like to try unlocking/locking doort and using preheater.
Any advice how to to this?
Thanks a lot!
ā€¦

Original message:

I also just came across this python mqtt tool and installed it.
I am just a little bit struggling how to start this. I have created a carconnectivity.json file created in my openhabian home folder.

Now I wonder how to start that python tool and/or how to set it to autostart.
Do you have any examples for MQTT messages to receive data and/or to lock/unlock the car?

The documentation on github is not to comprehensive yet. Appreciate any help as this looks really promising.

Thanks!
Christian

Hi!

I actually did not tried to control my car with this app, Iā€™ll see if I can test/check later this week.

Hi,

I could successfully lock and unlock my car with the car connectivity-cli tool.
If you want further details, let me know!

Best,
Christian

I have removed the odd string replacements for the WeConnect piece, and things seem to work, and added support to toggle between scheduled and immediate charge (not thoroughly tested yet). My bridge is currently failing to authenticate, so not sure what thatā€™s all about, the general VW platform seems a bit iffy. Iā€™ve also managed to figure out the messages needed to set the charge target, but I figuring out how to add it to this code base will be trickier.