Skip to content

Commit adf1bd5

Browse files
authored
Merge pull request #25 from Teslemetry/claude/explore-monorepo-init-qXSax
Enhance Node-RED integration documentation and metadata
2 parents 8881614 + fa21299 commit adf1bd5

File tree

3 files changed

+166
-12
lines changed

3 files changed

+166
-12
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
"@teslemetry/node-red-contrib-teslemetry": patch
3+
---
4+
5+
Enhance Node-RED integration documentation and metadata
6+
7+
**Documentation Improvements:**
8+
- Added npm installation instructions (via npm and Palette Manager)
9+
- Added badges for npm version and license
10+
- Comprehensive README update with:
11+
- Features section highlighting key capabilities
12+
- Prerequisites section for getting started
13+
- Configuration guide
14+
- 4 usage examples with real-world scenarios
15+
- Complete list of available vehicle and energy commands
16+
- Event types documentation (including all 9 event types)
17+
- Resources and support links
18+
19+
**Package Metadata:**
20+
- Enhanced description: "Node-RED nodes for controlling Tesla vehicles and energy sites via Teslemetry API"
21+
- Expanded keywords: Added automation, vehicle, energy, powerwall, solar, iot, smart-home
22+
23+
This brings the Node-RED documentation quality to match the n8n integration improvements.

packages/node-red-contrib-teslemetry/README.md

Lines changed: 134 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,59 @@
11
# Node-RED Teslemetry Integration
22

