npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

homebridge-tibber-price-next

v0.1.1

Published

Homebridge plugin for Tibber prices with quarter-hourly and hourly slot support

Downloads

241

Readme

Homebridge Tibber Price Next

Neuaufbau des bestehenden Plugins mit einer Architektur, die nicht mehr davon ausgeht, dass Tibber nur Stundenpreise liefert.

Dieses Repo ist auf die aktuelle Tibber-GraphQL-Antwort fuer QUARTER_HOURLY abgeglichen und fuer echte Homebridge-Installation vorbereitet.

Ziele

  • gleiche Kernfunktionen wie das Altprojekt abbilden
  • Preis-Slots generisch behandeln, damit HOURLY und QUARTER_HOURLY moeglich sind
  • API-Integration, Homebridge-Zubehoer und Charting sauber trennen
  • spaetere Erweiterungen wie "beste Zeitfenster" oder Preisstufen leicht machen

Laufzeitstatus

Das Repository ist als lauffaehiges Plugin vorbereitet:

  • package.json zeigt auf dist/index.js
  • die auslieferbare Runtime liegt in dist/ als CommonJS
  • die TypeScript-Dateien unter src/ bleiben die lesbare Quellbasis fuer die Weiterentwicklung
  • node --test test/*.test.cjs laeuft lokal gruen fuer die Kernberechnungen

Solange wir hier keinen Paketmanager in der Umgebung haben, wird dist/ bewusst mitversioniert.

Installation

Lokale Entwicklung oder manueller Test in Homebridge:

git clone https://github.com/vcesinger/homebridge-tibber-price-next.git
cd homebridge-tibber-price-next
npm install

Falls du das Plugin lokal in eine bestehende Homebridge-Installation linken willst:

npm link
homebridge -D

Fuer eine spaetere Veroeffentlichung nach npm ist die Runtime bereits unter dist/ enthalten.

Enthaltene Funktionen

  • aktueller Preis als Light Sensor
  • relativer Preis als Humidity Sensor
  • Gauge-Sensor von Tagestief bis Tageshoch
  • PNG-Chart fuer heute und morgen
  • Dateicache fuer Preis-Snapshots

Architektur

  • src/tibber: API-Client, Query-Aufbau und Caching
  • src/domain: Preis-Slot-Modell und Berechnungen
  • src/homebridge: Sensoren und Plattform-Glue
  • src/charting: Rendern des PNG-Charts ueber QuickChart
  • src/config: Parsing und Defaults fuer die Plugin-Konfiguration

Tibber-Aufloesung

Das Reboot-Projekt behandelt Preise als generische Slots mit startsAt und durationMinutes. Damit kann dieselbe Berechnungslogik sowohl mit Stunden- als auch mit Viertelstundenpreisen arbeiten.

Standardmaessig ist QUARTER_HOURLY konfiguriert.

Laut offizieller Tibber-Referenz laeuft das ueber Subscription.priceInfo(resolution: QUARTER_HOURLY). Die Referenz beschreibt ausserdem:

  • PriceInfoResolution: HOURLY, QUARTER_HOURLY
  • priceInfo.today und priceInfo.tomorrow als aktuelle Tageslisten
  • Subscription.priceInfoRange als Nachfolger von priceInfo.range

Quelle:

Beispielkonfiguration

{
  "platform": "HomebridgeTibberPriceNext",
  "accessToken": "TIBBER_TOKEN",
  "priceResolution": "QUARTER_HOURLY",
  "priceMode": "TOTAL",
  "activatePriceSensor": true,
  "activateRelativePriceSensor": true,
  "activateGaugePriceSensor": true,
  "activatePriceGraphing": true
}

Mit fest gesetzter homeId:

{
  "platform": "HomebridgeTibberPriceNext",
  "accessToken": "TIBBER_TOKEN",
  "homeId": "4497ca6f-38d2-46c4-a83f-bf33c47e6c89",
  "priceResolution": "QUARTER_HOURLY",
  "priceMode": "TOTAL"
}

Verifiziert

Gegen deine echte Tibber-Antwort ist bestaetigt:

  • priceInfo(resolution: QUARTER_HOURLY) liefert 15-Minuten-Slots
  • today enthaelt bei dir Viertelstundenwerte ueber den ganzen Tag
  • tomorrow kann leer sein und wird vom Client toleriert
  • current passt zum gleichen Slot-Modell wie today

Damit ist die Grundannahme des Reboots technisch bestaetigt.

Offene Punkte

  • fuer Publishing fehlen noch CI und erweiterte Integrationstests
  • optional kann spaeter ein eigener Renderer statt QuickChart gebaut werden