Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CurrentSubscription ¶
type Features ¶
type Features struct {
RealTimeConsumptionEnabled bool `json:"realTimeConsumptionEnabled"`
}
Features - tibber pulse connected
type Home ¶
type Home struct { ID string `json:"id"` AppNickname string `json:"appNickname"` MeteringPointData MeteringPointData `json:"meteringPointData"` Features Features `json:"features"` Address Address `json:"address"` Size int `json:"size"` MainFuseSize int `json:"mainFuseSize"` NumberOfResidents int `json:"numberOfResidents"` PrimaryHeatingSource string `json:"primaryHeatingSource"` HasVentilationSystem bool `json:"hasVentilationSystem"` CurrentSubscription CurrentSubscription `json:"currentSubscription"` PreviousMeterData PreviousMeterData `json:"previousMeterData"` }
Home structure
type LiveMeasurement ¶
type LiveMeasurement struct { HomeId string `json:"homeId"` Timestamp time.Time `json:"timestamp"` Power float64 `json:"power"` MinPower float64 `json:"minPower"` AveragePower float64 `json:"averagePower"` MaxPower float64 `json:"maxPower"` LastMeterConsumption float64 `json:"lastMeterConsumption"` LastMeterProduction float64 `json:"lastMeterProduction"` AccumulatedConsumption float64 `json:"accumulatedConsumption"` AccumulatedProduction float64 `json:"accumulatedProduction"` AccumulatedCost float64 `json:"accumulatedCost"` AccumulatedConsumptionLastHour float64 `json:"accumulatedConsumptionLastHour"` AccumulatedProductionLastHour float64 `json:"accumulatedProductionLastHour"` Currency string `json:"currency"` }
type MeteringPointData ¶
type MeteringPointData struct {
ConsumptionEan string `json:"consumptionEan"`
}
MeteringPointData - meter number
type PreviousMeterData ¶
type QueryResponse ¶
type QueryResponse struct {
Viewer Viewer
}
type TibberClient ¶
type TibberClient struct {
// contains filtered or unexported fields
}
func CreateTibberClient ¶
func CreateTibberClient(token string, agent string) *TibberClient
func (*TibberClient) Close ¶
func (ctx *TibberClient) Close()
func (*TibberClient) GetHomes ¶
func (ctx *TibberClient) GetHomes() (QueryResponse, error)
func (*TibberClient) GetPriceInfo ¶
func (ctx *TibberClient) GetPriceInfo(homeId string) (CurrentSubscription, error)
func (*TibberClient) StartSubscription ¶
func (ctx *TibberClient) StartSubscription(homeId string, outputChannel chan<- LiveMeasurement) error
Click to show internal directories.
Click to hide internal directories.