download

package
v0.0.0-...-bb34d44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Download

type Download struct {
	StationNumber string
	Username      string
	Password      string
	BaseURL       *url.URL
	Jar           *cookiejar.Jar
	Client        *http.Client
}

func NewDownloader

func NewDownloader(config *config.Config) (*Download, error)

func (*Download) DownloadFile

func (d *Download) DownloadFile(ExportDate string, Folder string) error

func (*Download) GetLiveData

func (d *Download) GetLiveData() (*LiveData, error)

func (*Download) GetTodayData

func (d *Download) GetTodayData() (*TodayData, error)

type LiveData

type LiveData struct {
	PhotoVoltaic1Watts     int `json:"ppv1"`
	PhotoVoltaic2Watts     int `json:"ppv2"`
	PhotoVoltaic3Watts     int `json:"ppv3"`
	PhotoVoltaicTotalWatts int `json:"ppv"`
	InverterToBattery      int `json:"pCharge"`
	BatteryToInverter      int `json:"pDisCharge"`
	BatteryChargePercent   int `json:"soc"`
	InverterToLoad         int `json:"pinv"`
	GridToLoad             int `json:"pToUser"`
	InverterToGrid         int `json:"pToGrid"`
}

type LiveDataDisplay

type LiveDataDisplay LiveData

func (LiveDataDisplay) MarshalJSON

func (ldd LiveDataDisplay) MarshalJSON() ([]byte, error)

type TodayData

type TodayData struct {
	SolarYield         float64 `json:"todayYielding"`
	SolarYieldTotal    float64 `json:"totalYielding"`
	BatteryCharge      float64 `json:"todayCharging"`
	BatteryChargeTotal float64 `json:"totalCharging"`
	Export             float64 `json:"todayExport"`
	ExportTotal        float64 `json:"totalExport"`
	Import             float64 `json:"todayImport"`
	ImportTotal        float64 `json:"totalImport"`
	Usage              float64 `json:"todayUsage"`
	UsageTotal         float64 `json:"totalUsage"`
}

type TodayDataDisplay

type TodayDataDisplay TodayData

func (TodayDataDisplay) MarshalJSON

func (tdd TodayDataDisplay) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL