powerwall

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Format_name = map[int32]string{
		0: "None",
		1: "Raw",
		2: "Json",
	}
	Format_value = map[string]int32{
		"None": 0,
		"Raw":  1,
		"Json": 2,
	}
)

Enum value maps for Format.

View Source
var File_tesla_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ConfigResponse

type ConfigResponse struct {
	Vin    string `json:"vin,omitempty"`
	Meters []struct {
		Location   string `json:"location,omitempty"`
		Type       string `json:"type,omitempty"`
		Cts        []bool `json:"cts,omitempty"`
		Inverted   []bool `json:"inverted,omitempty"`
		Connection struct {
			IPAddress       string `json:"ip_address,omitempty"`
			Port            int    `json:"port,omitempty"`
			ShortID         string `json:"short_id,omitempty"`
			DeviceSerial    string `json:"device_serial,omitempty"`
			NeurioConnected bool   `json:"neurio_connected,omitempty"`
			HTTPSConf       struct {
				ClientCert          string `json:"client_cert,omitempty"`
				ClientKey           string `json:"client_key,omitempty"`
				ServerCaCert        string `json:"server_ca_cert,omitempty"`
				ServerName          string `json:"server_name,omitempty"`
				MaxIdleConnsPerHost int    `json:"max_idle_conns_per_host,omitempty"`
			} `json:"https_conf,omitempty"`
		} `json:"connection,omitempty"`
		RealPowerScaleFactor float64 `json:"real_power_scale_factor,omitempty"`
	} `json:"meters,omitempty"`
	BatteryBlocks []struct {
		Vin                      string `json:"vin,omitempty"`
		MinSoe                   int    `json:"min_soe,omitempty"`
		MaxSoe                   int    `json:"max_soe,omitempty"`
		Type                     string `json:"type,omitempty"`
		CanConnection            string `json:"can_connection,omitempty"`
		PviPowerStatus           string `json:"pvi_power_status,omitempty"`
		EnableInverterSolarMeter bool   `json:"enable_inverter_solar_meter,omitempty"`
	} `json:"battery_blocks,omitempty"`
	IslandContactorController struct {
		Type       string `json:"type,omitempty"`
		Connection struct {
			CanConnection string `json:"can_connection,omitempty"`
		} `json:"connection,omitempty"`
		NumberOfPhases int `json:"number_of_phases,omitempty"`
	} `json:"island_contactor_controller,omitempty"`
	IslandConfig struct {
	} `json:"island_config,omitempty"`
	Dio struct {
	} `json:"dio,omitempty"`
	SiteInfo struct {
		CustomerPreferredExportRule string  `json:"customer_preferred_export_rule,omitempty"`
		BatteryCommissionDate       string  `json:"battery_commission_date,omitempty"`
		BackupReservePercent        int     `json:"backup_reserve_percent,omitempty"`
		MaxSiteMeterPowerAc         int     `json:"max_site_meter_power_ac,omitempty"`
		MinSiteMeterPowerAc         int     `json:"min_site_meter_power_ac,omitempty"`
		NominalSystemEnergyAc       int     `json:"nominal_system_energy_ac,omitempty"`
		NominalSystemPowerAc        float64 `json:"nominal_system_power_ac,omitempty"`
		TariffContent               struct {
			Code         string `json:"code,omitempty"`
			Name         string `json:"name,omitempty"`
			Utility      string `json:"utility,omitempty"`
			DailyCharges []struct {
				Amount int    `json:"amount,omitempty"`
				Name   string `json:"name,omitempty"`
			} `json:"daily_charges,omitempty"`
			DemandCharges struct {
				All struct {
					All int `json:"ALL,omitempty"`
				} `json:"ALL,omitempty"`
				Summer struct {
				} `json:"Summer,omitempty"`
				Winter struct {
				} `json:"Winter,omitempty"`
			} `json:"demand_charges,omitempty"`
			EnergyCharges struct {
				All struct {
					All int `json:"ALL,omitempty"`
				} `json:"ALL,omitempty"`
				Summer struct {
					OffPeak float64 `json:"OFF_PEAK,omitempty"`
					OnPeak  float64 `json:"ON_PEAK,omitempty"`
				} `json:"Summer,omitempty"`
				Winter struct {
				} `json:"Winter,omitempty"`
			} `json:"energy_charges,omitempty"`
			Seasons struct {
				Summer struct {
					FromDay    int `json:"fromDay,omitempty"`
					ToDay      int `json:"toDay,omitempty"`
					FromMonth  int `json:"fromMonth,omitempty"`
					ToMonth    int `json:"toMonth,omitempty"`
					TouPeriods struct {
						OffPeak []struct {
							FromDayOfWeek int `json:"fromDayOfWeek,omitempty"`
							ToDayOfWeek   int `json:"toDayOfWeek,omitempty"`
							FromHour      int `json:"fromHour,omitempty"`
							FromMinute    int `json:"fromMinute,omitempty"`
							ToHour        int `json:"toHour,omitempty"`
							ToMinute      int `json:"toMinute,omitempty"`
						} `json:"OFF_PEAK,omitempty"`
						OnPeak []struct {
							FromDayOfWeek int `json:"fromDayOfWeek,omitempty"`
							ToDayOfWeek   int `json:"toDayOfWeek,omitempty"`
							FromHour      int `json:"fromHour,omitempty"`
							FromMinute    int `json:"fromMinute,omitempty"`
							ToHour        int `json:"toHour,omitempty"`
							ToMinute      int `json:"toMinute,omitempty"`
						} `json:"ON_PEAK,omitempty"`
					} `json:"tou_periods,omitempty"`
				} `json:"Summer,omitempty"`
				Winter struct {
					FromDay    int `json:"fromDay,omitempty"`
					ToDay      int `json:"toDay,omitempty"`
					FromMonth  int `json:"fromMonth,omitempty"`
					ToMonth    int `json:"toMonth,omitempty"`
					TouPeriods struct {
					} `json:"tou_periods,omitempty"`
				} `json:"Winter,omitempty"`
			} `json:"seasons,omitempty"`
			SellTariff struct {
				Name         string `json:"name,omitempty"`
				Utility      string `json:"utility,omitempty"`
				DailyCharges []struct {
					Amount int    `json:"amount,omitempty"`
					Name   string `json:"name,omitempty"`
				} `json:"daily_charges,omitempty"`
				DemandCharges struct {
					All struct {
						All int `json:"ALL,omitempty"`
					} `json:"ALL,omitempty"`
					Summer struct {
					} `json:"Summer,omitempty"`
					Winter struct {
					} `json:"Winter,omitempty"`
				} `json:"demand_charges,omitempty"`
				EnergyCharges struct {
					All struct {
						All int `json:"ALL,omitempty"`
					} `json:"ALL,omitempty"`
					Summer struct {
						OffPeak float64 `json:"OFF_PEAK,omitempty"`
						OnPeak  float64 `json:"ON_PEAK,omitempty"`
					} `json:"Summer,omitempty"`
					Winter struct {
					} `json:"Winter,omitempty"`
				} `json:"energy_charges,omitempty"`
				Seasons struct {
					Summer struct {
						FromDay    int `json:"fromDay,omitempty"`
						ToDay      int `json:"toDay,omitempty"`
						FromMonth  int `json:"fromMonth,omitempty"`
						ToMonth    int `json:"toMonth,omitempty"`
						TouPeriods struct {
							OffPeak []struct {
								FromDayOfWeek int `json:"fromDayOfWeek,omitempty"`
								ToDayOfWeek   int `json:"toDayOfWeek,omitempty"`
								FromHour      int `json:"fromHour,omitempty"`
								FromMinute    int `json:"fromMinute,omitempty"`
								ToHour        int `json:"toHour,omitempty"`
								ToMinute      int `json:"toMinute,omitempty"`
							} `json:"OFF_PEAK,omitempty"`
							OnPeak []struct {
								FromDayOfWeek int `json:"fromDayOfWeek,omitempty"`
								ToDayOfWeek   int `json:"toDayOfWeek,omitempty"`
								FromHour      int `json:"fromHour,omitempty"`
								FromMinute    int `json:"fromMinute,omitempty"`
								ToHour        int `json:"toHour,omitempty"`
								ToMinute      int `json:"toMinute,omitempty"`
							} `json:"ON_PEAK,omitempty"`
						} `json:"tou_periods,omitempty"`
					} `json:"Summer,omitempty"`
					Winter struct {
						FromDay    int `json:"fromDay,omitempty"`
						ToDay      int `json:"toDay,omitempty"`
						FromMonth  int `json:"fromMonth,omitempty"`
						ToMonth    int `json:"toMonth,omitempty"`
						TouPeriods struct {
						} `json:"tou_periods,omitempty"`
					} `json:"Winter,omitempty"`
				} `json:"seasons,omitempty"`
			} `json:"sell_tariff,omitempty"`
		} `json:"tariff_content,omitempty"`
		GridCode          string `json:"grid_code,omitempty"`
		GridCodeOverrides []struct {
			Name  string  `json:"name,omitempty"`
			Value float64 `json:"value,omitempty"`
		} `json:"grid_code_overrides,omitempty"`
		Country         string `json:"country,omitempty"`
		State           string `json:"state,omitempty"`
		Distributor     string `json:"distributor,omitempty"`
		Utility         string `json:"utility,omitempty"`
		Retailer        string `json:"retailer,omitempty"`
		Region          string `json:"region,omitempty"`
		SiteName        string `json:"site_name,omitempty"`
		Timezone        string `json:"timezone,omitempty"`
		ITCCliff        int    `json:"ITC_cliff,omitempty"`
		PanelMaxCurrent int    `json:"panel_max_current,omitempty"`
	} `json:"site_info,omitempty"`
	Strategy struct {
		Control          string `json:"control,omitempty"`
		ForecastMethod   string `json:"forecast_method,omitempty"`
		PvForecastMethod string `json:"pv_forecast_method,omitempty"`
		TOUMode          string `json:"TOU_mode,omitempty"`
	} `json:"strategy,omitempty"`
	DefaultRealMode             string `json:"default_real_mode,omitempty"`
	EnableInverterMeterReadings bool   `json:"enable_inverter_meter_readings,omitempty"`
	FreqShiftLoadShed           struct {
		Soe    int     `json:"soe,omitempty"`
		DeltaF float64 `json:"delta_f,omitempty"`
	} `json:"freq_shift_load_shed,omitempty"`
	FreqSupportParameters struct {
		TargetSoe               int `json:"target_soe,omitempty"`
		LowSoeLimit             int `json:"low_soe_limit,omitempty"`
		HighSoeLimit            int `json:"high_soe_limit,omitempty"`
		OffsetGain              int `json:"offset_gain,omitempty"`
		MaxChargePowerOffset    int `json:"max_charge_power_offset,omitempty"`
		MaxDischargePowerOffset int `json:"max_discharge_power_offset,omitempty"`
	} `json:"freq_support_parameters,omitempty"`
	Solar struct {
		Brand            string `json:"brand,omitempty"`
		Model            string `json:"model,omitempty"`
		PowerRatingWatts int    `json:"power_rating_watts,omitempty"`
	} `json:"solar,omitempty"`
	Solars []struct {
		Brand            string `json:"brand,omitempty"`
		Model            string `json:"model,omitempty"`
		PowerRatingWatts int    `json:"power_rating_watts,omitempty"`
	} `json:"solars,omitempty"`
	Logging struct {
		DatapumpLogRateMs int `json:"datapump_log_rate_ms,omitempty"`
	} `json:"logging,omitempty"`
	Installer struct {
		Email                  string `json:"email,omitempty"`
		CustomerID             string `json:"customer_id,omitempty"`
		Company                string `json:"company,omitempty"`
		Phone                  string `json:"phone,omitempty"`
		SolarInstallationType  string `json:"solar_installation_type,omitempty"`
		RunSitemaster          bool   `json:"run_sitemaster,omitempty"`
		VerifiedConfig         bool   `json:"verified_config,omitempty"`
		Location               string `json:"location,omitempty"`
		Mounting               string `json:"mounting,omitempty"`
		Wiring                 string `json:"wiring,omitempty"`
		BackupConfiguration    string `json:"backup_configuration,omitempty"`
		SolarInstallation      string `json:"solar_installation,omitempty"`
		HasPowerlineToEthernet bool   `json:"has_powerline_to_ethernet,omitempty"`
		HasCellularModemToWifi bool   `json:"has_cellular_modem_to_wifi,omitempty"`
	} `json:"installer,omitempty"`
	Customer struct {
		Registered bool `json:"registered,omitempty"`
	} `json:"customer,omitempty"`
	IndustrialNetworks struct {
	} `json:"industrial_networks,omitempty"`
	Credentials []struct {
		AccessRoles []string `json:"access_roles,omitempty"`
		Username    string   `json:"username,omitempty"`
		Password    string   `json:"password,omitempty"`
	} `json:"credentials,omitempty"`
	AutoMeterUpdate bool `json:"auto_meter_update,omitempty"`
	BridgeInverter  struct {
		Enabled bool      `json:"enabled,omitempty"`
		EndTime time.Time `json:"end_time,omitempty"`
	} `json:"bridge_inverter,omitempty"`
	ClientProtocols struct {
		Dnp3                  bool `json:"dnp3,omitempty"`
		M2M                   bool `json:"m2m,omitempty"`
		Mtls                  bool `json:"mtls,omitempty"`
		Modbus                bool `json:"modbus,omitempty"`
		AllowPublicIP         bool `json:"allow_public_ip,omitempty"`
		AllowInternalNetworks bool `json:"allow_internal_networks,omitempty"`
		ChargingKiosk         bool `json:"charging_kiosk,omitempty"`
	} `json:"client_protocols,omitempty"`
	TestTimers struct {
	} `json:"test_timers,omitempty"`
	SolarPowerwall bool `json:"solar_powerwall,omitempty"`
}

