> ## Documentation Index
> Fetch the complete documentation index at: https://developer.energy-hub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Event Types

## General information

There are events for energy devices that trigger streaming messages. Receiving event-based data is useful for handling asynchronous events, such as commands, and ensuring that your system stays up to date with the latest device information. The Energy Hub Alliance will ensure automatically that vendor data is always up to date.

We recommend using streaming instead of API polling to avoid delays and reduce unnecessary traffic.

<Tip>
  In case you feel that data of a device might be outdated, a data update can be
  requested manually. This function is triggered by calling e.g. [Refresh
  vehicle data](/api-reference/vehicle-controller/refresh-vehicle-data). In
  addition to the response of the API-request, this will also trigger a
  streaming message, if the device can be reached. The refresh endpoints should
  be used with caution, as it might trigger too many requests to the vendor API
  when used too excessively.
</Tip>

## Message format

Kafka messages send to your Kafka Broker have the following format:

`{subscriptionId}.{deviceType}.{eventType}`

The **subscriptionId** is the ID of your subscription created in the partner portal. The **deviceType** is the type of the connected device or object, for example a vehicle, tariff, HVAC or home energy device. The **eventType** is the action related to the message and described in more details below.

## Supported event types

There are three main events types supported by the streaming service.

<CardGroup cols={1}>
  <Card title="Connect" icon="link">
    Notifies if a new device has been connected to the Energy Hub Alliance.
  </Card>

  <Card title="Disconnect" icon="link-slash">
    Notifies when a device becomes disconnected due to lost authentication or
    revoked access.
  </Card>

  <Card title="Update" icon="loader">
    Sends the newest data of a device, when at least one data model property has
    changed. Use this event to recieve the latest device data.
  </Card>

  <Card title="Delete" icon="trash">
    Notifies if a new device has been deleted from the Energy Hub by the
    end-user or the partner.
  </Card>

  <Card title="Offline" icon="signal-stream-slash">
    Notifies if a device has not been reachable for some time from and went
    offline.
  </Card>

  <Card title="Command" icon="paper-plane-top">
    Notifies about the creation and status of a command.
  </Card>
</CardGroup>
