msp1974 / homeassistant-jlrincontrol

An integration for JLR InControl to Home Assistant
MIT License
66 stars 12 forks source link
hacs homeassistant i-pace jaguar jlr landrover rrs vehicle wirelesscar

hacs_badge

GitHub license GitHub release

JLR Home Assistant Integration (v2.2.7)

This repository contains a Home Assistant integration for the Jaguar Landrover InControl system, allowing visibility of key vehicle information and control of enabled services.

Due to changes in Home Assistant, this integration requires a minimum of HA v2022.11.

Functionality

Currently this loads a series of sensors for

And has services for

Note: Not all services are available on all models and the error log will show this if not available on your vehicle.

Note 2: When calling a service, HA will monitor the status of the service call and report in the error log if it failed.

Note 3: This sensor shows all returned data for attributes, statuses and position as device attribute data. See recipes for how to use this in your automations or template sensors. By default it is not enabled and can be enabled in config options.

Also, due to lack of a fleet of Jaguars and LandRovers/RangeRovers (donations welcome!), there maybe issues with some models not supporting some functions. Please raise an issue for these and say what vehicle you have and post the log.

Sample Images

Configuration

Add via Configuration -> Integrations in the UI

Required Parameters

  email: <your InControl email address>
  password: <your InControl password>

Config Options

  1. scan interval - in minutes. Default update interval is 5 minutes. Use this to change that. Minimum is 1 minute.
  2. pin - set this to be able to use the lock/unlock on the lock sensor.
  3. distance unit - set this to 'mi' or 'km' to override the HA default metric for mileages (mainly for funny UK system of miles and litres!).
  4. pressure unit - set this to 'bar' or 'psi' to override the HA default unit for pressure (mainly for UK also).
  5. health update interval - see health update section.
  6. debug data: - see debugging below.
  7. show all data sensor

Migrating From Previous Versions

The new config flow will import your settings from configuration.yaml. It is recommended to remove them after this has happened, otherwise changes via the UI can be reverted by the entries in configuration.yaml.

Health Status Update

This integration has the ability to perform a scheduled health status update request from your vehicle. By default this is disabled. Setting the interval and your pin in the config options will enable this.

I do not know the impact on either vehicle battery or JLRs view on running this often, so please use at your own risk. I would certainly not set it to too low an interval. Recommended 120 mins.

Alternatively, you can make a more intelligent health update request automation using the service call available in this integration and the output of some sensors.

I.e. on EV vehicles you could only call it if the vehicle is charging, or on all vehicles, only call it during the day and it was more than x period since the last update.

Creating Custom Sensors

As all use cases cannot be covered and to allow the best benefit to all of this integration, version 2.1.0 introduced and 'All Info' sensor. This sensor displays the attribute, status and position information being received from the JLR servers and allows the creation of custom sensors and use of any of this data in scripts and automations.

The recipes document gives an example of a template sensor that uses this data and shows how to extract the values from the all info sensor.

NOTE: By default this sensor is not created and must be enabled in the config options. Configuration -> Integrations -> Select Options on the JLR Incontrol integration. You do not need to restart HA to enable or disable this sensor, but you may need to add it into your Lovelace UI after enabling it.

Installation

Installing via HACS and configuring via the UI is the recommended method.

Manual Code Installation

  1. On your server clone the github repository into a suitable directory using the git clone command.
    git clone https://github.com/msp1974/homeassistant-jlrincontrol.git
  2. Copy the jlrincontrol folder to the custom_components directory of your Home Assistant installation.
  3. Configure via the integrations page in the UI.

Branch Versions

As of v1.0.0, the dev branch is now where the very latest version is held. Please note that there maybe issues with new functions or fixes that have not been fully tested. It will also be updated regularly as new fixes/functions are developed, so please check you have the latest update before raising an issue. The master branch is the current release.

Community Recipes

The recipes page is a collection of ideas contributed by the community to help you get the most out of using this integration.

Suggestions

I am looking for suggestions to improve this integration and make it useful for many people. Please raise an issue for any functionality you would like to see.

Contributors

This integration uses the jlrpy api written by ardevd. A big thanks for all the work you have done on this.

Debugging

  1. To enable debug logging for this component, add the following to your configuration.yaml
    logger:
      default: critical
      logs:
        custom_components.jlrincontrol: debug
  1. To enable logging of the attributes and status data in the debug log, set the debug data option in config options with debugging turned on as above.

Change Log

v2.2.7

v2.2.6

v2.2.5

v2.2.4

v2.2.3

v2.2.2

v2.2.1 (includes v2.1.4 Pre Release changes)

v2.1.4 - Pre Release

v2.1.3

v2.1.2

v2.1.1

v2.1

v2.0.2

v2.0.1

v2.0.0beta

v1.3.1

v1.3.0

v1.2.0

v1.1.0

v1.0.0

v0.5alpha

v0.4alpha

v0.3alpha

v0.2alpha

v0.1alpha

Initial build of the component to read basic sensors

Known Issues