Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pnpm --filter node-red-contrib-teslemetry build
### 4. `homebridge-teslemetry` - Homebridge Plugin

**Location**: `packages/homebridge-teslemetry/`
**Status**: Published to npm as `homebridge-teslemetry`, superseding the legacy hand-published package of the same name via a same-name major hard cut (v1.0.0 over legacy 0.4.x) - no dual-maintain, no rename.
**Status**: Ready to publish to npm as `homebridge-teslemetry` 1.0.0, superseding the legacy hand-published package of the same name via a same-name major hard cut (no dual-maintain, no rename). The first CI publish attempt 404s until npm trusted publishing is registered for the `homebridge-teslemetry` package name on npmjs.com - only an npm org owner can do that; once registered, the existing changesets flow publishes on the next merge to `main` without further repo changes.

**Purpose**: Exposes vehicles and energy sites as HomeKit accessories via `src/vehicle-services/*` and `src/energy-services/*` service classes, each a thin adapter between a HomeKit `Service`/`Characteristic` and the corresponding `@teslemetry/api` method.

Expand Down
17 changes: 17 additions & 0 deletions packages/homebridge-teslemetry/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Copyright 2026 Teslemetry

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
48 changes: 22 additions & 26 deletions packages/homebridge-teslemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ Teslemetry platform plugin for Homebridge with real-time streaming for Tesla veh

🚗 **Tesla Vehicle Control**
- Real-time status updates via Server-Sent Events (SSE)
- Lock/unlock doors
- Lock/unlock doors, charge port lock
- Climate control (heat/cool)
- Charge management
- Sentry mode control
- Window control
- And more...
- Charge start/stop, charge limit, charge port
- Sentry mode and wake control
- Defrost, door sensors, battery level

⚡ **Energy Site Support**
- Powerwall monitoring
- Solar production tracking
- Backup reserve, storm watch, and grid control
- Backup reserve, operation mode, storm watch, and grid charging control

🔄 **Live Updates**
- Vehicles: instant updates via real-time streaming (SSE), no polling
Expand Down Expand Up @@ -71,8 +69,6 @@ Add the following to your Homebridge `config.json`:
"name": "Teslemetry",
"accessToken": "your_teslemetry_access_token_here",
"prefixName": true,
"latitude": 37.7749,
"longitude": -122.4194,
"ignoreVehicles": [],
"ignoreEnergySites": []
}
Expand All @@ -88,8 +84,6 @@ Add the following to your Homebridge `config.json`:
| `accessToken` | string | **Yes** | - | Your Teslemetry API access token from [teslemetry.com](https://teslemetry.com) |
| `name` | string | No | `"Teslemetry"` | Display name for the platform |
| `prefixName` | boolean | No | `true` | Whether to prefix accessory names with the vehicle name |
| `latitude` | number | No | - | Latitude for Homelink activation (required if using Homelink) |
| `longitude` | number | No | - | Longitude for Homelink activation (required if using Homelink) |
| `ignoreVehicles` | string[] | No | `[]` | Array of vehicle VINs to ignore |
| `ignoreEnergySites` | number[] | No | `[]` | Array of energy site IDs to ignore |

Expand All @@ -115,24 +109,26 @@ Older Model S and Model X vehicles may have limited support.

## HomeKit Accessories

Each Tesla vehicle will appear as multiple accessories in HomeKit:
Each Tesla vehicle appears as multiple accessories in HomeKit, backed by real-time streaming:

### Current Implementation (Phase 1)
- **Vehicle Discovery** - Automatic discovery and registration of vehicles
- **Real-time Streaming** - Connection to Teslemetry's streaming API

### Coming Soon (Phase 2)
- **Battery Service** - Battery level and charging status
- **Lock Service** - Lock/unlock doors
- **Climate Service** - Temperature control and HVAC
- **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 Service** - Activate max defrost
- **Defrost** - Activate max defrost
- **Door Sensors** - Individual door status
- **Window Control** - Vent/close windows
- **Sentry Mode** - Enable/disable sentry mode
- **Homelink** - Trigger Homelink (requires location config)
- **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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop promising writable time-based control

For users selecting the documented time-based operation mode, the service does not switch modes: operation-mode.ts explicitly treats time_based_control as read-only, logs a warning, and returns without calling the API (lines 93–100). Document this mode as status-only rather than listing it among the modes users can switch to.

Useful? React with 👍 / 👎.

- **Backup Reserve** - Set the backup reserve percentage
- **Storm Watch** - Enable/disable storm watch
- **Grid Charging** - Enable/disable charging from the grid

## Troubleshooting

Expand Down Expand Up @@ -194,7 +190,7 @@ homebridge -D

## Contributing

Contributions are welcome! Please read the [contributing guidelines](../../CONTRIBUTING.md) before submitting pull requests.
Contributions are welcome! Please open an issue or pull request on [GitHub](https://github.com/Teslemetry/typescript-teslemetry).

## Support

Expand All @@ -204,7 +200,7 @@ Contributions are welcome! Please read the [contributing guidelines](../../CONTR

## License

Apache-2.0 - see [LICENSE](../../LICENSE) for details.
Apache-2.0 - see [LICENSE](./LICENSE) for details.

## Credits

Expand All @@ -217,7 +213,7 @@ Apache-2.0 - see [LICENSE](../../LICENSE) for details.
- [@teslemetry/api](../api) - Core TypeScript SDK
- [node-red-contrib-teslemetry](../node-red-contrib-teslemetry) - Node-RED integration
- [n8n-nodes-teslemetry](../n8n-nodes-teslemetry) - n8n workflow integration
- [homey](../homey) - Homey smart home app
- [iobroker.teslemetry](../iobroker.teslemetry) - ioBroker adapter

## Changelog

Expand Down
20 changes: 0 additions & 20 deletions packages/homebridge-teslemetry/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@
"required": false,
"description": "Prefix accessory names with vehicle/site name for easier identification"
},
"latitude": {
"title": "Latitude",
"type": "number",
"required": false,
"description": "Latitude for Homelink activation (required for Homelink service)"
},
"longitude": {
"title": "Longitude",
"type": "number",
"required": false,
"description": "Longitude for Homelink activation (required for Homelink service)"
},
"ignoreVehicles": {
"title": "Ignore Vehicles",
"type": "array",
Expand Down Expand Up @@ -78,14 +66,6 @@
"expanded": false,
"items": ["name", "prefixName"]
},
{
"type": "fieldset",
"title": "Homelink Location",
"expandable": true,
"expanded": false,
"description": "Configure location for Homelink activation",
"items": ["latitude", "longitude"]
},
{
"type": "fieldset",
"title": "Filters",
Expand Down
9 changes: 7 additions & 2 deletions packages/homebridge-teslemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
},
"files": [
"dist",
"config.schema.json"
]
"config.schema.json",
"LICENSE"
],
"publishConfig": {
"access": "public",
"provenance": true
}
}
12 changes: 0 additions & 12 deletions packages/homebridge-teslemetry/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ export interface TeslemetryPlatformConfig {
*/
accessToken: string;

/**
* Latitude for Homelink activation
* Required if using Homelink service
*/
latitude?: number;

/**
* Longitude for Homelink activation
* Required if using Homelink service
*/
longitude?: number;

/**
* List of vehicle VINs to ignore
*/
Expand Down
Loading