charger

package
v0.0.0-...-e6e1b3f Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigurable

func NewConfigurable(
	statusG func() (string, error),
	enabledG func() (bool, error),
	enableS func(bool) error,
	maxCurrentS func(int64) error,
) (api.Charger, error)

NewConfigurable creates a new charger

func NewConfigurableFromConfig

func NewConfigurableFromConfig(other map[string]interface{}) (api.Charger, error)

NewConfigurableFromConfig creates a new configurable charger

func NewEVSEWifiFromConfig

func NewEVSEWifiFromConfig(other map[string]interface{}) (api.Charger, error)

NewEVSEWifiFromConfig creates a EVSEWifi charger from generic config

func NewFritzDECTFromConfig

func NewFritzDECTFromConfig(other map[string]interface{}) (api.Charger, error)

NewFritzDECTFromConfig creates a fritzdect charger from generic config

func NewFromConfig

func NewFromConfig(typ string, other map[string]interface{}) (v api.Charger, err error)

NewFromConfig creates charger from configuration

func NewGoE

func NewGoE(uri, token string, cache time.Duration, api string) (api.Charger, error)

NewGoE creates GoE charger

func NewGoEFromConfig

func NewGoEFromConfig(other map[string]interface{}) (api.Charger, error)

NewGoEFromConfig creates a go-e charger from generic config

func NewKeba

func NewKeba(uri, serial string, rfid RFID, timeout time.Duration) (api.Charger, error)

NewKeba creates a new charger

func NewKebaFromConfig

func NewKebaFromConfig(other map[string]interface{}) (api.Charger, error)

NewKebaFromConfig creates a new configurable charger

func NewMobileConnectFromConfig

func NewMobileConnectFromConfig(other map[string]interface{}) (api.Charger, error)

NewMobileConnectFromConfig creates a MCC charger from generic config

func NewNRGKickBLEFromConfig

func NewNRGKickBLEFromConfig(other map[string]interface{}) (api.Charger, error)

NewNRGKickBLEFromConfig creates a NRGKickBLE charger from generic config

func NewNRGKickConnectFromConfig

func NewNRGKickConnectFromConfig(other map[string]interface{}) (api.Charger, error)

NewNRGKickConnectFromConfig creates a NRGKickConnect charger from generic config

func NewOpenWBFromConfig

func NewOpenWBFromConfig(other map[string]interface{}) (api.Charger, error)

NewOpenWBFromConfig creates a new configurable charger

func NewPhoenixEMEthFromConfig

func NewPhoenixEMEthFromConfig(other map[string]interface{}) (api.Charger, error)

NewPhoenixEMEthFromConfig creates a Phoenix charger from generic config

func NewPhoenixEVCCFromConfig

func NewPhoenixEVCCFromConfig(other map[string]interface{}) (api.Charger, error)

NewPhoenixEVCCFromConfig creates a Phoenix charger from generic config

func NewPhoenixEVEthFromConfig

func NewPhoenixEVEthFromConfig(other map[string]interface{}) (api.Charger, error)

NewPhoenixEVEthFromConfig creates a Phoenix charger from generic config

func NewPhoenixEVSerFromConfig

func NewPhoenixEVSerFromConfig(other map[string]interface{}) (api.Charger, error)

NewPhoenixEVSerFromConfig creates a Phoenix charger from generic config

func NewSimpleEVSE

func NewSimpleEVSE(uri, device, comset string, baudrate int, rtu bool, slaveID uint8) (api.Charger, error)

NewSimpleEVSE creates SimpleEVSE charger

func NewSimpleEVSEFromConfig

func NewSimpleEVSEFromConfig(other map[string]interface{}) (api.Charger, error)

NewSimpleEVSEFromConfig creates a SimpleEVSE charger from generic config

func NewTPLinkFromConfig

func NewTPLinkFromConfig(other map[string]interface{}) (api.Charger, error)

NewTPLinkFromConfig creates a TP-Link charger from generic config

func NewTasmotaFromConfig

