homebridge-teslemetry
v1.0.1
Published
Teslemetry integration for Homebridge with real-time streaming support
Maintainers
Readme
homebridge-teslemetry
Teslemetry platform plugin for Homebridge with real-time streaming for Tesla vehicles and energy site monitoring.
Features
🚗 Tesla Vehicle Control
- Real-time status updates via Server-Sent Events (SSE)
- Lock/unlock doors, charge port lock
- Climate control (heat/cool)
- Charge start/stop, charge limit, charge port
- Sentry mode and wake control
- Defrost, door sensors, battery level
⚡ Energy Site Support
- Powerwall monitoring
- Backup reserve, operation mode, storm watch, and grid charging control
🔄 Live Updates
- Vehicles: instant updates via real-time streaming (SSE), no polling
- Energy sites: periodic polling for status and power flow
- Built on Teslemetry's Fleet Telemetry API
Requirements
- Active Teslemetry Subscription: Create an account and get an access token at teslemetry.com
- Node.js: Version 18 or higher
- Homebridge: Version 1.8.0 or higher
- Fleet Telemetry Support: Your vehicle must support Fleet Telemetry (most recent Tesla vehicles)
Installation
Via Homebridge Config UI X (Recommended)
- Search for "Teslemetry" in the Homebridge Config UI X plugin search
- Click Install
- Configure the plugin with your Teslemetry access token
Via Command Line
npm install -g homebridge-teslemetryOr if using pnpm:
pnpm add -g homebridge-teslemetryConfiguration
Via Homebridge Config UI X
The easiest way to configure this plugin is through the Homebridge Config UI X interface. All options are available through the visual interface.
Manual Configuration
Add the following to your Homebridge config.json:
{
"platforms": [
{
"platform": "Teslemetry",
"name": "Teslemetry",
"accessToken": "your_teslemetry_access_token_here",
"prefixName": true,
"ignoreVehicles": [],
"ignoreEnergySites": []
}
]
}Configuration Options
| Option | Type | Required | Default | Description |
|--------|------|----------|---------|-------------|
| platform | string | Yes | - | Must be "Teslemetry" |
| accessToken | string | Yes | - | Your Teslemetry API access token from teslemetry.com |
| name | string | No | "Teslemetry" | Display name for the platform |
| prefixName | boolean | No | true | Whether to prefix accessory names with the vehicle name |
| ignoreVehicles | string[] | No | [] | Array of vehicle VINs to ignore |
| ignoreEnergySites | number[] | No | [] | Array of energy site IDs to ignore |
Getting a Teslemetry Access Token
- Go to teslemetry.com
- Create an account or log in
- Navigate to your account settings
- Generate a new API access token
- Copy the token and paste it into your Homebridge configuration
Supported Vehicles
This plugin supports all Tesla vehicles that have Fleet Telemetry capability:
- Model 3 (2017+)
- Model Y (2020+)
- Model S (2021+ refresh)
- Model X (2021+ refresh)
- Cybertruck (2023+)
Older Model S and Model X vehicles may have limited support.
HomeKit Accessories
Each Tesla vehicle appears as multiple accessories in HomeKit, backed by real-time streaming:
- Battery - Battery level and charging status
- Lock - Lock/unlock doors
- Climate - Temperature control and HVAC
- Charge Port - Open/close charge port
- Charge Switch - Start/stop charging
- Charge Limit - Set charge limit percentage
- Defrost - Activate max defrost
- Door Sensors - Individual door status
- Sentry Mode - Enable/disable sentry mode
- Wake - Wake the vehicle on demand
Each energy site appears as its own set of accessories:
- Battery - Charge level
- Operation Mode - Switch between self-consumption, backup, autonomous, and time-based control
- Backup Reserve - Set the backup reserve percentage
- Storm Watch - Enable/disable storm watch
- Grid Charging - Enable/disable charging from the grid
Troubleshooting
Plugin Not Discovering Vehicles
- Verify your access token is correct
- Check that you have an active Teslemetry subscription
- Ensure your vehicle supports Fleet Telemetry
- Check Homebridge logs for error messages
Streaming Connection Issues
- Verify network connectivity
- Check that Teslemetry streaming is enabled for your account
- Restart Homebridge
- Check firewall settings (SSE requires persistent connections)
Accessories Not Responding
- Check if vehicle is asleep (may take a moment to wake)
- Verify streaming connection status in logs
- Try restarting the Homebridge service
Development
This package is part of the Teslemetry TypeScript monorepo.
Local Development
# Clone the repository
git clone https://github.com/Teslemetry/typescript-teslemetry.git
cd typescript-teslemetry
# Install dependencies
pnpm install
# Build the package
pnpm --filter homebridge-teslemetry build
# Watch mode for development
pnpm --filter homebridge-teslemetry watchTesting Locally
# Link globally for testing
cd packages/homebridge-teslemetry
pnpm link --global
# In your Homebridge directory
cd ~/.homebridge
pnpm link --global homebridge-teslemetry
# Run Homebridge in debug mode
homebridge -DContributing
Contributions are welcome! Please open an issue or pull request on GitHub.
Support
- Issues: GitHub Issues
- Documentation: Teslemetry Docs
- Community: Teslemetry Discord
License
Apache-2.0 - see LICENSE for details.
Credits
- Built with @teslemetry/api
- Powered by Teslemetry
- Part of the Homebridge ecosystem
Related Projects
- @teslemetry/api - Core TypeScript SDK
- node-red-contrib-teslemetry - Node-RED integration
- n8n-nodes-teslemetry - n8n workflow integration
- iobroker.teslemetry - ioBroker adapter
Changelog
See CHANGELOG.md for release history.
