Skip to content
Open
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
6 changes: 0 additions & 6 deletions .changeset/cybercab-model-detection.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/homebridge-native-capability-tranche.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/model-dictionary-dedup.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/vehicle-data-endpoints-sync.md

This file was deleted.

13 changes: 13 additions & 0 deletions packages/api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
21 changes: 21 additions & 0 deletions packages/homebridge-teslemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/homebridge-teslemetry/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 9 additions & 0 deletions packages/iobroker.teslemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/iobroker.teslemetry/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down