func NewTasmotaFromConfig(other map[string]interface{}) (api.Charger, error)

NewTasmotaFromConfig creates a Tasmota charger from generic config

func NewWallbeFromConfig

func NewWallbeFromConfig(other map[string]interface{}) (api.Charger, error)

NewWallbeFromConfig creates a Wallbe charger from generic config

func NewWarpFromConfig

func NewWarpFromConfig(other map[string]interface{}) (api.Charger, error)

NewWarpFromConfig creates a new configurable charger

Types

type Card

type Card struct {
	Name   string `json:"name"`
	Energy int    `json:"energy"`
	CardID bool   `json:"cardId"`
}

Card is part of the v2 api response identifying different users

type Charger

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

Charger is an api.Charger implementation with configurable getters and setters.

func (*Charger) Enable

func (m *Charger) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*Charger) Enabled

func (m *Charger) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*Charger) MaxCurrent

func (m *Charger) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*Charger) Status

func (m *Charger) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type EVSEListEntry

type EVSEListEntry struct {
	VehicleState   int64   `json:"vehicleState"`
	EvseState      bool    `json:"evseState"`
	MaxCurrent     int64   `json:"maxCurrent"`
	ActualCurrent  int64   `json:"actualCurrent"`
	ActualPower    float64 `json:"actualPower"`
	Duration       int64   `json:"duration"`
	AlwaysActive   bool    `json:"alwaysActive"`
	UseMeter       bool    `json:"useMeter"`
	LastActionUser string  `json:"lastActionUser"`
	LastActionUID  string  `json:"lastActionUID"`
	Energy         float64 `json:"energy"`
	Mileage        float64 `json:"mileage"`
	MeterReading   float64 `json:"meterReading"`
	CurrentP1      float64 `json:"currentP1"`
	CurrentP2      float64 `json:"currentP2"`
	CurrentP3      float64 `json:"currentP3"`
}

EVSEListEntry is EVSEParameterResponse.List

type EVSEParameterResponse

type EVSEParameterResponse struct {
	Type string          `json:"type"`
	List []EVSEListEntry `json:"list"`
}

EVSEParameterResponse is the getParameters response

type EVSEWifi

type EVSEWifi struct {
	*request.Helper
	// contains filtered or unexported fields
}

EVSEWifi charger implementation

func NewEVSEWifi

func NewEVSEWifi(uri string) (*EVSEWifi, error)

NewEVSEWifi creates EVSEWifi charger

func (*EVSEWifi) ChargingTime

func (evse *EVSEWifi) ChargingTime() (time.Duration, error)

ChargingTime yields current charge run duration

func (*EVSEWifi) Enable

func (evse *EVSEWifi) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*EVSEWifi) Enabled

func (evse *EVSEWifi) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*EVSEWifi) HasMeter

func (evse *EVSEWifi) HasMeter() (bool, error)

HasMeter returns the useMeter api response

func (*EVSEWifi) MaxCurrent

func (evse *EVSEWifi) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*EVSEWifi) Status

func (evse *EVSEWifi) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type FritzDECT

type FritzDECT struct {
	*request.Helper
	// contains filtered or unexported fields
}

FritzDECT charger implementation

func NewFritzDECT

func NewFritzDECT(uri, ain, user, password, sid string, standbypower float64, updated time.Time) (*FritzDECT, error)

NewFritzDECT creates FritzDECT charger

func (*FritzDECT) CurrentPower

func (c *FritzDECT) CurrentPower() (float64, error)

CurrentPower implements the api.Meter interface

func (*FritzDECT) Enable

func (c *FritzDECT) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*FritzDECT) Enabled

func (c *FritzDECT) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*FritzDECT) MaxCurrent

func (c *FritzDECT) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*FritzDECT) Status

func (c *FritzDECT) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type GoE

type GoE struct {
	*request.Helper
	// contains filtered or unexported fields
}

GoE charger implementation

func (*GoE) ChargedEnergy

func (c *GoE) ChargedEnergy() (float64, error)

ChargedEnergy implements the api.ChargeRater interface