type ConfigString

type ConfigString struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Text string `protobuf:"bytes,100,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigString) Descriptor deprecated

func (*ConfigString) Descriptor() ([]byte, []int)

Deprecated: Use ConfigString.ProtoReflect.Descriptor instead.

func (*ConfigString) GetName

func (x *ConfigString) GetName() string

func (*ConfigString) GetText

func (x *ConfigString) GetText() string

func (*ConfigString) ProtoMessage

func (*ConfigString) ProtoMessage()

func (*ConfigString) ProtoReflect

func (x *ConfigString) ProtoReflect() protoreflect.Message

func (*ConfigString) Reset

func (x *ConfigString) Reset()

func (*ConfigString) String

func (x *ConfigString) String() string

type ConfigType

type ConfigType struct {

	// Types that are assignable to Config:
	//
	//	*ConfigType_Send
	//	*ConfigType_Recv
	Config isConfigType_Config `protobuf_oneof:"config"`
	// contains filtered or unexported fields
}

func (*ConfigType) Descriptor deprecated

func (*ConfigType) Descriptor() ([]byte, []int)

Deprecated: Use ConfigType.ProtoReflect.Descriptor instead.

func (*ConfigType) GetConfig

func (m *ConfigType) GetConfig() isConfigType_Config

func (*ConfigType) GetRecv

func (x *ConfigType) GetRecv() *PayloadConfigRecv

func (*ConfigType) GetSend

func (x *ConfigType) GetSend() *PayloadConfigSend

func (*ConfigType) ProtoMessage

func (*ConfigType) ProtoMessage()

func (*ConfigType) ProtoReflect

func (x *ConfigType) ProtoReflect() protoreflect.Message

func (*ConfigType) Reset

func (x *ConfigType) Reset()

func (*ConfigType) String

func (x *ConfigType) String() string

type ConfigType_Recv

type ConfigType_Recv struct {
	Recv *PayloadConfigRecv `protobuf:"bytes,2,opt,name=recv,proto3,oneof"`
}

type ConfigType_Send

type ConfigType_Send struct {
	Send *PayloadConfigSend `protobuf:"bytes,1,opt,name=send,proto3,oneof"`
}

type DeviceControllerResponse

type DeviceControllerResponse struct {
	Control struct {
		Alerts struct {
			Active []string `json:"active,omitempty"`
		} `json:"alerts,omitempty"`
		BatteryBlocks []struct {
			Din            string `json:"din,omitempty"`
			DisableReasons any    `json:"disableReasons,omitempty"`
		} `json:"batteryBlocks,omitempty"`
		Islanding struct {
			ContactorClosed    bool   `json:"contactorClosed,omitempty"`
			CustomerIslandMode string `json:"customerIslandMode,omitempty"`
			GridOK             bool   `json:"gridOK,omitempty"`
			MicroGridOK        bool   `json:"microGridOK,omitempty"`
		} `json:"islanding,omitempty"`
		MeterAggregates []struct {
			Location   string  `json:"location,omitempty"`
			RealPowerW float64 `json:"realPowerW,omitempty"`
		} `json:"meterAggregates,omitempty"`
		PvInverters  []any `json:"pvInverters,omitempty"`
		SiteShutdown struct {
			IsShutDown bool  `json:"isShutDown,omitempty"`
			Reasons    []any `json:"reasons,omitempty"`
		} `json:"siteShutdown,omitempty"`
		SystemStatus struct {
			NominalEnergyRemainingWh int `json:"nominalEnergyRemainingWh,omitempty"`
			NominalFullPackEnergyWh  int `json:"nominalFullPackEnergyWh,omitempty"`
		} `json:"systemStatus,omitempty"`
	} `json:"control,omitempty"`
	EsCan struct {
		Bus struct {
			Islander struct {
				ISLANDAcMeasurements struct {
					ISLANDFreqL1Load float64 `json:"ISLAND_FreqL1_Load,omitempty"`
					ISLANDFreqL1Main float64 `json:"ISLAND_FreqL1_Main,omitempty"`
					ISLANDFreqL2Load float64 `json:"ISLAND_FreqL2_Load,omitempty"`
					ISLANDFreqL2Main float64 `json:"ISLAND_FreqL2_Main,omitempty"`
					ISLANDFreqL3Load float64 `json:"ISLAND_FreqL3_Load,omitempty"`
					ISLANDFreqL3Main float64 `json:"ISLAND_FreqL3_Main,omitempty"`
					ISLANDGridState  string  `json:"ISLAND_GridState,omitempty"`
					ISLANDVL1NLoad   float64 `json:"ISLAND_VL1N_Load,omitempty"`
					ISLANDVL1NMain   float64 `json:"ISLAND_VL1N_Main,omitempty"`
					ISLANDVL2NLoad   float64 `json:"ISLAND_VL2N_Load,omitempty"`
					ISLANDVL2NMain   float64 `json:"ISLAND_VL2N_Main,omitempty"`
					ISLANDVL3NLoad   float64 `json:"ISLAND_VL3N_Load,omitempty"`
					ISLANDVL3NMain   float64 `json:"ISLAND_VL3N_Main,omitempty"`
					IsComplete       bool    `json:"isComplete,omitempty"`
					IsMIA            bool    `json:"isMIA,omitempty"`
					LastRxTime       string  `json:"lastRxTime,omitempty"`
				} `json:"ISLAND_AcMeasurements,omitempty"`
				ISLANDGridConnection struct {
					ISLANDGridConnected string `json:"ISLAND_GridConnected,omitempty"`
					IsComplete          bool   `json:"isComplete,omitempty"`
				} `json:"ISLAND_GridConnection,omitempty"`
			} `json:"ISLANDER,omitempty"`
			Msa struct {
				METERZAcMeasurements struct {
					MeterZCtaI                 float64 `json:"METER_Z_CTA_I,omitempty"`
					METERZCTAInstReactivePower int     `json:"METER_Z_CTA_InstReactivePower,omitempty"`
					METERZCTAInstRealPower     int     `json:"METER_Z_CTA_InstRealPower,omitempty"`
					MeterZCtbI                 float64 `json:"METER_Z_CTB_I,omitempty"`
					METERZCTBInstReactivePower int     `json:"METER_Z_CTB_InstReactivePower,omitempty"`
					METERZCTBInstRealPower     int     `json:"METER_Z_CTB_InstRealPower,omitempty"`
					MeterZVl1G                 float64 `json:"METER_Z_VL1G,omitempty"`
					MeterZVl2G                 float64 `json:"METER_Z_VL2G,omitempty"`
					IsMIA                      bool    `json:"isMIA,omitempty"`
					LastRxTime                 string  `json:"lastRxTime,omitempty"`
				} `json:"METER_Z_AcMeasurements,omitempty"`
				MSAInfoMsg struct {
					MSAAppGitHash []int `json:"MSA_appGitHash,omitempty"`
					MSAAssemblyID int   `json:"MSA_assemblyId,omitempty"`
					IsMIA         bool  `json:"isMIA,omitempty"`
				} `json:"MSA_InfoMsg,omitempty"`
				MSAStatus struct {
					LastRxTime string `json:"lastRxTime,omitempty"`
				} `json:"MSA_Status,omitempty"`
				PackagePartNumber   string `json:"packagePartNumber,omitempty"`
				PackageSerialNumber string `json:"packageSerialNumber,omitempty"`
			} `json:"MSA,omitempty"`
			Pinv []struct {
				PINVAcMeasurements struct {
					PINVVSplit1 float64 `json:"PINV_VSplit1,omitempty"`
					PINVVSplit2 float64 `json:"PINV_VSplit2,omitempty"`
					IsMIA       bool    `json:"isMIA,omitempty"`
				} `json:"PINV_AcMeasurements,omitempty"`
				PINVPowerCapability struct {
					PINVPnom   int  `json:"PINV_Pnom,omitempty"`
					IsComplete bool `json:"isComplete,omitempty"`
					IsMIA      bool `json:"isMIA,omitempty"`
				} `json:"PINV_PowerCapability,omitempty"`
				PINVStatus struct {
					PINVFout      float64 `json:"PINV_Fout,omitempty"`
					PINVGridState string  `json:"PINV_GridState,omitempty"`
					PINVPout      float64 `json:"PINV_Pout,omitempty"`
					PINVState     string  `json:"PINV_State,omitempty"`
					PINVVout      float64 `json:"PINV_Vout,omitempty"`
					IsMIA         bool    `json:"isMIA,omitempty"`
				} `json:"PINV_Status,omitempty"`
				Alerts struct {
					Active     []string `json:"active,omitempty"`
					IsComplete bool     `json:"isComplete,omitempty"`
					IsMIA      bool     `json:"isMIA,omitempty"`
				} `json:"alerts,omitempty"`
			} `json:"PINV,omitempty"`
			Pod []struct {
				PODEnergyStatus struct {
					PODNomEnergyRemaining int  `json:"POD_nom_energy_remaining,omitempty"`
					PODNomFullPackEnergy  int  `json:"POD_nom_full_pack_energy,omitempty"`
					IsMIA                 bool `json:"isMIA,omitempty"`
				} `json:"POD_EnergyStatus,omitempty"`
				PODInfoMsg struct {
					PODAppGitHash []int `json:"POD_appGitHash,omitempty"`
				} `json:"POD_InfoMsg,omitempty"`
			} `json:"POD,omitempty"`
			Pvac []struct {
				PVACInfoMsg struct {
					PVACAppGitHash []int `json:"PVAC_appGitHash,omitempty"`
				} `json:"PVAC_InfoMsg,omitempty"`
				PVACLogging struct {
					PVACPVCurrentA         float64 `json:"PVAC_PVCurrent_A,omitempty"`
					PVACPVCurrentB         float64 `json:"PVAC_PVCurrent_B,omitempty"`
					PVACPVCurrentC         float64 `json:"PVAC_PVCurrent_C,omitempty"`
					PVACPVCurrentD         float64 `json:"PVAC_PVCurrent_D,omitempty"`
					PVACPVMeasuredVoltageA float64 `json:"PVAC_PVMeasuredVoltage_A,omitempty"`
					PVACPVMeasuredVoltageB float64 `json:"PVAC_PVMeasuredVoltage_B,omitempty"`
					PVACPVMeasuredVoltageC float64 `json:"PVAC_PVMeasuredVoltage_C,omitempty"`
					PVACPVMeasuredVoltageD float64 `json:"PVAC_PVMeasuredVoltage_D,omitempty"`
					PVACVL1Ground          float64 `json:"PVAC_VL1Ground,omitempty"`
					PVACVL2Ground          float64 `json:"PVAC_VL2Ground,omitempty"`
					IsMIA                  bool    `json:"isMIA,omitempty"`
				} `json:"PVAC_Logging,omitempty"`
				PVACStatus struct {
					PVACFout  float64 `json:"PVAC_Fout,omitempty"`
					PVACPout  float64 `json:"PVAC_Pout,omitempty"`
					PVACState string  `json:"PVAC_State,omitempty"`
					PVACVout  float64 `json:"PVAC_Vout,omitempty"`
					IsMIA     bool    `json:"isMIA,omitempty"`
				} `json:"PVAC_Status,omitempty"`
				Alerts struct {
					Active     []string `json:"active,omitempty"`
					IsComplete bool     `json:"isComplete,omitempty"`
					IsMIA      bool     `json:"isMIA,omitempty"`
				} `json:"alerts,omitempty"`
				PackagePartNumber      string `json:"packagePartNumber,omitempty"`
				PackageSerialNumber    string `json:"packageSerialNumber,omitempty"`
				SubPackagePartNumber   string `json:"subPackagePartNumber,omitempty"`
				SubPackageSerialNumber string `json:"subPackageSerialNumber,omitempty"`
			} `json:"PVAC,omitempty"`
			Pvs []struct {
				PVSStatus struct {
					PVSSelfTestState    string  `json:"PVS_SelfTestState,omitempty"`
					PVSState            string  `json:"PVS_State,omitempty"`
					PVSStringAConnected bool    `json:"PVS_StringA_Connected,omitempty"`
					PVSStringBConnected bool    `json:"PVS_StringB_Connected,omitempty"`
					PVSStringCConnected bool    `json:"PVS_StringC_Connected,omitempty"`
					PVSStringDConnected bool    `json:"PVS_StringD_Connected,omitempty"`
					PVSVLL              float64 `json:"PVS_vLL,omitempty"`
					IsMIA               bool    `json:"isMIA,omitempty"`
				} `json:"PVS_Status,omitempty"`
				Alerts struct {
					Active     []string `json:"active,omitempty"`
					IsComplete bool     `json:"isComplete,omitempty"`
					IsMIA      bool     `json:"isMIA,omitempty"`
				} `json:"alerts,omitempty"`
			} `json:"PVS,omitempty"`
			Sync struct {
				METERXAcMeasurements struct {
					MeterXCtaI                 float64   `json:"METER_X_CTA_I,omitempty"`
					METERXCTAInstReactivePower float64   `json:"METER_X_CTA_InstReactivePower,omitempty"`
					METERXCTAInstRealPower     float64   `json:"METER_X_CTA_InstRealPower,omitempty"`
					MeterXCtbI                 float64   `json:"METER_X_CTB_I,omitempty"`
					METERXCTBInstReactivePower float64   `json:"METER_X_CTB_InstReactivePower,omitempty"`
					METERXCTBInstRealPower     float64   `json:"METER_X_CTB_InstRealPower,omitempty"`
					MeterXCtcI                 float64   `json:"METER_X_CTC_I,omitempty"`
					METERXCTCInstReactivePower float64   `json:"METER_X_CTC_InstReactivePower,omitempty"`
					METERXCTCInstRealPower     float64   `json:"METER_X_CTC_InstRealPower,omitempty"`
					MeterXVl1N                 float64   `json:"METER_X_VL1N,omitempty"`
					MeterXVl2N                 float64   `json:"METER_X_VL2N,omitempty"`
					MeterXVl3N                 float64   `json:"METER_X_VL3N,omitempty"`
					IsComplete                 bool      `json:"isComplete,omitempty"`
					IsMIA                      bool      `json:"isMIA,omitempty"`
					LastRxTime                 time.Time `json:"lastRxTime,omitempty"`
				} `json:"METER_X_AcMeasurements,omitempty"`
				METERYAcMeasurements struct {
					MeterYCtaI                 float64   `json:"METER_Y_CTA_I,omitempty"`
					METERYCTAInstReactivePower float64   `json:"METER_Y_CTA_InstReactivePower,omitempty"`
					METERYCTAInstRealPower     float64   `json:"METER_Y_CTA_InstRealPower,omitempty"`
					MeterYCtbI                 float64   `json:"METER_Y_CTB_I,omitempty"`
					METERYCTBInstReactivePower float64   `json:"METER_Y_CTB_InstReactivePower,omitempty"`
					METERYCTBInstRealPower     float64   `json:"METER_Y_CTB_InstRealPower,omitempty"`
					MeterYCtcI                 float64   `json:"METER_Y_CTC_I,omitempty"`
					METERYCTCInstReactivePower float64   `json:"METER_Y_CTC_InstReactivePower,omitempty"`
					METERYCTCInstRealPower     float64   `json:"METER_Y_CTC_InstRealPower,omitempty"`
					MeterYVl1N                 float64   `json:"METER_Y_VL1N,omitempty"`
					MeterYVl2N                 float64   `json:"METER_Y_VL2N,omitempty"`
					MeterYVl3N                 float64   `json:"METER_Y_VL3N,omitempty"`
					IsComplete                 bool      `json:"isComplete,omitempty"`
					IsMIA                      bool      `json:"isMIA,omitempty"`
					LastRxTime                 time.Time `json:"lastRxTime,omitempty"`
				} `json:"METER_Y_AcMeasurements,omitempty"`
				SYNCInfoMsg struct {
					SYNCAppGitHash []int `json:"SYNC_appGitHash,omitempty"`
					IsMIA          bool  `json:"isMIA,omitempty"`
				} `json:"SYNC_InfoMsg,omitempty"`
				SYNCStatus struct {
					LastRxTime time.Time `json:"lastRxTime,omitempty"`
				} `json:"SYNC_Status,omitempty"`
				PackagePartNumber   string `json:"packagePartNumber,omitempty"`
				PackageSerialNumber string `json:"packageSerialNumber,omitempty"`
			} `json:"SYNC,omitempty"`
			Thc []struct {
				THCInfoMsg struct {
					THCAppGitHash []int `json:"THC_appGitHash,omitempty"`
					IsComplete    bool  `json:"isComplete,omitempty"`
					IsMIA         bool  `json:"isMIA,omitempty"`
				} `json:"THC_InfoMsg,omitempty"`
				THCLogging struct {
					THCLOGPW20EnableLineState string `json:"THC_LOG_PW_2_0_EnableLineState,omitempty"`
				} `json:"THC_Logging,omitempty"`
				PackagePartNumber   string `json:"packagePartNumber,omitempty"`
				PackageSerialNumber string `json:"packageSerialNumber,omitempty"`
			} `json:"THC,omitempty"`
		} `json:"bus,omitempty"`
		Enumeration    any `json:"enumeration,omitempty"`
		FirmwareUpdate struct {
			IsUpdating  bool  `json:"isUpdating,omitempty"`
			Msa         any   `json:"msa,omitempty"`
			Powerwalls  []any `json:"powerwalls,omitempty"`
			PvInverters any   `json:"pvInverters,omitempty"`
			Sync        any   `json:"sync,omitempty"`
		} `json:"firmwareUpdate,omitempty"`
		InverterSelfTests any `json:"inverterSelfTests,omitempty"`
		PhaseDetection    any `json:"phaseDetection,omitempty"`
	} `json:"esCan,omitempty"`
	Neurio struct {
		IsDetectingWiredMeters bool  `json:"isDetectingWiredMeters,omitempty"`
		Pairings               []any `json:"pairings,omitempty"`
		Readings               []struct {
			DataRead []struct {
				CurrentA         float64 `json:"currentA,omitempty"`
				ReactivePowerVAR float64 `json:"reactivePowerVAR,omitempty"`
				RealPowerW       float64 `json:"realPowerW,omitempty"`
				VoltageV         float64 `json:"voltageV,omitempty"`
			} `json:"dataRead,omitempty"`
			Serial    string `json:"serial,omitempty"`
			Timestamp string `json:"timestamp,omitempty"`
		} `json:"readings,omitempty"`
	} `json:"neurio,omitempty"`
	Pw3Can struct {
		FirmwareUpdate struct {
			IsUpdating bool `json:"isUpdating,omitempty"`
			Progress   any  `json:"progress,omitempty"`
		} `json:"firmwareUpdate,omitempty"`
	} `json:"pw3Can,omitempty"`
	System struct {
		SitemanagerStatus struct {
			IsRunning bool `json:"isRunning,omitempty"`
		} `json:"sitemanagerStatus,omitempty"`
		Time               string `json:"time,omitempty"`
		UpdateUrgencyCheck any    `json:"updateUrgencyCheck,omitempty"`
	} `json:"system,omitempty"`
}

type Format

type Format int32
const (
	Format_None Format = 0
	Format_Raw  Format = 1
	Format_Json Format = 2
)

func (Format) Descriptor

func (Format) Descriptor() protoreflect.EnumDescriptor

func (Format) Enum

func (x Format) Enum() *Format

func (Format) EnumDescriptor deprecated

func (Format) EnumDescriptor() ([]byte, []int)

Deprecated: Use Format.Descriptor instead.

func (Format) Number

func (x Format) Number() protoreflect.EnumNumber

func (Format) String

func (x Format) String() string

func (Format) Type

func (Format) Type() protoreflect.EnumType

type Inverter

type Inverter struct {
	State           string
	GridState       string
	FrequencyOut    float32
	PowerOut        float32
	VoltageOut      float32
	ActiveAlerts    []string
	VoltageLine1    float32
	VoltageLine2    float32
	PowerCapability float32
	Mia             bool
	Battery         *Pod
}

type MessageEnvelope

type MessageEnvelope struct {
	DeliveryChannel int32        `protobuf:"varint,1,opt,name=deliveryChannel,proto3" json:"deliveryChannel,omitempty"`
	Sender          *Participant `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
	Recipient       *Participant `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Config          *ConfigType  `protobuf:"bytes,15,opt,name=config,proto3,oneof" json:"config,omitempty"`
	Payload         *QueryType   `protobuf:"bytes,16,opt,name=payload,proto3,oneof" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageEnvelope) Descriptor deprecated

