Releases: Teslemetry/typescript-teslemetry
Releases · Teslemetry/typescript-teslemetry
@teslemetry/[email protected]
Patch Changes
- 54c358b: Fix timezone bug in date formatting for telemetry history API calls
@teslemetry/[email protected]
Patch Changes
- 8fedd76: Fix bug with sendCache
@teslemetry/[email protected]
Patch Changes
-
6291669: Update SSE event handling to use standard EventEmitter pattern:
- Replace
onData(),onState(), etc. withon("data"),on("state")pattern - Use new
on("all")event for subscribing to all events - Add VIN filtering in event callbacks
Improve error handling:
- Config node tracks errors from initial API verification (auth/subscription issues)
- All nodes now show "Error" status with red ring when API verification fails
- Nodes wait for API verification before attempting SSE connections
- Clearer error messages in node logs
Refactor shared helpers:
- Add
getInstance()to get and validate config instance - Add
hasInstanceError()for synchronous error checking (command nodes) - Add
verifyInstance()for async verification before SSE connection - Add
getErrorMessage()to extract useful messages from any error type (handles hey-api response objects)
- Replace
@teslemetry/[email protected]
Patch Changes
- 6291669: Update SSE event handling to use standard EventEmitter pattern:
- Replace
onData(),onState(), etc. withon("data"),on("state")pattern - Use new
on("all")event for subscribing to all events - Add VIN filtering in event callbacks
- Replace
@teslemetry/[email protected]
Patch Changes
-
6291669: Standardize SSE event handling to use EventEmitter pattern:
- Remove
onConnection()helper method - useon("connect")andon("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 fromupdateFields()
Refactor
updateFields()internals:- Consolidate batch state into single
_fieldUpdateBatchobject - Extract flush logic into
_flushFieldUpdate()method - Use Deferred pattern for cleaner promise handling
- Remove
@teslemetry/[email protected]
Minor Changes
-
c47e6b4: Add teslemetry-energy-history node for retrieving historical energy data
New node supports three history types:
- Energy History - energy measurements (solar, battery, grid) aggregated by period
- Backup History - off-grid event history aggregated by period
- Telemetry (Charging) - wall connector charging history
Configurable date range with start/end dates and timezone support.
@teslemetry/[email protected]
Patch Changes
- 5d045ee: Fix the streaming types
@teslemetry/[email protected]
Patch Changes
- e887196: Allow dates to be undefined and excluded from the API calls.
@teslemetry/[email protected]
Patch Changes
- b7c2726: Fix types for calandarHistory
@teslemetry/[email protected]
Patch Changes
- 3ecc77d: Cache and refresh history endpoints