func (*GoE) CurrentPower

func (c *GoE) CurrentPower() (float64, error)

CurrentPower implements the api.Meter interface

func (*GoE) Currents

func (c *GoE) Currents() (float64, float64, float64, error)

Currents implements the api.MeterCurrent interface

func (*GoE) Enable

func (c *GoE) Enable(enable bool) error

Enable implements the api.Charger interface

func (*GoE) Enabled

func (c *GoE) Enabled() (bool, error)

Enabled implements the api.Charger interface

func (*GoE) LoadpointMode

func (c *GoE) LoadpointMode(mode api.ChargeMode, lpCS api.ChargeStatus) error

func (*GoE) MaxCurrent

func (c *GoE) MaxCurrent(current int64) error

MaxCurrent implements the api.Charger interface

func (*GoE) Status

func (c *GoE) Status() (api.ChargeStatus, error)

Status implements the api.Charger interface

func (*GoE) TotalEnergy

func (c *GoE) TotalEnergy() (float64, error)

TotalEnergy implements the MeterEnergy interface

type Keba

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

Keba is an api.Charger implementation with configurable getters and setters.

func (*Keba) ChargedEnergy

func (c *Keba) ChargedEnergy() (float64, error)

ChargedEnergy implements the ChargeRater interface

func (*Keba) CurrentPower

func (c *Keba) CurrentPower() (float64, error)

CurrentPower implements the Meter interface

func (*Keba) Currents

func (c *Keba) Currents() (float64, float64, float64, error)

Currents implements the MeterCurrents interface

func (*Keba) Diagnose

func (c *Keba) Diagnose()

Diagnose implements the Diagnosis interface

func (*Keba) Enable

func (c *Keba) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*Keba) Enabled

func (c *Keba) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*Keba) MaxCurrent

func (c *Keba) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*Keba) MaxCurrentMillis

func (c *Keba) MaxCurrentMillis(current float64) error

MaxCurrentMillis implements the api.ChargerEx interface

func (*Keba) Status

func (c *Keba) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

func (*Keba) TotalEnergy

func (c *Keba) TotalEnergy() (float64, error)

TotalEnergy implements the MeterEnergy interface

type MCCCurrentCableInformation

type MCCCurrentCableInformation struct {
	MaxValue, MinValue, Value int64
}

MCCCurrentCableInformation is the apiCurrentCableInformation response

type MCCCurrentSession

type MCCCurrentSession struct {
	Duration     time.Duration
	EnergySumKwh float64
}

MCCCurrentSession is the apiCurrentSession response

type MCCEnergy

type MCCEnergy struct {
	L1, L2, L3 MCCEnergyPhase
}

MCCEnergy is the apiEnergy response

type MCCEnergyPhase

type MCCEnergyPhase struct {
	Ampere float64
	Power  float64
}

MCCEnergyPhase is the apiEnergy response for a single phase

type MCCTokenResponse

type MCCTokenResponse struct {
	Token string
	Error string
}

MCCTokenResponse is the apiLogin response

type MobileConnect

type MobileConnect struct {
	*request.Helper
	// contains filtered or unexported fields
}

MobileConnect charger supporting devices from Audi, Bentley, Porsche

func NewMobileConnect

func NewMobileConnect(uri string, password string) (*MobileConnect, error)

NewMobileConnect creates MCC charger

func (*MobileConnect) ChargedEnergy

func (mcc *MobileConnect) ChargedEnergy() (float64, error)

ChargedEnergy implements the ChargeRater interface.

func (*MobileConnect) ChargingTime

func (mcc *MobileConnect) ChargingTime() (time.Duration, error)

ChargingTime yields current charge run duration

func (*MobileConnect) CurrentPower

func (mcc *MobileConnect) CurrentPower() (float64, error)

CurrentPower implements the Meter interface.

func (*MobileConnect) Currents

func (mcc *MobileConnect) Currents() (float64, float64, float64, error)

Currents implements the MeterCurrent interface

func (*MobileConnect) Enable

