home-assistant.io/source/_components/automatic.markdown
Franck Nijhof c464056402
Making our website faster, cleaner and prettier (#9853)
* 🔥 Removes octopress.js

* 🔥 Removes use of root_url var

* 🔥 Removes Octopress generator reference from feed

* 🔥 Removes delicious support

* 🔥 Removes support for Pinboard

* 🔥 Removes support for Disqus

* 🔥 Removes support for Google Plus

* ↩️ Migrate custom after_footer to default template

* ↩️ Migrate custom footer to default template

* ↩️ Migrate custom header to default template

* 🔥 Removes unused template files

* 🚀 Places time to read directly in post template

* 🚀 Removes unneeded capture from archive_post.html template

* 🔥 🚀 Removes unused, but heaving sorting call in component page

* 🚀 Merged javascripts into a single file

* 🔥 Removes more uses of root_url

* 🚀 Removal of unneeded captures from head

* 🔥 🚀 Removal of expensive liquid HTML compressor

* 🔥 Removes unneeded templates

* 🚀 Replaces kramdown with GitHub's CommonMark 🚀

* 💄 Adds Prism code syntax highlighting

*  Adds support for redirect in Netlify

* ↩️ 🔥 Let Netlify handle all developer doc redirects

* ✏️ Fixes typo in redirects file: Netify -> Netlify

* 🔥 Removes unused .themes folder

* 🔥 Removes unused aside.html template

* 🔥 Removes Disqus config leftover

* 🔥 Removes rouge highlighter config

* 🔥 Removes Octopress 🎉

* 💄 Adjust code block font size and adds soft wraps

* 💄 Adds styling for inline code blocks

* 💄 Improve styling of note/warning/info boxes + div support

* 🔨 Rewrites all note/warning/info boxes
2019-07-15 22:17:54 +02:00

3.4 KiB

title description logo ha_category ha_release ha_iot_class redirect_from
Automatic Instructions for how to integrate Automatic ODB readers into Home Assistant. automatic.png
Car
0.28 Cloud Push
/components/device_tracker.automatic/

The automatic device tracker platform offers presence detection by retrieving your car's information from the Automatic cloud service.

Setup

To use Automatic with Home Assistant, first you must create a free development account. Automatic will generate a Client ID and Secret for you to use in your Home Assistant configuration. You will need to update your Event Delivery preferences to ensure Home Assistant can receive updates. On the developer page, under App Settings / Event Delivery, select "Websocket" for Event Delivery Preference. Next, specify the OAuth Redirect URL in the developer page. This should be configured to <home-assistant-url>/api/automatic/callback. (Example: http://hassio.local:8123/api/automatic/callback) Note that this URL only needs to be accessible from the browser you use to perform the authentication.

Home Assistant can also take advantage of scope:current_location if available. This will allow Home Assistant to receive periodic location updates during a trip. In order to use this functionality, you must request the scope for your application from Automatic. Once scope:current_location is available, change current_location to true in your configuration.yaml.

Configuration

Once your developer account is created, add the following to your configuration.yaml file:

# Example configuration.yaml entry
device_tracker:
  - platform: automatic
    client_id: 1234567
    secret: 0987654321
    devices:
      - 2007 Honda Element
      - 2004 Subaru Impreza

{% configuration %} client_id: description: "The OAuth client id (get from https://developer.automatic.com/)." required: true type: string secret: description: "The OAuth client secret (get from https://developer.automatic.com/)." required: true type: string current_location: description: "Set to true if you have requested scope:current_location for your account. Home Assistant will then be able to receive periodic location updates during trips." required: false default: false type: boolean devices: description: The list of vehicle display names you wish to track. If not provided, all vehicles will be tracked. required: false type: list {% endconfiguration %}

Home Assistant will also fire events when an update is received from Automatic. These can be used to trigger automations, as shown in the example below. A list of available event types can be found in the Automatic Real-Time Events documentation.

# Example automatic event automation
automation:
  - trigger:
      - platform: event
        event_type: automatic_update
        event_data:
          type: "ignition:on"
          vehicle:
            id: "C_1234567890abcdefc"
    action:
      - service: light.turn_off
You can obtain the correct ID for your vehicle from your known_devices.yaml file. Be sure to lower-case any letters contained in your vehicle's ID when using it in an automation trigger.

See the device tracker integration page for instructions how to configure the cars to be tracked.