Node Red

Streaming Events

React to real-time Tesla events in Node-RED

Event Node

The teslemetry-event node listens for real-time streaming events from Teslemetry. This allows you to trigger flows based on vehicle state changes, errors, alerts, and more.

Node Configuration

PropertyDescription
Teslemetry ConfigSelect your Teslemetry configuration node
VINOptional VIN filter (leave empty for all vehicles)
Event TypeType of events to listen for

Event Types

EventDescription
allAll events from the stream
dataTelemetry data updates
stateVehicle state changes (online, asleep, etc.)
vehicle_dataFull vehicle data responses
errorsError events from the vehicle
alertsAlert notifications
connectivityConnection status changes
creditsCredit usage updates
configConfiguration changes

Output Message

The node outputs messages with:

  • msg.payload - The event data
  • msg.topic - The event type

Signal Node

The teslemetry-signal node monitors specific telemetry fields for a vehicle. This is useful when you only need to react to specific data changes.

Node Configuration

PropertyDescription
Teslemetry ConfigSelect your Teslemetry configuration node
VINThe vehicle's VIN (required)
FieldThe telemetry field to monitor (required)

Common Signal Fields

FieldDescription
BatteryLevelBattery state of charge (0-100)
ChargeStateCurrent charging state
LocationVehicle GPS coordinates
SpeedCurrent vehicle speed
InsideTempCabin temperature
OutsideTempExternal temperature
OdometerTotal distance traveled

For a complete list of available fields, see the streaming fields documentation.

Output Message

The node outputs messages with:

  • msg.payload - The field value
  • msg.topic - "signal"
  • msg.field - The field name

Connection Status

Both event and signal nodes display their connection status:

  • Green dot - Connected to streaming server
  • Red ring - Disconnected

Example: Battery Alert Flow

Create an alert when battery drops below a threshold:

[
  {
    "id": "signal-node",
    "type": "teslemetry-signal",
    "name": "Battery Level",
    "vin": "5YJ3E1EA1KF000000",
    "field": "BatteryLevel",
    "wires": [["switch-node"]]
  },
  {
    "id": "switch-node",
    "type": "switch",
    "name": "< 20%",
    "property": "payload",
    "rules": [{"t": "lt", "v": "20", "vt": "num"}],
    "wires": [["notification-node"]]
  }
]