Skip to content

About

Home Assistant custom integration for OpenCARWINGS and Nissan Leaf vehicles

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Important

AI / vibe-coded project. This integration was vibe coded with AI for my own Home Assistant setup. I am sharing it in case someone else can benefit from it. It has run for several months without issues in my setup, so it is functional, but it may not be perfect and is provided without promises of official support.

OpenCARWINGS for Home Assistant

An unofficial Home Assistant integration for viewing vehicle information and sending remote commands through an OpenCARWINGS server.

What it does

  • Shows battery level, estimated range, charging state, battery health, odometer, connection details, and other vehicle information.
  • Adds controls to refresh vehicle data, start charging, start or stop climate control, and read the TCU configuration.
  • Adds a device tracker when OpenCARWINGS provides a vehicle location.
  • Supports every vehicle returned by the configured OpenCARWINGS account.
  • Discovers newly added vehicles automatically during a normal refresh.
  • Marks entities unavailable when a vehicle is removed, preserving Home Assistant history until you choose to delete the device.
  • Polls every five minutes and performs extra checks after a remote command so changes appear promptly.
  • Lets you choose kilometres or miles for range and odometer entities.

Before you install

You need:

  • Home Assistant with access to install a custom integration.
  • An OpenCARWINGS account and its API key.
  • The URL of the OpenCARWINGS server you use. The default public server is https://opencarwings.viaaq.eu; self-hosted HTTP or HTTPS servers are also supported.

This integration is not part of Home Assistant Core and is not maintained by the OpenCARWINGS project.

Installation

HACS (recommended)

  1. Open HACS in Home Assistant.
  2. Open the HACS menu and choose Custom repositories.
  3. Add https://github.com/Chaoscontrol/opencarwings-ha as an Integration repository.
  4. Find OpenCARWINGS in HACS and download it.
  5. Restart Home Assistant.

Manual installation

  1. Download this repository.
  2. Copy custom_components/opencarwings into the custom_components directory inside your Home Assistant configuration directory.
  3. Restart Home Assistant.

Setup

  1. In Home Assistant, open Settings → Devices & services.
  2. Select Add integration and search for OpenCARWINGS.
  3. Enter your API key, OpenCARWINGS server URL, and preferred distance unit.
  4. Submit the form. Home Assistant checks the connection before saving it.

Your OpenCARWINGS vehicles will appear as devices. The first load can take a little longer while the server and vehicle data are fetched.

Updating the API key, server, or units

You do not need to delete and recreate the integration.

  1. Open Settings → Devices & services → OpenCARWINGS.
  2. Open the menu for the existing entry and choose Reconfigure.
  3. Update the API key, server URL, or distance unit and submit the form.

The new connection is checked before it replaces the old one. The same Home Assistant config entry, devices, entities, automations, and history are retained.

Entities and controls

The exact entities depend on the data your vehicle and OpenCARWINGS server provide.

Vehicle sensors

  • Battery state of charge, displayed state of charge, battery bars, capacity bars, battery content, GIDs, and state of health.
  • Range with climate control on and off, odometer, charge-time estimates, gear, and charging capability information.
  • Last vehicle update, last connection, signal level, carrier, periodic refresh, and latest command result.
  • TCU configuration details such as APN, DNS, server, proxy, and connection type. Passwords and usernames are deliberately not exposed.

Status sensors

  • Plugged in, charging, quick charging, and charge complete.
  • Climate control active, Eco mode, vehicle running, battery heater status, and 6 kW onboard-charger availability.

Buttons

  • Refresh Data asks the vehicle to send a fresh status update.
  • Start Charging starts charging when the vehicle is plugged in.
  • Start A/C and Stop A/C control climate control.
  • Read TCU Configuration asks the vehicle for its current connection configuration.

Device tracker

When location data is available, the vehicle appears as a Home Assistant device tracker. OpenCARWINGS may take a minute or two to receive a new position after the vehicle wakes up.

Removed and newly added vehicles

New vehicles are discovered automatically during polling. If a vehicle disappears from the OpenCARWINGS account, its entities become unavailable instead of being deleted. This keeps historical data intact.

To permanently remove an absent vehicle, open its device page and use the Delete action. Home Assistant only permits deletion after the vehicle is no longer returned by the server.

Privacy and remote commands

  • Your API key is stored in the Home Assistant config entry and sent only to the server URL you configure.
  • Diagnostics redact the API key, server URL, VIN, location, SIM/TCU identifiers, and other personal vehicle data.
  • Location entities and their history are still visible to people who can access your Home Assistant instance.
  • Remote commands act on the real vehicle. Confirm that charging and climate-control commands are appropriate before using them in automations.

Troubleshooting

The setup or reconfigure form rejects the details

  • Confirm the API key is current and belongs to the selected server.
  • Confirm the URL starts with http:// or https:// and does not include login details, a query string, or a fragment.
  • Open the server URL in a browser to confirm it is reachable.

The form does not replace a working configuration when validation fails.

Data has not changed after a command

The integration checks again after a remote command, but the vehicle still needs time to wake up and report to OpenCARWINGS. Check the available vehicle update timestamps before repeating a command.

A temporary connection failure appears in the log

Temporary DNS failures are retried automatically. Persistent failures usually mean the OpenCARWINGS server, local DNS, or internet connection is unavailable.

Reporting a problem

Open an issue in the GitHub issue tracker and include:

  • Your Home Assistant version and OpenCARWINGS integration version.
  • What you expected and what happened.
  • Relevant Home Assistant logs or downloaded diagnostics.

Remove any information you do not want to share before posting publicly.

License

Released under the MIT License.

About

Home Assistant custom integration for OpenCARWINGS and Nissan Leaf vehicles

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages