Documentation
¶
Index ¶
- Variables
- func NewCollector(client *Client) prometheus.Collector
- func WithTimeout(t time.Duration) func(*connectorOpts)
- func WithTransport(t http.RoundTripper) func(*connectorOpts)
- type Client
- type ConnectorConfig
- type Conversion
- type Lifetime
- func (*Lifetime) Descriptor() ([]byte, []int)deprecated
- func (x *Lifetime) GetAlertCount() int32
- func (x *Lifetime) GetAvgStartupTime() float64
- func (x *Lifetime) GetChargeStarts() int32
- func (x *Lifetime) GetChargeTimeS() int32
- func (x *Lifetime) GetConnectorCycles() int32
- func (x *Lifetime) GetContactorCycles() int32
- func (x *Lifetime) GetContactorCyclesLoaded() int32
- func (x *Lifetime) GetEnergyWh() int64
- func (x *Lifetime) GetThermalFoldbackCount() int32
- func (x *Lifetime) GetUptimeS() int64
- func (*Lifetime) ProtoMessage()
- func (x *Lifetime) ProtoReflect() protoreflect.Message
- func (x *Lifetime) Reset()
- func (x *Lifetime) String() string
- type Metric
- func (m *Metric) ConvertValue(v float64) float64
- func (*Metric) Descriptor() ([]byte, []int)deprecated
- func (x *Metric) GetConversion() Conversion
- func (x *Metric) GetHelp() string
- func (x *Metric) GetLabels() []string
- func (x *Metric) GetName() string
- func (x *Metric) GetSkip() bool
- func (x *Metric) GetType() Metric_Type
- func (m *Metric) LabelKeys() []string
- func (m *Metric) LabelValues() []string
- func (*Metric) ProtoMessage()
- func (x *Metric) ProtoReflect() protoreflect.Message
- func (x *Metric) Reset()
- func (x *Metric) String() string
- type Metric_Type
- func (Metric_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Metric_Type) Enum() *Metric_Type
- func (Metric_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Metric_Type) Number() protoreflect.EnumNumber
- func (x Metric_Type) String() string
- func (Metric_Type) Type() protoreflect.EnumType
- type Version
- func (*Version) Descriptor() ([]byte, []int)deprecated
- func (x *Version) GetFirmwareVersion() string
- func (x *Version) GetPartNumber() string
- func (x *Version) GetSerialNumber() string
- func (*Version) ProtoMessage()
- func (x *Version) ProtoReflect() protoreflect.Message
- func (x *Version) Reset()
- func (x *Version) String() string
- type Vitals
- func (*Vitals) Descriptor() ([]byte, []int)deprecated
- func (x *Vitals) GetConfigStatus() int32
- func (x *Vitals) GetContactorClosed() bool
- func (x *Vitals) GetCurrentAA() float64
- func (x *Vitals) GetCurrentAlerts() []int32
- func (x *Vitals) GetCurrentBA() float64
- func (x *Vitals) GetCurrentCA() float64
- func (x *Vitals) GetCurrentNA() float64
- func (x *Vitals) GetEvseState() int32
- func (x *Vitals) GetGridHz() float64
- func (x *Vitals) GetGridV() float64
- func (x *Vitals) GetHandleTempC() float64
- func (x *Vitals) GetInputThermopileUv() float64
- func (x *Vitals) GetMcuTempC() float64
- func (x *Vitals) GetPcbaTempC() float64
- func (x *Vitals) GetPilotHighV() float64
- func (x *Vitals) GetPilotLowV() float64
- func (x *Vitals) GetProxV() float64
- func (x *Vitals) GetRelayCoilV() float64
- func (x *Vitals) GetSessionEnergyWh() float64
- func (x *Vitals) GetSessionS() float64
- func (x *Vitals) GetUptimeS() float64
- func (x *Vitals) GetVehicleConnected() bool
- func (x *Vitals) GetVehicleCurrentA() float64
- func (x *Vitals) GetVoltageAV() float64
- func (x *Vitals) GetVoltageBV() float64
- func (x *Vitals) GetVoltageCV() float64
- func (*Vitals) ProtoMessage()
- func (x *Vitals) ProtoReflect() protoreflect.Message
- func (x *Vitals) Reset()
- func (x *Vitals) String() string
- type Wifi
- func (*Wifi) Descriptor() ([]byte, []int)deprecated
- func (x *Wifi) GetInternet() bool
- func (x *Wifi) GetWifiConnected() bool
- func (x *Wifi) GetWifiRssi() int32
- func (x *Wifi) GetWifiSignalStrength() int32
- func (x *Wifi) GetWifiSnr() int32
- func (*Wifi) ProtoMessage()
- func (x *Wifi) ProtoReflect() protoreflect.Message
- func (x *Wifi) Reset()
- func (x *Wifi) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Conversion_name = map[int32]string{ 0: "NONE", 1: "INVERSE", 2: "WH_TO_J", } Conversion_value = map[string]int32{ "NONE": 0, "INVERSE": 1, "WH_TO_J": 2, } )
Enum value maps for Conversion.
var ( Metric_Type_name = map[int32]string{ 0: "GAUGE", 1: "COUNTER", } Metric_Type_value = map[string]int32{ "GAUGE": 0, "COUNTER": 1, } )
Enum value maps for Metric_Type.
var (
// optional com.winstondurand.wallconnector.Metric prometheus = 50000;
E_Prometheus = &file_metrics_proto_extTypes[0]
)
Extension fields to descriptorpb.FieldOptions.
var File_metrics_proto protoreflect.FileDescriptor
Functions ¶
func NewCollector ¶
func NewCollector(client *Client) prometheus.Collector
NewCollector creates a new collector for wallconnector stats.
func WithTimeout ¶
func WithTransport ¶
func WithTransport(t http.RoundTripper) func(*connectorOpts)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type ConnectorConfig ¶
type ConnectorConfig func(*connectorOpts)
type Conversion ¶
type Conversion int32
const ( Conversion_NONE Conversion = 0 // Compute the inverse of the value. Conversion_INVERSE Conversion = 1 // Convert from watt-hours to joules. Conversion_WH_TO_J Conversion = 2 )
func (Conversion) Descriptor ¶
func (Conversion) Descriptor() protoreflect.EnumDescriptor
func (Conversion) Enum ¶
func (x Conversion) Enum() *Conversion
func (Conversion) EnumDescriptor
deprecated
func (Conversion) EnumDescriptor() ([]byte, []int)
Deprecated: Use Conversion.Descriptor instead.
func (Conversion) Number ¶
func (x Conversion) Number() protoreflect.EnumNumber
func (Conversion) String ¶
func (x Conversion) String() string
func (Conversion) Type ¶
func (Conversion) Type() protoreflect.EnumType
type Lifetime ¶
type Lifetime struct {
ContactorCycles int32 `protobuf:"varint,1,opt,name=contactor_cycles,json=contactorCycles,proto3" json:"contactor_cycles,omitempty"`
ContactorCyclesLoaded int32 `` /* 127-byte string literal not displayed */
AlertCount int32 `protobuf:"varint,3,opt,name=alert_count,json=alertCount,proto3" json:"alert_count,omitempty"`
ThermalFoldbackCount int32 `protobuf:"varint,4,opt,name=thermal_foldback_count,json=thermalFoldbackCount,proto3" json:"thermal_foldback_count,omitempty"`
AvgStartupTime float64 `protobuf:"fixed64,5,opt,name=avg_startup_time,json=avgStartupTime,proto3" json:"avg_startup_time,omitempty"`
ChargeStarts int32 `protobuf:"varint,6,opt,name=charge_starts,json=chargeStarts,proto3" json:"charge_starts,omitempty"`
EnergyWh int64 `protobuf:"varint,7,opt,name=energy_wh,json=energyWh,proto3" json:"energy_wh,omitempty"`
ConnectorCycles int32 `protobuf:"varint,8,opt,name=connector_cycles,json=connectorCycles,proto3" json:"connector_cycles,omitempty"`
UptimeS int64 `protobuf:"varint,9,opt,name=uptime_s,json=uptimeS,proto3" json:"uptime_s,omitempty"`
ChargeTimeS int32 `protobuf:"varint,10,opt,name=charge_time_s,json=chargeTimeS,proto3" json:"charge_time_s,omitempty"`
// contains filtered or unexported fields
}
Lifetime represents the lifetime stats of the wallconnector.
See Wall Monitor FAQ for more details: https://wallmonitor.app/faq/explain_lifetime
func (*Lifetime) Descriptor
deprecated
func (*Lifetime) GetAlertCount ¶
func (*Lifetime) GetAvgStartupTime ¶
func (*Lifetime) GetChargeStarts ¶
func (*Lifetime) GetChargeTimeS ¶
func (*Lifetime) GetConnectorCycles ¶
func (*Lifetime) GetContactorCycles ¶
func (*Lifetime) GetContactorCyclesLoaded ¶
func (*Lifetime) GetEnergyWh ¶
func (*Lifetime) GetThermalFoldbackCount ¶
func (*Lifetime) GetUptimeS ¶
func (*Lifetime) ProtoMessage ¶
func (*Lifetime) ProtoMessage()
func (*Lifetime) ProtoReflect ¶
func (x *Lifetime) ProtoReflect() protoreflect.Message
type Metric ¶
type Metric struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type Metric_Type `protobuf:"varint,2,opt,name=type,proto3,enum=com.winstondurand.wallconnector.Metric_Type" json:"type,omitempty"`
Help string `protobuf:"bytes,3,opt,name=help,proto3" json:"help,omitempty"`
Labels []string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"`
Conversion Conversion `protobuf:"varint,5,opt,name=conversion,proto3,enum=com.winstondurand.wallconnector.Conversion" json:"conversion,omitempty"`
// Skip this field when generating the prometheus metrics.
// Note: Even when this is set to true, the field still requires a name.
Skip bool `protobuf:"varint,20,opt,name=skip,proto3" json:"skip,omitempty"`
// contains filtered or unexported fields
}
func (*Metric) ConvertValue ¶
func (*Metric) Descriptor
deprecated
func (*Metric) GetConversion ¶
func (x *Metric) GetConversion() Conversion
func (*Metric) GetType ¶
func (x *Metric) GetType() Metric_Type
func (*Metric) LabelValues ¶
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) ProtoReflect ¶
func (x *Metric) ProtoReflect() protoreflect.Message
type Metric_Type ¶
type Metric_Type int32
const ( Metric_GAUGE Metric_Type = 0 Metric_COUNTER Metric_Type = 1 )
func (Metric_Type) Descriptor ¶
func (Metric_Type) Descriptor() protoreflect.EnumDescriptor
func (Metric_Type) Enum ¶
func (x Metric_Type) Enum() *Metric_Type
func (Metric_Type) EnumDescriptor
deprecated
func (Metric_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Metric_Type.Descriptor instead.
func (Metric_Type) Number ¶
func (x Metric_Type) Number() protoreflect.EnumNumber
func (Metric_Type) String ¶
func (x Metric_Type) String() string
func (Metric_Type) Type ¶
func (Metric_Type) Type() protoreflect.EnumType
type Version ¶
type Version struct {
FirmwareVersion string `protobuf:"bytes,1,opt,name=firmware_version,json=firmwareVersion,proto3" json:"firmware_version,omitempty"`
PartNumber string `protobuf:"bytes,2,opt,name=part_number,json=partNumber,proto3" json:"part_number,omitempty"`
SerialNumber string `protobuf:"bytes,3,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
// contains filtered or unexported fields
}
Version represents the version info of the wallconnector.
func (*Version) Descriptor
deprecated
func (*Version) GetFirmwareVersion ¶
func (*Version) GetPartNumber ¶
func (*Version) GetSerialNumber ¶
func (*Version) ProtoMessage ¶
func (*Version) ProtoMessage()
func (*Version) ProtoReflect ¶
func (x *Version) ProtoReflect() protoreflect.Message
type Vitals ¶
type Vitals struct {
ContactorClosed bool `protobuf:"varint,1,opt,name=contactor_closed,json=contactorClosed,proto3" json:"contactor_closed,omitempty"`
VehicleConnected bool `protobuf:"varint,2,opt,name=vehicle_connected,json=vehicleConnected,proto3" json:"vehicle_connected,omitempty"`
SessionS float64 `protobuf:"fixed64,3,opt,name=session_s,json=sessionS,proto3" json:"session_s,omitempty"`
GridV float64 `protobuf:"fixed64,4,opt,name=grid_v,json=gridV,proto3" json:"grid_v,omitempty"`
GridHz float64 `protobuf:"fixed64,5,opt,name=grid_hz,json=gridHz,proto3" json:"grid_hz,omitempty"`
VehicleCurrentA float64 `protobuf:"fixed64,6,opt,name=vehicle_current_a,json=vehicleCurrentA,proto3" json:"vehicle_current_a,omitempty"`
CurrentAA float64 `protobuf:"fixed64,7,opt,name=currentA_a,json=currentAA,proto3" json:"currentA_a,omitempty"`
CurrentBA float64 `protobuf:"fixed64,8,opt,name=currentB_a,json=currentBA,proto3" json:"currentB_a,omitempty"`
CurrentCA float64 `protobuf:"fixed64,9,opt,name=currentC_a,json=currentCA,proto3" json:"currentC_a,omitempty"`
CurrentNA float64 `protobuf:"fixed64,10,opt,name=currentN_a,json=currentNA,proto3" json:"currentN_a,omitempty"`
VoltageAV float64 `protobuf:"fixed64,11,opt,name=voltageA_v,json=voltageAV,proto3" json:"voltageA_v,omitempty"`
VoltageBV float64 `protobuf:"fixed64,12,opt,name=voltageB_v,json=voltageBV,proto3" json:"voltageB_v,omitempty"`
VoltageCV float64 `protobuf:"fixed64,13,opt,name=voltageC_v,json=voltageCV,proto3" json:"voltageC_v,omitempty"`
RelayCoilV float64 `protobuf:"fixed64,14,opt,name=relay_coil_v,json=relayCoilV,proto3" json:"relay_coil_v,omitempty"`
PcbaTempC float64 `protobuf:"fixed64,15,opt,name=pcba_temp_c,json=pcbaTempC,proto3" json:"pcba_temp_c,omitempty"`
HandleTempC float64 `protobuf:"fixed64,16,opt,name=handle_temp_c,json=handleTempC,proto3" json:"handle_temp_c,omitempty"`
McuTempC float64 `protobuf:"fixed64,17,opt,name=mcu_temp_c,json=mcuTempC,proto3" json:"mcu_temp_c,omitempty"`
UptimeS float64 `protobuf:"fixed64,18,opt,name=uptime_s,json=uptimeS,proto3" json:"uptime_s,omitempty"`
InputThermopileUv float64 `protobuf:"fixed64,19,opt,name=input_thermopile_uv,json=inputThermopileUv,proto3" json:"input_thermopile_uv,omitempty"`
ProxV float64 `protobuf:"fixed64,20,opt,name=prox_v,json=proxV,proto3" json:"prox_v,omitempty"`
PilotHighV float64 `protobuf:"fixed64,21,opt,name=pilot_high_v,json=pilotHighV,proto3" json:"pilot_high_v,omitempty"`
PilotLowV float64 `protobuf:"fixed64,22,opt,name=pilot_low_v,json=pilotLowV,proto3" json:"pilot_low_v,omitempty"`
SessionEnergyWh float64 `protobuf:"fixed64,23,opt,name=session_energy_wh,json=sessionEnergyWh,proto3" json:"session_energy_wh,omitempty"`
ConfigStatus int32 `protobuf:"varint,24,opt,name=config_status,json=configStatus,proto3" json:"config_status,omitempty"`
EvseState int32 `protobuf:"varint,25,opt,name=evse_state,json=evseState,proto3" json:"evse_state,omitempty"`
CurrentAlerts []int32 `protobuf:"varint,26,rep,packed,name=current_alerts,json=currentAlerts,proto3" json:"current_alerts,omitempty"`
// contains filtered or unexported fields
}
Vitals represents the current state of the wallconnector.
Note: Several fields like SessionS, and UptimeS are probably ints, but they're it's impossible to say parsing JSON from the API.
See Wall Monitor FAQ for more details: https://wallmonitor.app/faq/explain_technical
func (*Vitals) Descriptor
deprecated
func (*Vitals) GetConfigStatus ¶
func (*Vitals) GetContactorClosed ¶
func (*Vitals) GetCurrentAA ¶
func (*Vitals) GetCurrentAlerts ¶
func (*Vitals) GetCurrentBA ¶
func (*Vitals) GetCurrentCA ¶
func (*Vitals) GetCurrentNA ¶
func (*Vitals) GetEvseState ¶
func (*Vitals) GetHandleTempC ¶
func (*Vitals) GetInputThermopileUv ¶
func (*Vitals) GetMcuTempC ¶
func (*Vitals) GetPcbaTempC ¶
func (*Vitals) GetPilotHighV ¶
func (*Vitals) GetPilotLowV ¶
func (*Vitals) GetRelayCoilV ¶
func (*Vitals) GetSessionEnergyWh ¶
func (*Vitals) GetSessionS ¶
func (*Vitals) GetUptimeS ¶
func (*Vitals) GetVehicleConnected ¶
func (*Vitals) GetVehicleCurrentA ¶
func (*Vitals) GetVoltageAV ¶
func (*Vitals) GetVoltageBV ¶
func (*Vitals) GetVoltageCV ¶
func (*Vitals) ProtoMessage ¶
func (*Vitals) ProtoMessage()
func (*Vitals) ProtoReflect ¶
func (x *Vitals) ProtoReflect() protoreflect.Message
type Wifi ¶
type Wifi struct {
WifiSignalStrength int32 `protobuf:"varint,1,opt,name=wifi_signal_strength,json=wifiSignalStrength,proto3" json:"wifi_signal_strength,omitempty"`
WifiRssi int32 `protobuf:"varint,2,opt,name=wifi_rssi,json=wifiRssi,proto3" json:"wifi_rssi,omitempty"`
WifiSnr int32 `protobuf:"varint,3,opt,name=wifi_snr,json=wifiSnr,proto3" json:"wifi_snr,omitempty"`
WifiConnected bool `protobuf:"varint,4,opt,name=wifi_connected,json=wifiConnected,proto3" json:"wifi_connected,omitempty"`
Internet bool `protobuf:"varint,5,opt,name=internet,proto3" json:"internet,omitempty"`
// contains filtered or unexported fields
}
Wifi represents the wifi info of the wallconnector.
func (*Wifi) Descriptor
deprecated
func (*Wifi) GetInternet ¶
func (*Wifi) GetWifiConnected ¶
func (*Wifi) GetWifiRssi ¶
func (*Wifi) GetWifiSignalStrength ¶
func (*Wifi) GetWifiSnr ¶
func (*Wifi) ProtoMessage ¶
func (*Wifi) ProtoMessage()
func (*Wifi) ProtoReflect ¶
func (x *Wifi) ProtoReflect() protoreflect.Message
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
prom
command
Pull stats from a wall connector and serve them as prometheus metrics.
|
Pull stats from a wall connector and serve them as prometheus metrics. |
|
proxy
command
Create a proxy server that will forward requests to the real server and return the response to the client.
|
Create a proxy server that will forward requests to the real server and return the response to the client. |