Skip to content

v6.0.0

Latest

Choose a tag to compare

@bisand bisand released this 11 Oct 23:04
· 2 commits to master since this release
0b24ef8

Breaking changes

  • All TibberQuery methods now reject when the Tibber API returns an error, for example an invalid token. Earlier versions returned an empty result, and sendPushNotification() and updateHome() returned the errors in the result. Use try/catch or .catch() and read errors on the rejected object (#198).
  • TibberFeed stops reconnecting when the token is rejected and emits an error event. Call connect() to try again with a valid token (#198).
  • getConsumption() without homeId returns a flat list with homeId on each record, instead of one list per home (#198).
  • PriceResolution.DAILY is removed, as the price methods never accepted it. Use PriceRangeResolution.DAILY with getEnergyPriceRange() (#198).

What's new

  • Tibber Data API support (#201): TibberOAuth, TibberData and TibberDataFeed give access to devices paired to Tibber (vehicles, chargers, thermostats, heat pumps, inverters, batteries), device history, and live measurements from Pulse and Watty over Server-Sent Events. The Data API requires an OAuth client; see the new README section and the data-api-* examples.
  • getEnergyPriceRange() returns historical prices in DAILY, HOURLY or QUARTER_HOURLY resolution with page info (#199).
  • getProduction(), getProductionPage() and getConsumptionPage(), with first/last, before/after (cursor or Date) and filterEmptyNodes (#199).
  • powerReactive and powerProductionReactive in the live feed (#199).
  • All models and enums are exported from the package root (#199).

Fixes

  • TibberFeed now backs off exponentially when connecting fails. The backoff was reset on every failed attempt, giving a retry about every 3 seconds (#198).
  • TibberFeed no longer opens several websockets while waiting for the connection to be acknowledged (#198).
  • TibberFeed reconnects after the server completes the subscription (#198).
  • getCurrentEnergyPrices() skips homes without a current price instead of returning undefined entries (#198).

Maintenance

  • npm run lint works again, with ESLint replacing the removed tslint setup (#200).
  • The library version is read from package.json instead of a generated Version.ts (#200).
  • CI tests on Node 18, 20, 22 and 24 (#200).

Full Changelog: v5.6.0...v6.0.0