3-
Node-RED nodes for interacting with Tesla vehicles and energy sites via [Teslemetry](https://teslemetry.com).
3+
[![npm version](https://img.shields.io/npm/v/@teslemetry/node-red-contrib-teslemetry.svg)](https://www.npmjs.com/package/@teslemetry/node-red-contrib-teslemetry)
4+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5+
6+
Node-RED nodes for controlling Tesla vehicles and energy sites via the [Teslemetry](https://teslemetry.com) API.
7+
8+
## Features
9+
10+
- 🚗 **Vehicle Control**: Lock/unlock, climate, charging, navigation, and more
11+
-**Energy Management**: Monitor and control Powerwall and Solar systems
12+
- 📡 **Real-Time Events**: React to vehicle state changes via Server-Sent Events
13+
- 🎯 **Signal Monitoring**: Track specific vehicle data fields (speed, battery, etc.)
14+
- 🔄 **Full API Coverage**: Access all Teslemetry API features
415

516
## Installation
617

7-
Local installation (for development):
18+
### From npm (Recommended)
19+
20+
Navigate to your Node-RED user directory (usually `~/.node-red`) and install:
21+
22+
```bash
23+
cd ~/.node-red
24+
npm install @teslemetry/node-red-contrib-teslemetry
25+
```
26+
27+
Then restart Node-RED.
28+
29+
### From Node-RED Palette Manager
30+
31+
1. Open Node-RED in your browser
32+
2. Go to **Menu****Manage palette**
33+
3. Click the **Install** tab
34+
4. Search for `@teslemetry/node-red-contrib-teslemetry`
35+
5. Click **Install**
36+
37+
### Local Development
838

939
```bash
1040
cd ~/.node-red
1141
npm install /path/to/packages/node-red-contrib-teslemetry
1242
```
1343

44+
## Prerequisites
45+
46+
1. **Teslemetry Account**: Sign up at [teslemetry.com](https://teslemetry.com)
47+
2. **Access Token**: Generate an API access token from your Teslemetry dashboard
48+
3. **Tesla Virtual Key**: Configure virtual key access for your vehicle(s)
49+
50+
## Configuration
51+
52+
1. Drag a Teslemetry node onto your flow
53+
2. Double-click to edit and add a new **Teslemetry Config**
54+
3. Enter your Teslemetry access token
55+
4. Save and deploy
56+
1457
## Nodes
1558

1659
### teslemetry-config
@@ -54,20 +97,101 @@ Listen for real-time Server-Sent Events (SSE) from Teslemetry.
5497

5598
**Configuration:**
5699
- **VIN**: Filter events for a specific vehicle (optional).
57-
- **Event Type**: The type of event to listen for (e.g., `vehicle_data`, `state`, `alerts`).
100+
- **Event Type**: The type of event to listen for.
101+
102+
**Event Types:**
103+
- **all**: Stream all events
104+
- **data**: Real-time telemetry data updates
105+
- **state**: State changes (online/asleep/charging)
106+
- **vehicle_data**: Full vehicle data snapshots
107+
- **errors**: Vehicle error events
108+
- **alerts**: Vehicle alerts and notifications
109+
- **connectivity**: Connection status changes
110+
- **credits**: API credit usage updates
111+
- **config**: Configuration changes
58112

59113
**Outputs:**
60-
- `msg.payload`: The event data object.
61-
- `msg.topic`: The event type.
114+
- `msg.payload`: The event data object
115+
- `msg.topic`: The event type
62116

63117
### teslemetry-signal
64118
Listen for specific signal changes from a vehicle.
65119

66120
**Configuration:**
67-
- **VIN**: The vehicle to monitor.
68-
- **Field**: The specific signal field to listen for (e.g., `speed`, `odometer`).
121+
- **VIN**: The vehicle to monitor
122+
- **Field**: The specific signal field to listen for (e.g., `speed`, `odometer`, `battery_level`)
69123

70124
**Outputs:**
71-
- `msg.payload`: The new value of the signal.
72-
- `msg.topic`: `signal`.
73-
- `msg.field`: The name of the field.
125+
- `msg.payload`: The new value of the signal
126+
- `msg.topic`: `signal`
127+
- `msg.field`: The name of the field
128+
129+
## Usage Examples
130+
131+
### Example 1: Lock Vehicle When Leaving Home
132+
133+
1. Add a **geofence** or **location** trigger node
134+
2. Add a **function** node to set `msg.command = "lockDoors"`
135+
3. Add a **teslemetry-vehicle-command** node with your VIN configured
136+
4. Connect them together
137+
138+
### Example 2: Start Climate Control on Schedule
139+
140+
1. Add an **inject** node configured for your departure time
141+
2. Add a **teslemetry-vehicle-command** node
142+
3. Set Command to **Start HVAC**
143+
4. Set temperatures using **setTemps** with `msg.driver_temp` and `msg.passenger_temp`
144+
145+
### Example 3: Monitor Charging and Send Notifications
146+
147+
1. Add a **teslemetry-event** node
148+
2. Set Event Type to **data**
149+
3. Add a **function** node to filter charging-related updates
150+
4. Add an **email** or **pushover** node for notifications
151+
5. Send alert when charging completes
152+
153+
### Example 4: Alert on Low Battery
154+
155+
1. Add a **teslemetry-signal** node
156+
2. Set Field to `battery_level`
157+
3. Add a **switch** node to check if value < 20
158+
4. Add notification node (email/SMS/Pushover)
159+
160+
## Available Vehicle Commands
161+
162+
- **Get Vehicle Data**: Retrieves comprehensive vehicle information
163+
- **Wake Up**: Wakes up the vehicle from sleep
164+
- **Flash Lights**: Flashes the headlights
165+
- **Honk Horn**: Honks the horn
166+
- **Lock/Unlock Doors**: Controls door locks
167+
- **Remote Start**: Enables keyless driving
168+
- **Actuate Trunk**: Opens/closes front or rear trunk
169+
- **Climate Control**: Start/stop HVAC, set temps, seat heaters, steering wheel heater
170+
- **Charging**: Start/stop, open/close port, set limit, set amps
171+
- **Sentry Mode**: Enable/disable Sentry Mode
172+
- **Homelink**: Trigger Homelink at specific coordinates
173+
- **Navigation**: Send destination to vehicle navigation
174+
175+
## Available Energy Commands
176+
177+
- **Get Live Status**: Live power usage details
178+
- **Get Site Info**: Configuration and site details
179+
- **Set Backup Reserve**: Set battery reserve percentage
180+
- **Set Operation Mode**: Self Consumption, Backup, or Autonomous
181+
- **Set Storm Mode**: Enable/disable Storm Mode
182+
- **Grid Import/Export**: Configure grid export rules (Everything, Solar Only, Nothing)
183+
- **Off-Grid Reserve**: Set vehicle charging reserve for off-grid operation
184+
185+
## Resources
186+
187+
- **Teslemetry Documentation**: https://teslemetry.com/docs
188+
- **API Reference**: https://developer.teslemetry.com
189+
- **Support**: https://github.com/Teslemetry/typescript-teslemetry/issues
190+
191+
## License
192+
193+
Apache-2.0 License - see [LICENSE](LICENSE) file for details
194+
195+
## Contributing
196+
197+
Contributions are welcome! Please see the [main repository](https://github.com/Teslemetry/typescript-teslemetry) for contribution guidelines.

packages/node-red-contrib-teslemetry/package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@teslemetry/node-red-contrib-teslemetry",
33
"version": "0.1.2",
4-
"description": "Node-RED integration for Teslemetry",
4+
"description": "Node-RED nodes for controlling Tesla vehicles and energy sites via Teslemetry API",
55
"main": "dist/index.cjs",
66
"engines": {
77
"node": ">=18.0.0"
@@ -16,7 +16,14 @@
1616
"keywords": [
1717
"node-red",
1818
"tesla",
19-
"teslemetry"
19+
"teslemetry",
20+
"automation",
21+
"vehicle",
22+
"energy",
23+
"powerwall",
24+
"solar",
25+
"iot",
26+
"smart-home"
2027
],
2128
"author": {
2229
"name": "Teslemetry",

0 commit comments

Comments
 (0)