From fb68c92d1d7503d71a0e5df135238a86404e7844 Mon Sep 17 00:00:00 2001 From: Brett Adams Date: Tue, 28 Jul 2026 17:32:07 +1000 Subject: [PATCH] fix(homebridge-teslemetry): finish npm publish readiness for the same-name major hard cut - Add publishConfig (access/provenance) and a package-local LICENSE file, matching the other publishable packages - the legacy 0.4.x package ships a LICENSE and the monorepo package had none. - Fix the README's license/contributing links, which pointed at a root LICENSE/CONTRIBUTING.md that doesn't exist anywhere in this repo. - Remove the config.schema.json/settings.ts latitude/longitude "Homelink" fields - Homelink was dropped in the #63 hard cut but the dead config survived, so real users would see a config option with no effect. - Rewrite the stale "Phase 1/Phase 2 coming soon" feature list to match what's actually implemented in src/vehicle-services and src/energy-services. --- AGENTS.md | 2 +- packages/homebridge-teslemetry/LICENSE | 17 +++++++ packages/homebridge-teslemetry/README.md | 48 +++++++++---------- .../homebridge-teslemetry/config.schema.json | 20 -------- packages/homebridge-teslemetry/package.json | 9 +++- .../homebridge-teslemetry/src/settings.ts | 12 ----- 6 files changed, 47 insertions(+), 61 deletions(-) create mode 100644 packages/homebridge-teslemetry/LICENSE diff --git a/AGENTS.md b/AGENTS.md index eefcaa2..424ee27 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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. diff --git a/packages/homebridge-teslemetry/LICENSE b/packages/homebridge-teslemetry/LICENSE new file mode 100644 index 0000000..7312f98 --- /dev/null +++ b/packages/homebridge-teslemetry/LICENSE @@ -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. diff --git a/packages/homebridge-teslemetry/README.md b/packages/homebridge-teslemetry/README.md index 0c5ca17..d1103c4 100644 --- a/packages/homebridge-teslemetry/README.md +++ b/packages/homebridge-teslemetry/README.md @@ -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 @@ -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": [] } @@ -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 | @@ -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 +- **Backup Reserve** - Set the backup reserve percentage +- **Storm Watch** - Enable/disable storm watch +- **Grid Charging** - Enable/disable charging from the grid ## Troubleshooting @@ -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 @@ -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 @@ -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 diff --git a/packages/homebridge-teslemetry/config.schema.json b/packages/homebridge-teslemetry/config.schema.json index 41cc7af..1bca477 100644 --- a/packages/homebridge-teslemetry/config.schema.json +++ b/packages/homebridge-teslemetry/config.schema.json @@ -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", @@ -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", diff --git a/packages/homebridge-teslemetry/package.json b/packages/homebridge-teslemetry/package.json index 1241ef7..706c542 100644 --- a/packages/homebridge-teslemetry/package.json +++ b/packages/homebridge-teslemetry/package.json @@ -50,6 +50,11 @@ }, "files": [ "dist", - "config.schema.json" - ] + "config.schema.json", + "LICENSE" + ], + "publishConfig": { + "access": "public", + "provenance": true + } } diff --git a/packages/homebridge-teslemetry/src/settings.ts b/packages/homebridge-teslemetry/src/settings.ts index 8aee045..1ad0262 100644 --- a/packages/homebridge-teslemetry/src/settings.ts +++ b/packages/homebridge-teslemetry/src/settings.ts @@ -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 */