func (*MessageEnvelope) Descriptor() ([]byte, []int)

Deprecated: Use MessageEnvelope.ProtoReflect.Descriptor instead.

func (*MessageEnvelope) GetConfig

func (x *MessageEnvelope) GetConfig() *ConfigType

func (*MessageEnvelope) GetDeliveryChannel

func (x *MessageEnvelope) GetDeliveryChannel() int32

func (*MessageEnvelope) GetPayload

func (x *MessageEnvelope) GetPayload() *QueryType

func (*MessageEnvelope) GetRecipient

func (x *MessageEnvelope) GetRecipient() *Participant

func (*MessageEnvelope) GetSender

func (x *MessageEnvelope) GetSender() *Participant

func (*MessageEnvelope) ProtoMessage

func (*MessageEnvelope) ProtoMessage()

func (*MessageEnvelope) ProtoReflect

func (x *MessageEnvelope) ProtoReflect() protoreflect.Message

func (*MessageEnvelope) Reset

func (x *MessageEnvelope) Reset()

func (*MessageEnvelope) String

func (x *MessageEnvelope) String() string

type ParentMessage

type ParentMessage struct {
	Message *MessageEnvelope `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Tail    *Tail            `protobuf:"bytes,2,opt,name=tail,proto3" json:"tail,omitempty"`
	// contains filtered or unexported fields
}

func (*ParentMessage) Descriptor deprecated

func (*ParentMessage) Descriptor() ([]byte, []int)

Deprecated: Use ParentMessage.ProtoReflect.Descriptor instead.

func (*ParentMessage) GetMessage

func (x *ParentMessage) GetMessage() *MessageEnvelope

func (*ParentMessage) GetTail

func (x *ParentMessage) GetTail() *Tail

func (*ParentMessage) ProtoMessage

func (*ParentMessage) ProtoMessage()

func (*ParentMessage) ProtoReflect

func (x *ParentMessage) ProtoReflect() protoreflect.Message

func (*ParentMessage) Reset

func (x *ParentMessage) Reset()

func (*ParentMessage) String

func (x *ParentMessage) String() string

type Participant

type Participant struct {

	// Types that are assignable to Id:
	//
	//	*Participant_Din
	//	*Participant_TeslaService
	//	*Participant_Local
	//	*Participant_AuthorizedClient
	Id isParticipant_Id `protobuf_oneof:"id"`
	// contains filtered or unexported fields
}

func (*Participant) Descriptor deprecated

func (*Participant) Descriptor() ([]byte, []int)

Deprecated: Use Participant.ProtoReflect.Descriptor instead.

func (*Participant) GetAuthorizedClient

func (x *Participant) GetAuthorizedClient() int32

func (*Participant) GetDin

func (x *Participant) GetDin() string

func (*Participant) GetId

func (m *Participant) GetId() isParticipant_Id

func (*Participant) GetLocal

func (x *Participant) GetLocal() int32

func (*Participant) GetTeslaService

func (x *Participant) GetTeslaService() int32

func (*Participant) ProtoMessage

func (*Participant) ProtoMessage()

func (*Participant) ProtoReflect

func (x *Participant) ProtoReflect() protoreflect.Message

func (*Participant) Reset

func (x *Participant) Reset()

func (*Participant) String

func (x *Participant) String() string

type Participant_AuthorizedClient

type Participant_AuthorizedClient struct {
	AuthorizedClient int32 `protobuf:"varint,4,opt,name=authorizedClient,proto3,oneof"`
}

type Participant_Din

type Participant_Din struct {
	Din string `protobuf:"bytes,1,opt,name=din,proto3,oneof"`
}

type Participant_Local

type Participant_Local struct {
	Local int32 `protobuf:"varint,3,opt,name=local,proto3,oneof"`
}

type Participant_TeslaService

type Participant_TeslaService struct {
	TeslaService int32 `protobuf:"varint,2,opt,name=teslaService,proto3,oneof"`
}

type PayloadConfigRecv

type PayloadConfigRecv struct {
	File *ConfigString `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	Code []byte        `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*PayloadConfigRecv) Descriptor deprecated

func (*PayloadConfigRecv) Descriptor() ([]byte, []int)

Deprecated: Use PayloadConfigRecv.ProtoReflect.Descriptor instead.

func (*PayloadConfigRecv) GetCode

func (x *PayloadConfigRecv) GetCode() []byte

func (*PayloadConfigRecv) GetFile

func (x *PayloadConfigRecv) GetFile() *ConfigString

func (*PayloadConfigRecv) ProtoMessage

func (*PayloadConfigRecv) ProtoMessage()

func (*PayloadConfigRecv) ProtoReflect

func (x *PayloadConfigRecv) ProtoReflect() protoreflect.Message

func (*PayloadConfigRecv) Reset

func (x *PayloadConfigRecv) Reset()

func (*PayloadConfigRecv) String

func (x *PayloadConfigRecv) String() string

type PayloadConfigSend

type PayloadConfigSend struct {
	Num  int32  `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
	File string `protobuf:"bytes,2,opt,name=file,proto3" json:"file,omitempty"`
	// contains filtered or unexported fields
}

