configure

package
v0.0.0-...-175a4df Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultConfigFilename string = "evcc.yaml"
)

Variables

View Source
var DeviceCategories = map[DeviceCategory]DeviceCategoryData{
	DeviceCategoryCharger: {
		// contains filtered or unexported fields
	},
	DeviceCategoryGuidedSetup: {
		// contains filtered or unexported fields
	},
	DeviceCategoryGridMeter: {
		// contains filtered or unexported fields
	},
	DeviceCategoryPVMeter: {
		// contains filtered or unexported fields
	},
	DeviceCategoryBatteryMeter: {
		// contains filtered or unexported fields
	},
	DeviceCategoryVehicle: {
		// contains filtered or unexported fields
	},
	DeviceCategoryChargeMeter: {
		// contains filtered or unexported fields
	},
}

Functions

This section is empty.

Types

type CmdConfigure

type CmdConfigure struct {
	// contains filtered or unexported fields
}

func (*CmdConfigure) Run

func (c *CmdConfigure) Run(log *util.Logger, flagLang string, advancedMode, expandedMode bool, category string)

Run starts the interactive configuration

type Configure

type Configure struct {
	// contains filtered or unexported fields
}

func (*Configure) AddDevice

func (c *Configure) AddDevice(d device, category DeviceCategory)

AddDevice adds a device reference of a specific category to the configuration e.g. a PV meter to site.PVs

func (*Configure) AddLoadpoint

func (c *Configure) AddLoadpoint(l loadpoint)

AddLoadpoint adds a loadpoint to the configuration

func (*Configure) DevicesOfClass

func (c *Configure) DevicesOfClass(class templates.Class) []device

DevicesOfClass returns all configured devices of a given DeviceClass

func (*Configure) MetersOfCategory

func (c *Configure) MetersOfCategory(category DeviceCategory) int

MetersOfCategory returns the number of configured meters of a given DeviceCategory

func (*Configure) RenderConfiguration

func (c *Configure) RenderConfiguration() ([]byte, error)

RenderConfiguration creates a yaml configuration

type DeviceCategory

type DeviceCategory string
const (
	DeviceCategoryCharger      DeviceCategory = "wallbox"
	DeviceCategoryGridMeter    DeviceCategory = "grid"
	DeviceCategoryPVMeter      DeviceCategory = "pv"
	DeviceCategoryBatteryMeter DeviceCategory = "battery"
	DeviceCategoryChargeMeter  DeviceCategory = "charge"
	DeviceCategoryVehicle      DeviceCategory = "vehicle"
	DeviceCategoryGuidedSetup  DeviceCategory = "guided"
)

func (DeviceCategory) String

func (c DeviceCategory) String() string

type DeviceCategoryData

type DeviceCategoryData struct {
	// contains filtered or unexported fields
}

type DeviceTest

type DeviceTest struct {
	DeviceCategory DeviceCategory
	Template       templates.Template
	ConfigValues   map[string]interface{}
}

func (*DeviceTest) Test

func (d *DeviceTest) Test() (DeviceTestResult, error)

Test returns: - DeviceTestResult: Valid, Valid_MissingMeter, Invalid - error: != nil if the device is invalid and can not be configured with the provided settings

type DeviceTestResult

type DeviceTestResult string
const (
	DeviceTestResultValid             DeviceTestResult = "Valid"
	DeviceTestResultValidMissingMeter DeviceTestResult = "Valid_MissingMeter"
	DeviceTestResultInvalid           DeviceTestResult = "Invalid"
)

type UsageChoice

type UsageChoice string

func (UsageChoice) String

func (u UsageChoice) String() string

Jump to

Keyboard shortcuts

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