diff --git a/.changeset/cybercab-model-detection.md b/.changeset/cybercab-model-detection.md deleted file mode 100644 index 8031212..0000000 --- a/.changeset/cybercab-model-detection.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@teslemetry/api": patch -"homebridge-teslemetry": patch ---- - -Add Cybercab ("A") to VIN-based model detection: `useTeslaModel` now decodes the 4th VIN character "A" to "Cybercab", and the Homebridge information service's model-name extraction recognizes "Cybercab" in the vehicle name. diff --git a/.changeset/homebridge-native-capability-tranche.md b/.changeset/homebridge-native-capability-tranche.md deleted file mode 100644 index 7017e30..0000000 --- a/.changeset/homebridge-native-capability-tranche.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"homebridge-teslemetry": minor ---- - -Add the HomeKit-native "safety, presence, and energy continuity" capability tranche: - -- Vehicle home/work OccupancySensor presence (favourite location opt-in via `enableFavoritePresence`), created only once a field actually reports a value and debounced against geofence-boundary flicker. -- TPMS warning contact sensors: one aggregate critical-warning sensor plus four per-wheel soft-warning sensors, preserving "unknown" via `StatusFault` rather than defaulting a missing reading to safe. -- Grid outage and active Storm Watch contact sensors driven by `live_status`, distinct from the existing Storm Watch settings switch. -- Wall Connector fault and vehicle-connected contact sensors per Wall Connector DIN. - -No power/pressure/coordinate numerics are exposed anywhere in this tranche - only standard HomeKit services and semantic booleans. diff --git a/.changeset/model-dictionary-dedup.md b/.changeset/model-dictionary-dedup.md deleted file mode 100644 index db96cea..0000000 --- a/.changeset/model-dictionary-dedup.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@teslemetry/api": patch ---- - -Bump `tesla-fleet-api` to 0.3.0 and consume its exported `Models` map (deep-imported from `tesla-fleet-api/dist/types/vehicle.js`) instead of a local copy for VIN-based model detection. `useTeslaModel()`'s public behavior and test coverage are unchanged, including Cybercab ("A"). diff --git a/.changeset/vehicle-data-endpoints-sync.md b/.changeset/vehicle-data-endpoints-sync.md deleted file mode 100644 index 3be4bf6..0000000 --- a/.changeset/vehicle-data-endpoints-sync.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@teslemetry/api": patch ---- - -Add `charge_schedule_data` and `preconditioning_schedule_data` to `VehicleDataEndpoints`, matching the endpoint list the generated client documents for `GET /api/1/vehicles/{vin}/vehicle_data`. The hand-maintained union had drifted behind those two endpoints. diff --git a/packages/api/CHANGELOG.md b/packages/api/CHANGELOG.md index 8bf90ee..b851bf1 100644 --- a/packages/api/CHANGELOG.md +++ b/packages/api/CHANGELOG.md @@ -1,5 +1,13 @@ # @teslemetry/api +## 0.11.2 + +### Patch Changes + +- b5c8b63: Add Cybercab ("A") to VIN-based model detection: `useTeslaModel` now decodes the 4th VIN character "A" to "Cybercab", and the Homebridge information service's model-name extraction recognizes "Cybercab" in the vehicle name. +- 0be2d1b: Bump `tesla-fleet-api` to 0.3.0 and consume its exported `Models` map (deep-imported from `tesla-fleet-api/dist/types/vehicle.js`) instead of a local copy for VIN-based model detection. `useTeslaModel()`'s public behavior and test coverage are unchanged, including Cybercab ("A"). +- f17e85c: Add `charge_schedule_data` and `preconditioning_schedule_data` to `VehicleDataEndpoints`, matching the endpoint list the generated client documents for `GET /api/1/vehicles/{vin}/vehicle_data`. The hand-maintained union had drifted behind those two endpoints. + ## 0.11.1 ### Patch Changes @@ -25,6 +33,7 @@ - 9cd3c30: Add `live_status`/`site_info` energy SSE events to `TeslemetryStream`, mirroring the existing vehicle event surface. `sse.getEnergySite(id)` returns a `TeslemetryEnergySiteStream` (analogous to `getVehicle`) that emits these events and replays the local cache to new listeners; account-wide and single-site streams both work through the existing optional-id connection mechanism. Forward-compatible and inert until the backend's energy SSE feature (flag-gated) is enabled. - dba83c5: Add the `energy_totals` energy SSE event to `TeslemetryStream`/`TeslemetryEnergySiteStream`, mirroring the existing `live_status`/`site_info` event surface. The event carries a compact, typed cumulative-totals object (`EnergyHistoryTotals`) plus the canonical REST `url` to re-fetch the full calendar history document - it never carries the full time_series/events payload itself. Silence on this event means no change since the last server-side poll, not staleness. Purely additive; existing event contracts are unchanged. - 1908085: Add typed support for the API's SSE topic-selection and tariff-v2 protocol changes: + - `stream.topics` opt-in on `Teslemetry`/`TeslemetryStream` selects an exact comma-separated topic allowlist, either exact wire names or the bundled `SSE_TOPIC_PRESETS` (`vehicleFull`, `vehicleCore`, `energyLive`, `energyFullState`, `account`), expanded client-side before connecting. Omitting `topics` keeps legacy-all behavior forever. - New `tariff_content_v2` event on `TeslemetryStream`/`TeslemetryEnergySiteStream`; a `null` body is the server's explicit tariff-removal signal, distinct from "no update yet". - `site_info` events no longer carry tariff fields (matches the server's slim `site_info` schema); existing `site_info` listeners keep working unchanged. @@ -73,6 +82,7 @@ ### Patch Changes - 0b18bc3: Fix timezone handling in telemetry history API calls + - Format dates as RFC3339 with local timezone offset instead of UTC - Default time_zone parameter to local IANA timezone @@ -96,17 +106,20 @@ ### Patch Changes - 6291669: Standardize SSE event handling to use EventEmitter pattern: + - Remove `onConnection()` helper method - use `on("connect")` and `on("disconnect")` instead - Add `"all"` event type to subscribe to all SSE events at once - Update documentation and examples to reflect new patterns Fix unhandled promise rejections in SSE streaming: + - Add error handling to `connect()` method's internal connection loop - `updateFields()` now returns a promise that resolves/rejects when the debounced update completes - Multiple calls within the debounce window share the same promise - `addField()` now properly returns the promise from `updateFields()` Refactor `updateFields()` internals: + - Consolidate batch state into single `_fieldUpdateBatch` object - Extract flush logic into `_flushFieldUpdate()` method - Use Deferred pattern for cleaner promise handling diff --git a/packages/api/package.json b/packages/api/package.json index 57ef328..c895423 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@teslemetry/api", - "version": "0.11.1", + "version": "0.11.2", "description": "API client for Teslemetry", "main": "dist/index.cjs", "module": "dist/index.mjs", diff --git a/packages/homebridge-teslemetry/CHANGELOG.md b/packages/homebridge-teslemetry/CHANGELOG.md index 280c6fa..e92c5a1 100644 --- a/packages/homebridge-teslemetry/CHANGELOG.md +++ b/packages/homebridge-teslemetry/CHANGELOG.md @@ -1,5 +1,26 @@ # @teslemetry/homebridge-teslemetry +## 1.2.0 + +### Minor Changes + +- 2c6a035: Add the HomeKit-native "safety, presence, and energy continuity" capability tranche: + + - Vehicle home/work OccupancySensor presence (favourite location opt-in via `enableFavoritePresence`), created only once a field actually reports a value and debounced against geofence-boundary flicker. + - TPMS warning contact sensors: one aggregate critical-warning sensor plus four per-wheel soft-warning sensors, preserving "unknown" via `StatusFault` rather than defaulting a missing reading to safe. + - Grid outage and active Storm Watch contact sensors driven by `live_status`, distinct from the existing Storm Watch settings switch. + - Wall Connector fault and vehicle-connected contact sensors per Wall Connector DIN. + + No power/pressure/coordinate numerics are exposed anywhere in this tranche - only standard HomeKit services and semantic booleans. + +### Patch Changes + +- b5c8b63: Add Cybercab ("A") to VIN-based model detection: `useTeslaModel` now decodes the 4th VIN character "A" to "Cybercab", and the Homebridge information service's model-name extraction recognizes "Cybercab" in the vehicle name. +- Updated dependencies [b5c8b63] +- Updated dependencies [0be2d1b] +- Updated dependencies [f17e85c] + - @teslemetry/api@0.11.2 + ## 1.1.1 ### Patch Changes diff --git a/packages/homebridge-teslemetry/package.json b/packages/homebridge-teslemetry/package.json index 788fe71..4be6a8a 100644 --- a/packages/homebridge-teslemetry/package.json +++ b/packages/homebridge-teslemetry/package.json @@ -1,7 +1,7 @@ { "name": "homebridge-teslemetry", "displayName": "Homebridge Teslemetry", - "version": "1.1.1", + "version": "1.2.0", "description": "Teslemetry integration for Homebridge with real-time streaming support", "author": "Teslemetry", "license": "Apache-2.0", diff --git a/packages/iobroker.teslemetry/CHANGELOG.md b/packages/iobroker.teslemetry/CHANGELOG.md index f32223b..882fea3 100644 --- a/packages/iobroker.teslemetry/CHANGELOG.md +++ b/packages/iobroker.teslemetry/CHANGELOG.md @@ -1,5 +1,14 @@ # iobroker.teslemetry +## 0.2.4 + +### Patch Changes + +- Updated dependencies [b5c8b63] +- Updated dependencies [0be2d1b] +- Updated dependencies [f17e85c] + - @teslemetry/api@0.11.2 + ## 0.2.3 ### Patch Changes diff --git a/packages/iobroker.teslemetry/package.json b/packages/iobroker.teslemetry/package.json index 63c1a88..3ac5531 100644 --- a/packages/iobroker.teslemetry/package.json +++ b/packages/iobroker.teslemetry/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.teslemetry", - "version": "0.2.3", + "version": "0.2.4", "description": "ioBroker adapter for Tesla vehicle and energy site control via Teslemetry", "author": { "name": "Teslemetry",