func (*PayloadConfigSend) Descriptor deprecated

func (*PayloadConfigSend) Descriptor() ([]byte, []int)

Deprecated: Use PayloadConfigSend.ProtoReflect.Descriptor instead.

func (*PayloadConfigSend) GetFile

func (x *PayloadConfigSend) GetFile() string

func (*PayloadConfigSend) GetNum

func (x *PayloadConfigSend) GetNum() int32

func (*PayloadConfigSend) ProtoMessage

func (*PayloadConfigSend) ProtoMessage()

func (*PayloadConfigSend) ProtoReflect

func (x *PayloadConfigSend) ProtoReflect() protoreflect.Message

func (*PayloadConfigSend) Reset

func (x *PayloadConfigSend) Reset()

func (*PayloadConfigSend) String

func (x *PayloadConfigSend) String() string

type PayloadQuerySend

type PayloadQuerySend struct {
	RequestFormat Format         `protobuf:"varint,1,opt,name=requestFormat,proto3,enum=tedapi.Format" json:"requestFormat,omitempty"`
	Payload       *PayloadString `protobuf:"bytes,2,opt,name=payload,proto3,oneof" json:"payload,omitempty"`
	Signature     []byte         `protobuf:"bytes,3,opt,name=signature,proto3,oneof" json:"signature,omitempty"`
	Body          *StringValue   `protobuf:"bytes,4,opt,name=body,proto3,oneof" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*PayloadQuerySend) Descriptor deprecated

func (*PayloadQuerySend) Descriptor() ([]byte, []int)

Deprecated: Use PayloadQuerySend.ProtoReflect.Descriptor instead.

func (*PayloadQuerySend) GetBody

func (x *PayloadQuerySend) GetBody() *StringValue

func (*PayloadQuerySend) GetPayload

func (x *PayloadQuerySend) GetPayload() *PayloadString

func (*PayloadQuerySend) GetRequestFormat

func (x *PayloadQuerySend) GetRequestFormat() Format

func (*PayloadQuerySend) GetSignature

func (x *PayloadQuerySend) GetSignature() []byte

func (*PayloadQuerySend) ProtoMessage

func (*PayloadQuerySend) ProtoMessage()

func (*PayloadQuerySend) ProtoReflect

func (x *PayloadQuerySend) ProtoReflect() protoreflect.Message

func (*PayloadQuerySend) Reset

func (x *PayloadQuerySend) Reset()

func (*PayloadQuerySend) String

func (x *PayloadQuerySend) String() string

type PayloadString

type PayloadString struct {
	Value int32  `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	Text  string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*PayloadString) Descriptor deprecated

