Versions in this module Expand all Collapse all v0 v0.20.0 Sep 3, 2023 Changes in this version + const GridStatusConnected + const GridStatusIslanded + const GridStatusTransition + const OperationModeSelf + const OperationModeTimeBased + const SitemasterRebootOK + const SitemasterRebootPowerTooHigh + const SitemasterStatusDown + const SitemasterStatusUp + func SetErrFunc(f func(string, error)) + func SetLogFunc(f func(...interface{})) + type ApiError struct + Body []byte + StatusCode int + URL url.URL + func (e ApiError) Error() string + type AuthFailure struct + ErrorText string + Message string + URL url.URL + func (e AuthFailure) Error() string + type Client struct + func NewClient(gatewayAddress string, gatewayLoginEmail string, gatewayLoginPassword string) *Client + func (c *Client) DoLogin() error + func (c *Client) FetchTLSCert() (*x509.Certificate, error) + func (c *Client) GetAuthToken() string + func (c *Client) GetGridFaults() (*[]GridFaultData, error) + func (c *Client) GetGridStatus() (*GridStatusData, error) + func (c *Client) GetMeters(category string) (*[]MeterData, error) + func (c *Client) GetMetersAggregates() (*map[string]MeterAggregatesData, error) + func (c *Client) GetNetworks() (*[]NetworkData, error) + func (c *Client) GetOperation() (*OperationData, error) + func (c *Client) GetProblems() (*TroubleshootingProblemsData, error) + func (c *Client) GetSOE() (*SOEData, error) + func (c *Client) GetSiteInfo() (*SiteInfoData, error) + func (c *Client) GetSitemaster() (*SitemasterData, error) + func (c *Client) GetStatus() (*StatusData, error) + func (c *Client) GetSystemStatus() (*SystemStatusData, error) + func (c *Client) SetAuthToken(token string) + func (c *Client) SetRetry(interval time.Duration, timeout time.Duration) + func (c *Client) SetTLSCert(cert *x509.Certificate) + type DecodedAlert map[string]string + func (v *DecodedAlert) UnmarshalJSON(data []byte) error + type Duration struct + func (v *Duration) MarshalJSON() ([]byte, error) + func (v *Duration) UnmarshalJSON(p []byte) error + type GridFaultData struct + AlertIsFault bool + AlertName string + AlertRaw int64 + DecodedAlert DecodedAlert + EcuPackagePartNumber string + EcuPackageSerialNumber string + EcuType string + GitHash string + SiteUID string + Timestamp int64 + type GridStatusData struct + GridServicesActive bool + GridStatus string + type MeterAggregatesData struct + EnergyExported float32 + EnergyImported float32 + Frequency float32 + IACurrent float32 + IBCurrent float32 + ICCurrent float32 + InstantApparentPower float32 + InstantAverageCurrent float32 + InstantAverageVoltage float32 + InstantPower float32 + InstantReactivePower float32 + InstantTotalCurrent float32 + LastCommunicationTime time.Time + LastPhasePowerCommunicationTime time.Time + LastPhaseVoltageCommunicationTime time.Time + NumMetersAggregated int + Timeout int + type MeterData struct + CachedReadings struct{ ... } + Connection struct{ ... } + CtVoltageReferences struct{ ... } + Cts []bool + ID int + Inverted []bool + Location string + RealPowerScaleFactor float32 + Type string + type NetworkData struct + Active bool + Dhcp bool + Enabled bool + ExtraIps []struct{ ... } + IfaceNetworkInfo struct{ ... } + Interface string + LastInternetConnected bool + LastTeslaConnected bool + NetworkName string + Primary bool + SecurityType string + Username string + type NonIsoTime struct + func (v *NonIsoTime) UnmarshalJSON(p []byte) error + type OperationData struct + BackupReservePercent float32 + FreqShiftLoadShedDeltaF float64 + FreqShiftLoadShedSoe float32 + RealMode string + type SOEData struct + Percentage float32 + type SiteInfoData struct + GridData struct{ ... } + MaxSiteMeterPowerKW int + MaxSystemEnergyKWH float32 + MaxSystemPowerKW float32 + MeasuredFrequency float32 + MinSiteMeterPowerKW int + NominalSystemEnergyKWH float32 + NominalSystemPowerKW float32 + SiteName string + TimeZone string + type SitemasterData struct + CanReboot string + ConnectedToTesla bool + PowerSupplyMode bool + Running bool + Status string + type StatusData struct + CellularDisabled bool + CommissionCount int + DeviceType string + Din string + Followers interface{} + GitHash string + IsNew bool + Leader string + StartTime NonIsoTime + SyncType string + UpTime Duration + Version string + type SystemStatusData struct + AllEnableLinesHigh bool + AuxiliaryLoad float32 + AvailableBlocks int + BatteryBlocks []struct{ ... } + BatteryTargetPower float32 + BatteryTargetReactivePower float32 + BlocksControlled int + CanReboot string + CommandSource string + ExpectedEnergyRemaining float32 + FfrPowerAvailabilityHigh float32 + FfrPowerAvailabilityLow float32 + GridFaults []GridFaultData + GridServicesPower float32 + InstantaneousMaxChargePower float32 + InstantaneousMaxDischargePower float32 + InverterNominalUsablePower float32 + LastToggleTimestamp time.Time + LoadChargeConstraint float32 + MaxApparentPower float32 + MaxChargePower float32 + MaxDischargePower float32 + MaxPowerEnergyRemaining float32 + MaxPowerEnergyToBeCharged float32 + MaxSustainedRampRate float32 + NominalEnergyRemaining float32 + NominalFullPackEnergy float32 + Primary bool + Score float32 + SmartInvDeltaP float32 + SmartInvDeltaQ float32 + SolarRealPowerLimit float64 + SystemIslandState string + type TroubleshootingProblemsData struct + Problems []interface{}