func (mcc *MobileConnect) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*MobileConnect) Enabled

func (mcc *MobileConnect) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*MobileConnect) MaxCurrent

func (mcc *MobileConnect) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*MobileConnect) Status

func (mcc *MobileConnect) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type NRGChargingCurrent

type NRGChargingCurrent struct {
	Value float64 `json:",omitempty"`
}

NRGChargingCurrent is NRGSettings.Values.ChargingCurrent

type NRGChargingStatus

type NRGChargingStatus struct {
	Charging *bool `json:",omitempty"` // use pointer to allow omitting false
}

NRGChargingStatus is NRGSettings.Values.ChargingStatus

type NRGDeviceMetadata

type NRGDeviceMetadata struct {
	Password string
}

NRGDeviceMetadata is NRGSettings.Values.DeviceMetadata

type NRGInfo

type NRGInfo struct {
	Connected bool `json:",omitempty"`
}

NRGInfo is NRGSettings.Info

type NRGKickBLE

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

NRGKickBLE charger implementation

func NewNRGKickBLE

func NewNRGKickBLE(device, macaddress string, pin int) (*NRGKickBLE, error)

NewNRGKickBLE creates NRGKickBLE charger

func (*NRGKickBLE) CurrentPower

func (nrg *NRGKickBLE) CurrentPower() (float64, error)

CurrentPower implements the api.Meter interface

func (*NRGKickBLE) Currents

func (nrg *NRGKickBLE) Currents() (float64, float64, float64, error)

Currents implements the api.MeterCurrent interface

func (*NRGKickBLE) Enable

func (nrg *NRGKickBLE) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*NRGKickBLE) Enabled

func (nrg *NRGKickBLE) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*NRGKickBLE) MaxCurrent

func (nrg *NRGKickBLE) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*NRGKickBLE) Status

func (nrg *NRGKickBLE) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

func (*NRGKickBLE) TotalEnergy

func (nrg *NRGKickBLE) TotalEnergy() (float64, error)

TotalEnergy implements the api.MeterEnergy interface

type NRGKickConnect

type NRGKickConnect struct {
	*request.Helper
	// contains filtered or unexported fields
}

NRGKickConnect charger implementation

func NewNRGKickConnect

func NewNRGKickConnect(uri, mac, password string) (*NRGKickConnect, error)

NewNRGKickConnect creates NRGKickConnect charger

func (*NRGKickConnect) CurrentPower

func (nrg *NRGKickConnect) CurrentPower() (float64, error)

CurrentPower implements the Meter interface

func (*NRGKickConnect) Currents

func (nrg *NRGKickConnect) Currents() (float64, float64, float64, error)

Currents implements the MeterCurrent interface

func (*NRGKickConnect) Enable

func (nrg *NRGKickConnect) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*NRGKickConnect) Enabled

func (nrg *NRGKickConnect) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*NRGKickConnect) MaxCurrent

func (nrg *NRGKickConnect) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*NRGKickConnect) Status

func (nrg *NRGKickConnect) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

func (*NRGKickConnect) TotalEnergy

func (nrg *NRGKickConnect) TotalEnergy() (float64, error)

TotalEnergy implements the MeterEnergy interface

type NRGMeasurements

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

NRGMeasurements is the /api/measurements response

type NRGSettings

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

NRGSettings is the /api/settings request/response

type NRGValues

type NRGValues struct {
	ChargingStatus  NRGChargingStatus
	ChargingCurrent NRGChargingCurrent
	DeviceMetadata  NRGDeviceMetadata
}

NRGValues is NRGSettings.Values

type OpenWB

type OpenWB struct {
	api.Charger
	// contains filtered or unexported fields
}

OpenWB configures generic charger and charge meter for an openWB loadpoint

func NewOpenWB

func NewOpenWB(log *util.Logger, mqttconf mqtt.Config, id int, topic string, timeout time.Duration) (*OpenWB, error)

NewOpenWB creates a new configurable charger

func (*OpenWB) CurrentPower

func (m *OpenWB) CurrentPower() (float64, error)