func (*PayloadString) Descriptor() ([]byte, []int)

Deprecated: Use PayloadString.ProtoReflect.Descriptor instead.

func (*PayloadString) GetText

func (x *PayloadString) GetText() string

func (*PayloadString) GetValue

func (x *PayloadString) GetValue() int32

func (*PayloadString) ProtoMessage

func (*PayloadString) ProtoMessage()

func (*PayloadString) ProtoReflect

func (x *PayloadString) ProtoReflect() protoreflect.Message

func (*PayloadString) Reset

func (x *PayloadString) Reset()

func (*PayloadString) String

func (x *PayloadString) String() string

type Pod

type Pod struct {
	EnergyRemaining float32
	EnergyFull      float32
	Mia             bool
}

type PowerwallGateway

type PowerwallGateway struct {
	Endpoint *url.URL

	Din string

	Config     *ConfigResponse
	Controller *DeviceControllerResponse
	// contains filtered or unexported fields
}

func NewPowerwallGateway

func NewPowerwallGateway(endpoint string, password string) *PowerwallGateway

func (*PowerwallGateway) GetAuthHeaders added in v0.0.3

func (p *PowerwallGateway) GetAuthHeaders() []*http.Cookie

func (*PowerwallGateway) GetConfig

func (p *PowerwallGateway) GetConfig() *string

