connect

package
v0.0.0-...-e05b1bb Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SettingsPath     = "settings"
	MeasurementsPath = "measurements"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChargingCurrent

type ChargingCurrent struct {
	Value float64
}

ChargingCurrent is Settings.Values.ChargingCurrent

type ChargingStatus

type ChargingStatus struct {
	Charging bool
}

ChargingStatus is Settings.Values.ChargingStatus

type DeviceMetadata

type DeviceMetadata struct {
	Password string
}

DeviceMetadata is Settings.Values.DeviceMetadata

type Info

type Info struct {
	Connected bool
}

Info is Settings.Info

type Measurements

type Measurements struct {
	Message               string `json:"omitempty"` // api message if not ok
	ChargingEnergy        float64
	ChargingEnergyOverAll float64
	ChargingPower         float64
	ChargingPowerPhase    [3]float64
	ChargingCurrentPhase  [3]float64
	Frequency             float64
}

Measurements is the /api/measurements response

type Settings

type Settings struct {
	Message string `json:",omitempty"` // api message if not ok
	Info    *Info  `json:",omitempty"`
	Values  Values
}

Settings is the /api/settings request/response

type Values

type Values struct {
	ChargingStatus  *ChargingStatus  `json:",omitempty"`
	ChargingCurrent *ChargingCurrent `json:",omitempty"`
	DeviceMetadata  DeviceMetadata
}

Values is Settings.Values

Jump to

Keyboard shortcuts

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