twc

package
v0.0.0-...-4d61f68 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LifetimeStats

type LifetimeStats struct {
	ContactorCycles       int     `json:"contactor_cycles"`
	ContactorCyclesLoaded int     `json:"contactor_cycles_loaded"`
	AlertsCount           int     `json:"alerts_count"`
	ThermalFoldbacks      int     `json:"thermal_foldbacks"`
	AvgStartupTemp        float64 `json:"avg_startup_temp"`
	ChargeStarts          int     `json:"charge_starts"`
	Energy_wh             int     `json:"energy_wh"`
	ConnectorCycles       int     `json:"connector_cycles"`
	Uptime                int     `json:"uptime_s"`
	ChargingTime          int     `json:"charging_time_s"`
}

LifetimeStats structure the represents the TWC lifetime

type TWC

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

TWC structure that represents the TWC

func Find

func Find() (*TWC, error)

Find attempts to locate the TWC on the local network and if found will return a TWC instance.

func New

func New(ip string) (*TWC, error)

New creates a new TWC using the given IP

func (*TWC) GetLifetimeStats

func (twc *TWC) GetLifetimeStats() (*LifetimeStats, error)

GetLifetime returns the lifetime stats for the TWC

func (*TWC) GetVitals

func (twc *TWC) GetVitals() (*Vital, error)

GetVitals returns the vitals from the TWC

func (*TWC) GetWifiStatus

func (twc *TWC) GetWifiStatus() (*WifiStatus, error)

GetWifiStatus returns the wifi status of the TWC

func (*TWC) IP

func (twc *TWC) IP() string

IP returns the IP of the TWC

type Vital

type Vital struct {
	ContactorClosed    bool     `json:"contactor_closed"`
	VehicleConnected   bool     `json:"vehicle_connected"`
	Session            int      `json:"session_s"`
	Grid_v             float64  `json:"grid_v"`
	Grid_hz            float64  `json:"grid_hz"`
	VehicleCurrentAmp  float64  `json:"vehicle_current_a"`
	CurrentA_a         float64  `json:"currentA_a"`
	CurrentB_a         float64  `json:"currentB_a"`
	CurrentC_a         float64  `json:"currentC_a"`
	CurrentN_a         float64  `json:"currentN_a"`
	VoltageA_v         float64  `json:"voltageA_v"`
	VoltageB_v         float64  `json:"voltageB_v"`
	VoltageC_v         float64  `json:"voltageC_v"`
	RelayCoil_v        float64  `json:"relay_coil_v"`
	PCBATemp_c         float64  `json:"pcba_temp_c"`
	HandleTemp_c       float64  `json:"handle_temp_c"`
	MCUTemp_c          float64  `json:"mcu_temp_c"`
	Uptime             int      `json:"uptime_s"`
	InputThermopile_uv int      `json:"input_thermopile_uv"`
	Prox_v             float64  `json:"prox_v"`
	PilotHigh_v        float64  `json:"pilot_high_v"`
	PilotLow_v         float64  `json:"pilot_low_v"`
	SessionEnergy_wh   float64  `json:"session_energy_wh"`
	ConfigStatus       int      `json:"config_status"`
	EvseState          int      `json:"evse_state"`
	CurrentAlerts      []string `json:"current_alerts"`
}

Vital structure that represents the vitals from the TWC

type VitalQueryResponse

type VitalQueryResponse struct {
	Timestamp string `json:"timestamp"`
	Vital     *Vital `json:"vital"`
}

VitalQueryResponse structure that is used when returning vital stats view REST API

type WifiStatus

type WifiStatus struct {
	SSID           string `json:"wifi_ssid"`
	SignalStrength int    `json:"wifi_signal_strength"`
	RSSI           int    `json:"wifi_rssi"`
	SNR            int    `json:"wifi_snr"`
	Connected      bool   `json:"wifi_connected"`
	IP             string `json:"wifi_infra_ip"`
	Internet       bool   `json:"internet"`
	MAC            string `json:"wifi_mac"`
}

WifiStatus structure that represents the TWC wifi status

Jump to

Keyboard shortcuts

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