npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tesla-rpi-plugin

v1.0.0

Published

Complete Tesla vehicle control plugin for Raspberry Pi. Manage Sentry Mode, Dashcam, HVAC, charging, doors, trunk, windows, and more via web dashboard or CLI.

Readme

tesla-rpi-plugin

Complete Tesla vehicle control for Raspberry Pi with web dashboard, REST API, and clip management.

npm version License: MIT

Features

\u{1F512} Security Controls

  • Lock / Unlock doors (toggle)
  • Sentry Mode on/off (toggle)
  • Valet Mode on/off with PIN
  • Trunk / Frunk open

\u2744\uFE0F Climate Controls

  • HVAC start/stop (pre-conditioning)
  • Temperature set driver/passenger
  • Seat heaters per-seat or all (levels 0-3)
  • Steering wheel heater on/off
  • Presets: Winter Mode, Summer Mode, All Off

\u26A1 Charging Controls

  • Start / Stop charging (toggle)
  • Charge port open/close (toggle)
  • Charge limit set 50-100%, standard, max
  • Scheduled charging enable/disable with time
  • Charging amps control (1-48A)

\u{1F697} Driving Controls

  • Windows vent/close (toggle)
  • Flash lights
  • Honk horn
  • Speed limit mode on/off with PIN
  • Remote start drive
  • HomeLink trigger (garage door)

\u{1F4F9} Camera & Clips

  • Sentry Mode toggle via API
  • Dashcam save current clip
  • Clip sync from Tesla USB/SSD
  • Clip viewer in web dashboard
  • Storage management with auto-cleanup

\u{1F4CA} Telemetry (read-only)

  • Battery level & range
  • Interior/exterior temperature
  • GPS location
  • Odometer
  • Vehicle state (online/asleep/driving)
  • Charging state & power

Installation

```bash npm install -g tesla-rpi-plugin ```

Or run directly:

```bash npx tesla-rpi-plugin ```

Quick Start

```bash

1. Install

npm install -g tesla-rpi-plugin

2. Edit configuration

nano ~/.tesla-rpi/config.yaml

3. Run (first time will open browser for Tesla OAuth2)

tesla-rpi

4. Open dashboard

http://your-raspberry-pi:5000

```

Configuration

Create `config/config.yaml`:

```yaml tesla: client_id: "YOUR_CLIENT_ID" # Register at developer.tesla.com client_secret: "YOUR_CLIENT_SECRET" redirect_uri: "http://localhost:8888/callback"

clips: tesla_usb_mount: "/mnt/tesla_usb" local_storage: "./clips" delete_after_sync: false max_storage_gb: 32

server: host: "0.0.0.0" port: 5000 password: "your_password" ```

Usage

```bash

Full server with dashboard

tesla-rpi

Show vehicle status

tesla-rpi --status

Sync clips only

tesla-rpi --sync-only ```

REST API

All endpoints return `{ ok: boolean, data?: any, error?: string }`

Security

| Method | Endpoint | Description | |--------|----------|-------------| | POST | `/api/security/lock` | Lock doors | | POST | `/api/security/unlock` | Unlock doors | | POST | `/api/security/toggle-lock` | Toggle lock | | POST | `/api/security/sentry/enable` | Enable Sentry | | POST | `/api/security/sentry/disable` | Disable Sentry | | POST | `/api/security/sentry/toggle` | Toggle Sentry | | POST | `/api/security/valet/enable` | Enable Valet | | POST | `/api/security/valet/disable` | Disable Valet | | POST | `/api/security/valet/toggle` | Toggle Valet | | POST | `/api/security/trunk` | Open/close trunk | | POST | `/api/security/frunk` | Open frunk |

Climate

| Method | Endpoint | Body | Description | |--------|----------|------|-------------| | POST | `/api/climate/start` | | Start HVAC | | POST | `/api/climate/stop` | | Stop HVAC | | POST | `/api/climate/toggle` | | Toggle HVAC | | POST | `/api/climate/temp` | `{driver, passenger}` | Set temperature | | POST | `/api/climate/seat` | `{seat, level}` | Set seat heater | | POST | `/api/climate/seat/all-on` | `{level}` | All seats on | | POST | `/api/climate/seat/all-off` | | All seats off | | POST | `/api/climate/steering/on` | | Steering heater on | | POST | `/api/climate/steering/off` | | Steering heater off | | POST | `/api/climate/steering/toggle` | | Toggle steering | | POST | `/api/climate/winter` | `{temp}` | Winter preset | | POST | `/api/climate/summer` | `{temp}` | Summer preset | | POST | `/api/climate/off` | | All climate off |

Charging

| Method | Endpoint | Body | Description | |--------|----------|------|-------------| | POST | `/api/charging/start` | | Start charging | | POST | `/api/charging/stop` | | Stop charging | | POST | `/api/charging/toggle` | | Toggle charging | | POST | `/api/charging/port/open` | | Open charge port | | POST | `/api/charging/port/close` | | Close charge port | | POST | `/api/charging/port/toggle` | | Toggle port | | POST | `/api/charging/limit` | `{percent}` | Set limit (50-100) | | POST | `/api/charging/limit/standard` | | Set to 90% | | POST | `/api/charging/limit/max` | | Set to 100% | | POST | `/api/charging/schedule/enable` | `{time}` | Enable scheduled | | POST | `/api/charging/schedule/disable` | | Disable scheduled | | POST | `/api/charging/amps` | `{amps}` | Set amps (1-48) |

Driving

| Method | Endpoint | Body | Description | |--------|----------|------|-------------| | POST | `/api/driving/windows/vent` | | Vent windows | | POST | `/api/driving/windows/close` | | Close windows | | POST | `/api/driving/windows/toggle` | | Toggle windows | | POST | `/api/driving/flash` | | Flash lights | | POST | `/api/driving/honk` | | Honk horn | | POST | `/api/driving/speed-limit/enable` | `{pin}` | Enable speed limit | | POST | `/api/driving/speed-limit/disable` | `{pin}` | Disable speed limit | | POST | `/api/driving/speed-limit/set` | `{limit}` | Set limit (mph) | | POST | `/api/driving/remote-start` | | Remote start | | POST | `/api/driving/homelink` | | Trigger HomeLink |

Camera & Clips

| Method | Endpoint | Description | |--------|----------|-------------| | POST | `/api/camera/sentry/toggle` | Toggle Sentry | | POST | `/api/camera/dashcam/save` | Save dashcam clip | | GET | `/api/clips` | List clips | | POST | `/api/clips/sync` | Force sync | | GET | `/api/clips/storage` | Storage info | | GET | `/api/status` | Full vehicle status |

Run as Service (systemd)

```bash sudo tee /etc/systemd/system/tesla-rpi.service > /dev/null <<EOF [Unit] Description=Tesla RPi Plugin After=network.target

[Service] Type=simple User=pi ExecStart=/usr/bin/npx tesla-rpi-plugin WorkingDirectory=/home/pi/tesla-rpi-plugin Restart=always RestartSec=10

[Install] WantedBy=multi-user.target EOF

sudo systemctl daemon-reload sudo systemctl enable tesla-rpi.service sudo systemctl start tesla-rpi.service ```

Requirements

  • Node.js >= 18
  • Raspberry Pi (any model) or any Linux/macOS machine
  • Tesla Fleet API credentials (register here)

License

MIT