Repository navigation
Breaking changes
- All
TibberQuerymethods now reject when the Tibber API returns an error, for example an invalid token. Earlier versions returned an empty result, andsendPushNotification()andupdateHome()returned the errors in the result. Usetry/catchor.catch()and readerrorson the rejected object (#198). TibberFeedstops reconnecting when the token is rejected and emits anerrorevent. Callconnect()to try again with a valid token (#198).getConsumption()withouthomeIdreturns a flat list withhomeIdon each record, instead of one list per home (#198).PriceResolution.DAILYis removed, as the price methods never accepted it. UsePriceRangeResolution.DAILYwithgetEnergyPriceRange()(#198).
What's new
- Tibber Data API support (#201):
TibberOAuth,TibberDataandTibberDataFeedgive 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 thedata-api-*examples. getEnergyPriceRange()returns historical prices inDAILY,HOURLYorQUARTER_HOURLYresolution with page info (#199).getProduction(),getProductionPage()andgetConsumptionPage(), withfirst/last,before/after(cursor orDate) andfilterEmptyNodes(#199).powerReactiveandpowerProductionReactivein the live feed (#199).- All models and enums are exported from the package root (#199).
Fixes
TibberFeednow backs off exponentially when connecting fails. The backoff was reset on every failed attempt, giving a retry about every 3 seconds (#198).TibberFeedno longer opens several websockets while waiting for the connection to be acknowledged (#198).TibberFeedreconnects after the server completes the subscription (#198).getCurrentEnergyPrices()skips homes without a current price instead of returningundefinedentries (#198).
Maintenance
npm run lintworks again, with ESLint replacing the removed tslint setup (#200).- The library version is read from
package.jsoninstead of a generatedVersion.ts(#200). - CI tests on Node 18, 20, 22 and 24 (#200).
Full Changelog: v5.6.0...v6.0.0