CurrentPower implements the api.Meter interface

func (*OpenWB) Currents

func (m *OpenWB) Currents() (float64, float64, float64, error)

Currents implements the api.MeterCurrent interface

func (*OpenWB) TotalEnergy

func (m *OpenWB) TotalEnergy() (float64, error)

TotalEnergy implements the api.MeterEnergy interface

type PhoenixEMEth

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

PhoenixEMEth is an api.ChargeController implementation for Phoenix EM-CP-PP-ETH wallboxes. It uses Modbus TCP to communicate with the wallbox at modbus client id 180.

func NewPhoenixEMEth

func NewPhoenixEMEth(uri string, id uint8) (*PhoenixEMEth, error)

NewPhoenixEMEth creates a Phoenix charger

func (*PhoenixEMEth) ChargingTime

func (wb *PhoenixEMEth) ChargingTime() (time.Duration, error)

ChargingTime yields current charge run duration

func (*PhoenixEMEth) Enable

func (wb *PhoenixEMEth) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*PhoenixEMEth) Enabled

func (wb *PhoenixEMEth) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*PhoenixEMEth) MaxCurrent

func (wb *PhoenixEMEth) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*PhoenixEMEth) Status

func (wb *PhoenixEMEth) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type PhoenixEVCC

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

PhoenixEVCC is an api.ChargeController implementation for Phoenix EV-CC-AC1-M wallboxes. It uses Modbus TCP to communicate with the wallbox at modbus client id 255.

func NewPhoenixEVCC

func NewPhoenixEVCC(uri, device, comset string, baudrate int, id uint8) (*PhoenixEVCC, error)

NewPhoenixEVCC creates a Phoenix charger

func (*PhoenixEVCC) Enable

func (wb *PhoenixEVCC) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*PhoenixEVCC) Enabled

func (wb *PhoenixEVCC) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*PhoenixEVCC) MaxCurrent

func (wb *PhoenixEVCC) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*PhoenixEVCC) Status

func (wb *PhoenixEVCC) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type PhoenixEVEth

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

PhoenixEVEth is an api.ChargeController implementation for Phoenix EV-***-ETH controller models EV-CC-AC1-M3-CBC-RCM-ETH, EV-CC-AC1-M3-CBC-RCM-ETH-3G, EV-CC-AC1-M3-RCM-ETH-XP, EV-CC-AC1-M3-RCM-ETH-3G-XP It uses Modbus TCP to communicate with the controller at modbus client id 255.

func NewPhoenixEVEth

func NewPhoenixEVEth(uri string, id uint8) (*PhoenixEVEth, error)

NewPhoenixEVEth creates a Phoenix charger

func (*PhoenixEVEth) ChargingTime

func (wb *PhoenixEVEth) ChargingTime() (time.Duration, error)

ChargingTime yields current charge run duration

func (*PhoenixEVEth) Enable

func (wb *PhoenixEVEth) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*PhoenixEVEth) Enabled

func (wb *PhoenixEVEth) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*PhoenixEVEth) MaxCurrent

func (wb *PhoenixEVEth) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*PhoenixEVEth) Status

func (wb *PhoenixEVEth) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type PhoenixEVSer

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

PhoenixEVSer is an api.ChargeController implementation for Phoenix EV-CC-AC1-M wallboxes. It uses Modbus RTU to communicate with the wallbox at configurable modbus client.

func NewPhoenixEVSer

func NewPhoenixEVSer(uri, device, comset string, baudrate int, id uint8) (*PhoenixEVSer, error)

NewPhoenixEVSer creates a Phoenix charger

func (*PhoenixEVSer) Enable

func (wb *PhoenixEVSer) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*PhoenixEVSer) Enabled

func (wb *PhoenixEVSer) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*PhoenixEVSer) MaxCurrent

func (wb *PhoenixEVSer) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*PhoenixEVSer) Status

func (wb *PhoenixEVSer) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type RFID

type RFID struct {
	Tag string
}

RFID contains access credentials

type SimpleEVSE

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

