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
| Property | Description |
|---|---|
| Teslemetry Config | Select your Teslemetry configuration node |
| VIN | Optional VIN filter (leave empty for all vehicles) |
| Event Type | Type of events to listen for |
Event Types
| Event | Description |
|---|---|
| all | All events from the stream |
| data | Telemetry data updates |
| state | Vehicle state changes (online, asleep, etc.) |
| vehicle_data | Full vehicle data responses |
| errors | Error events from the vehicle |
| alerts | Alert notifications |
| connectivity | Connection status changes |
| credits | Credit usage updates |
| config | Configuration changes |
Output Message
The node outputs messages with:
msg.payload- The event datamsg.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
| Property | Description |
|---|---|
| Teslemetry Config | Select your Teslemetry configuration node |
| VIN | The vehicle's VIN (required) |
| Field | The telemetry field to monitor (required) |
Common Signal Fields
| Field | Description |
|---|---|
| BatteryLevel | Battery state of charge (0-100) |
| ChargeState | Current charging state |
| Location | Vehicle GPS coordinates |
| Speed | Current vehicle speed |
| InsideTemp | Cabin temperature |
| OutsideTemp | External temperature |
| Odometer | Total 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 valuemsg.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"]]
}
]