smaevcharger

package
v0.0.0-...-fe68c91 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinAcceptedVersion = "1.2.23"
	TimestampFormat    = "2006-01-02T15:04:05.000Z"

	StatusA       = float64(200111) // Not connected
	StatusB       = float64(200112) // Connected and not charging
	StatusC       = float64(200113) // Connected and charging
	ChargerLocked = float64(5169)   // Charger locked

	SwitchOeko = float64(4950) // Switch in PV Loading (Optimized or Planned PV loading)
	SwitchFast = float64(4718) // Switch in Fast Charge Mode

	FastCharge = "4718" // Schnellladen - 4718
	OptiCharge = "4719" // Optimiertes Laden - 4719
	PlanCharge = "4720" // Laden mit Vorgabe - 4720
	StopCharge = "4721" // Ladestopp - 4721

	ChargerAppLockEnabled  = "1129"
	ChargerAppLockDisabled = "1130"

	ChargerManualLockEnabled  = "5171"
	ChargerManualLockDisabled = "5172"
)

Variables

This section is empty.

Functions

func TokenSource

func TokenSource(log *util.Logger, uri, user, password string) (oauth2.TokenSource, error)

TokenSource creates an SMAevCharger token source

Types

type Measurements

type Measurements struct {
	ChannelId   string `json:"channelId"`
	ComponentId string `json:"componentId"`
	Values      []struct {
		Time  string  `json:"time"`
		Value float64 `json:"value"`
	} `json:"values"`
}

Measurements Data json Response structure

type Parameters

type Parameters struct {
	ComponentId string `json:"componentId"`
	Values      []struct {
		ChannelId      string   `json:"channelId"`
		Editable       bool     `json:"editable"`
		PossibleValues []string `json:"possibleValues,omitempty"`
		State          string   `json:"state"`
		Timestamp      string   `json:"timestamp"`
		Value          string   `json:"value"`
	} `json:"values"`
}

Parameter Data json Response structure

type SendParameter

type SendParameter struct {
	Values []Value `json:"values"`
}

Parameter Data json Send structure

type Token

type Token struct {
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	TokenType    string `json:"token_type"`
	RefreshToken string `json:"refresh_token"`
}

Token is the SMAEVCHarger22 Token Auth Token Data json Response structure

func (*Token) AsOAuth2Token

func (t *Token) AsOAuth2Token() *oauth2.Token

type Value

type Value struct {
	Timestamp string `json:"timestamp"`
	ChannelId string `json:"channelId"`
	Value     string `json:"value"`
}

part of Parameter Send structure

Jump to

Keyboard shortcuts

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