SimpleEVSE charger implementation

func (*SimpleEVSE) Enable

func (evse *SimpleEVSE) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*SimpleEVSE) Enabled

func (evse *SimpleEVSE) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*SimpleEVSE) MaxCurrent

func (evse *SimpleEVSE) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*SimpleEVSE) Status

func (evse *SimpleEVSE) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

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

TPLink charger implementation

func NewTPLink(uri string, standbypower float64) (*TPLink, error)

NewTPLink creates TP-Link charger

func (*TPLink) ChargedEnergy

func (c *TPLink) ChargedEnergy() (float64, error)

ChargedEnergy implements the ChargeRater interface

func (*TPLink) CurrentPower

func (c *TPLink) CurrentPower() (float64, error)

CurrentPower implements the api.Meter interface

func (*TPLink) Enable

func (c *TPLink) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*TPLink) Enabled

func (c *TPLink) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*TPLink) MaxCurrent

func (c *TPLink) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*TPLink) Status

func (c *TPLink) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

func (*TPLink) TotalEnergy

func (c *TPLink) TotalEnergy() (float64, error)

TotalEnergy implements the MeterEnergy interface

type Tasmota

type Tasmota struct {
	*request.Helper
	// contains filtered or unexported fields
}

Tasmota charger implementation

func NewTasmota

func NewTasmota(uri, user, password string, standbypower float64) (*Tasmota, error)

NewTasmota creates Tasmota charger

func (*Tasmota) CurrentPower

func (c *Tasmota) CurrentPower() (float64, error)

CurrentPower implements the api.Meter interface

func (*Tasmota) Enable

func (c *Tasmota) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*Tasmota) Enabled

func (c *Tasmota) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*Tasmota) MaxCurrent

func (c *Tasmota) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*Tasmota) Status

func (c *Tasmota) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type Wallbe

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

Wallbe is an api.ChargeController implementation for Wallbe wallboxes. It supports both wallbe controllers (post 2019 models) and older ones using the Phoenix EV-CC-AC1-M3-CBC-RCM-ETH controller. It uses Modbus TCP to communicate with the wallbox at modbus client id 255.

func NewWallbe

func NewWallbe(uri string) (*Wallbe, error)

NewWallbe creates a Wallbe charger

func (*Wallbe) ChargingTime

func (wb *Wallbe) ChargingTime() (time.Duration, error)

ChargingTime implements the api.ChargeTimer interface

func (*Wallbe) Diagnose

func (wb *Wallbe) Diagnose()

Diagnose implements the Diagnosis interface

func (*Wallbe) Enable

func (wb *Wallbe) Enable(enable bool) error

Enable implements the Charger.Enable interface

func (*Wallbe) Enabled

func (wb *Wallbe) Enabled() (bool, error)

Enabled implements the Charger.Enabled interface

func (*Wallbe) MaxCurrent

func (wb *Wallbe) MaxCurrent(current int64) error

MaxCurrent implements the Charger.MaxCurrent interface

func (*Wallbe) Status

func (wb *Wallbe) Status() (api.ChargeStatus, error)

Status implements the Charger.Status interface

type Warp

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

Warp configures generic charger and charge meter for an Warp loadpoint

func NewWarp

func NewWarp(mqttconf mqtt.Config, topic string, timeout time.Duration) (*Warp, error)

NewWarp creates a new configurable charger

func (*Warp) Enable

func (m *Warp) Enable(enable bool) error

Enable implements the api.Charger interface

func (*Warp) Enabled

func (m *Warp) Enabled() (bool, error)

Enabled implements the api.Charger interface

func (*Warp) MaxCurrent

func (m *Warp) MaxCurrent(current int64) error

MaxCurrent implements the api.Charger interface

func (*Warp) MaxCurrentMillis

func (m *Warp) MaxCurrentMillis(current float64) error

MaxCurrentMillis implements the api.ChargerEx interface

func (*Warp) Status

func (m *Warp) Status() (api.ChargeStatus, error)

Status implements the api.Charger interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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