Giter Club home page Giter Club logo

homeassistant-subaru's Introduction

Subaru STARLINK integration for Home Assistant

NOTE: The Subaru integration is now part of Home Assistant Core (as of release 2021.3), however not all features have been implemented. Currently, only the sensor platform is available. Additional PRs will be submitted to include all features of this custom component into Home Assistant Core.

Users that desire full functionality should continue to use this custom component until all functionality is merged into the official integration. This custom component will override the HA Core built-in integration.


The Subaru integration retrieves information provided by Subaru connected vehicle services. Before using this integration, you must first register and have login credentials to MySubaru.

This integration requires an active vehicle subscription to the Subaru STARLINK service (available in USA and Canada).

hass_screenshot

Subaru has deployed two generations of telematics, Gen 1 and Gen 2. Use the tables below to determine which capabilities are available for your vehicle.

Model Gen 1 Gen 2
Ascent 2019+
Crosstrek 2016-2018 2019+
Forester 2016-2018 2019+
Impreza 2016-2018 2019+
Legacy 2016-2019 2020+
Outback 2016-2019 2020+
WRX 2017+
Sensor Gen 1 Gen 2
12V battery voltage
Average fuel consumption
Distance to empty
EV battery level
EV range
EV time to full charge
External temperature
Odometer ✓*
Tire pressures

* Gen 1 odometer only updates every 500 miles

Binary Sensor Gen 1 Gen 2
Door/Trunk/Hood Status
Window Status ✓*
Ignition Status
EV Plug/Charging Status ✓*

* Not supported by all vehicles

Device tracker, lock, and services all require a STARLINK Security Plus subscription:

Device Tracker Gen 1 Gen 2
Vehicle Location
Lock Gen 1 Gen 2
Remote lock/unlock
Services Gen 1 Gen 2
Lock/Unlock
Start/Stop Horn/Lights
Poll vehicle
Refresh data
Start/Stop Horn/Lights
Start/Stop Engine ✓*
Start EV charging ✓*

* Not supported by all vehicles

Installation

HACS

Add https://github.com/G-Two/homeassistant-subaru as a custom integration repository and install the Subaru STARLINK integration.

Manual

Clone or download this repository, and copy the custom_components/subaru directory into the config/custom_components directory of your Home Assistant instance. Restart Home Assistant.

Configuration

Once installed, the Subaru integration is configured via the Home Assistant UI:

Configuration -> Integrations -> Add -> Subaru (HACS)

NOTE: After installation and HA restart, you may need to clear your browser cache for the new integration to appear.

When prompted, enter the following configuration parameters:

  • Email Address: The email address associated with your MySubaru account
  • Password: The password associated with your MySubaru account
  • Country: The country your MySubaru account is associated with

The initial device registration process may take up to 20 seconds.

After successful authentication, if a supported remote services vehicle with active subscription is found in your account, an additional prompt will appear:

  • PIN: The PIN associated with your MySubaru account

    NOTE: If your account includes multiple vehicles, the same PIN will be used for all vehicles. Ensure that you have configured all vehicles in your account to have the same PIN.

If the PIN prompt does not appear, no supported remote services vehicles were found in your account. Limited vehicle data may still appear as sensors.

Options

Subaru integration options are set via:

Configuration -> Integrations -> Subaru (HACS) -> Options.

The options are:

  • Enable vehicle polling [Default: off]: When enabled, vehicle polling will send a remote command to your vehicle every 2 hours to obtain new sensor data. This involves “waking” your vehicle and requesting that it send new data to Subaru servers. Without vehicle polling, new sensor data is only received when the vehicle automatically pushes data (normally after engine shutdown). This option only applies to vehicles with Security Plus subscriptions.

    WARNING: Vehicle polling draws power from the 12V battery. Long term use without driving may drain the battery resulting in the inability to start.

Services

NOTE: Subaru lock uses the services provided by the Home Assistant Lock integration

subaru.lights

Flash the lights of the vehicle. The vehicle is identified by the vin.

Service Data Attribute Required Description
vin yes The vehicle identification number (VIN) of the vehicle, 17 characters

subaru.lights_cancel

Stop flashing the lights of the vehicle. The vehicle is identified by the vin.

Service Data Attribute Required Description
vin yes The vehicle identification number (VIN) of the vehicle, 17 characters

subaru.horn

Sound the horn and flash the lights of the vehicle. The vehicle is identified by the vin.

Service Data Attribute Required Description
vin yes The vehicle identification number (VIN) of the vehicle, 17 characters

subaru.horn_cancel

Stop sounding the horn and flash the lights of the vehicle. The vehicle is identified by the vin.

Service Data Attribute Required Description
vin yes The vehicle identification number (VIN) of the vehicle, 17 characters

subaru.update

Sends request to vehicle to update data. The vehicle is identified by the vin.

Service Data Attribute Required Description
vin yes The vehicle identification number (VIN) of the vehicle, 17 characters

subaru.fetch

Refreshes data (does not request update from vehicle). The vehicle is identified by the vin.

Service Data Attribute Required Description
vin yes The vehicle identification number (VIN) of the vehicle, 17 characters

subaru.remote_start

Start the engine and climate control of the vehicle. Uses the climate control settings saved. The vehicle is identified by the vin.

Service Data Attribute Required Description
vin yes The vehicle identification number (VIN) of the vehicle, 17 characters

subaru.remote_stop

Stop the engine and climate control of the vehicle. The vehicle is identified by the vin.

Service Data Attribute Required Description
vin yes The vehicle identification number (VIN) of the vehicle, 17 characters

subaru.charge_start

Starts EV charging. This cannot be stopped remotely. The vehicle is identified by the vin.

Service Data Attribute Required Description
vin yes The vehicle identification number (VIN) of the vehicle, 17 characters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.