func (*PowerwallGateway) JSONReverseProxy

func (p *PowerwallGateway) JSONReverseProxy(method string, path string, body io.Reader) gin.HandlerFunc

func (*PowerwallGateway) MakeAPIRequest

func (p *PowerwallGateway) MakeAPIRequest(method, path string, body io.Reader) ([]byte, error)

func (*PowerwallGateway) PeriodicRefresh

func (p *PowerwallGateway) PeriodicRefresh(interval time.Duration)

func (*PowerwallGateway) Refresh

func (p *PowerwallGateway) Refresh(force bool)

func (*PowerwallGateway) RunQuery

func (p *PowerwallGateway) RunQuery(query string, params interface{}) *string

func (*PowerwallGateway) UpdateConfig

func (p *PowerwallGateway) UpdateConfig()

func (*PowerwallGateway) UpdateController

func (p *PowerwallGateway) UpdateController()

type PvString

type PvString struct {
	Current   float32
	Voltage   float32
	Power     float32
	Connected bool
	Mia       bool
}

type QueryType

type QueryType struct {
	Send *PayloadQuerySend `protobuf:"bytes,1,opt,name=send,proto3,oneof" json:"send,omitempty"`
	Recv *PayloadString    `protobuf:"bytes,2,opt,name=recv,proto3,oneof" json:"recv,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryType) Descriptor deprecated

func (*QueryType) Descriptor() ([]byte, []int)

Deprecated: Use QueryType.ProtoReflect.Descriptor instead.

func (*QueryType) GetRecv

func (x *QueryType) GetRecv() *PayloadString

func (*QueryType) GetSend

func (x *QueryType) GetSend() *PayloadQuerySend

func (*QueryType) ProtoMessage

func (*QueryType) ProtoMessage()

func (*QueryType) ProtoReflect

func (x *QueryType) ProtoReflect() protoreflect.Message

func (*QueryType) Reset

func (x *QueryType) Reset()

func (*QueryType) String

func (x *QueryType) String() string

type State

type State struct {
	PvStrings     map[string]PvString
	Inverters     []Inverter
	Pods          []Pod
	Temperature   float32
	InverterPower float32
}

type StringValue

type StringValue struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*StringValue) Descriptor deprecated

func (*StringValue) Descriptor() ([]byte, []int)

Deprecated: Use StringValue.ProtoReflect.Descriptor instead.

func (*StringValue) GetValue

func (x *StringValue) GetValue() string

func (*StringValue) ProtoMessage

func (*StringValue) ProtoMessage()

func (*StringValue) ProtoReflect

func (x *StringValue) ProtoReflect() protoreflect.Message

func (*StringValue) Reset

func (x *StringValue) Reset()

func (*StringValue) String

func (x *StringValue) String() string

type Tail

type Tail struct {
	Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Tail) Descriptor deprecated

func (*Tail) Descriptor() ([]byte, []int)

Deprecated: Use Tail.ProtoReflect.Descriptor instead.

func (*Tail) GetValue

func (x *Tail) GetValue() int32

func (*Tail) ProtoMessage

func (*Tail) ProtoMessage()

func (*Tail) ProtoReflect

func (x *Tail) ProtoReflect() protoreflect.Message

func (*Tail) Reset

func (x *Tail) Reset()

func (*Tail) String

func (x *Tail) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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