OpenSky Network

The OpenSky integration allows one to track overhead flights in a given region. It uses crowd-sourced data from the OpenSky Network public API. It will also fire Home Assistant events when flights enter and exit the defined region.

Configuration

To add the OpenSky Network integration to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  • Browse to your Home Assistant instance.

  • Go to Settings > Devices & Services.

  • In the bottom right corner, select the Add Integration button.

  • From the list, select OpenSky Network.

  • Follow the instructions on screen to complete the setup.

latitude

The latitude of the center of the area to track. Defaulted with the home’s latitude.

longitude

The latitude of the center of the area to track. Defaulted with the home’s longitude.

radius

The radius in meters around the latitude/longitude point to track.

altitude

The maximum altitude in meters in which the planes are tracked. No input (or 0) means all planes in the area are tracked.

Authentication

By default, polling is done every 15 minutes not to hit the API limit. More API requests are allowed as authenticated users. You can add your credentials after setting up the integration.

Events

  • opensky_entry: Fired when a flight enters the region.
  • opensky_exit: Fired when a flight exits the region.

Both events have two attributes in common:

  • sensor: Name of opensky sensor that fired the event.
  • callsign: Callsign of the flight.

opensky_entry has 4 additional attributes:

  • altitude: Altitude of the flight in meters.
  • latitude: Latitude of the flight in decimal.
  • longitude: Longitude of the flight in decimal.
  • icao24: The ICAO 24-bit address of the aircraft’s transponder.

To receive notifications of the entering flights using the Home Assistant Companion App, add the following lines to your configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file:

automation:
  - alias: "Flight entry notification"
    triggers:
      - trigger: event
        event_type: opensky_entry
    actions:
      - action: notify.mobile_app_<device_name>
        data:
          message: "Flight entry of {{ trigger.event.data.callsign }}"

One can also get a direct link to the OpenSky website to see the flight using the icao24 identification:

automation:
  - alias: "Flight entry notification"
    triggers:
      - trigger: event
        event_type: opensky_entry
    actions:
      - action: notify.mobile_app_<device_name>
        data:
          message: "Flight entry of {{ trigger.event.data.callsign }}"
          data:
            actions:
              - action: URI
                title: "Track the flight"
                uri: >-
                  https://opensky-network.org/aircraft-profile?icao24={{
                  trigger.event.data.icao24 }}