Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(username, password, serial string, opts ...OptionFunc) (*Client, error)
func (*Client) Production ¶
func (c *Client) Production() (*ProductionResponse, error)
type Line ¶
type Line struct {
WNow float64 `json:"wNow"`
WhLifetime float64 `json:"whLifetime"`
VarhLeadLifetime float64 `json:"varhLeadLifetime"`
VarhLagLifetime float64 `json:"varhLagLifetime"`
VahLifetime float64 `json:"vahLifetime"`
RmsCurrent float64 `json:"rmsCurrent"`
RmsVoltage float64 `json:"rmsVoltage"`
ReactPwr float64 `json:"reactPwr"`
ApprntPwr float64 `json:"apprntPwr"`
PwrFactor float64 `json:"pwrFactor"`
WhToday float64 `json:"whToday"`
WhLastSevenDays float64 `json:"whLastSevenDays"`
VahToday float64 `json:"vahToday"`
VarhLeadToday float64 `json:"varhLeadToday"`
VarhLagToday float64 `json:"varhLagToday"`
}
type LoginResponse ¶
type Measurement ¶
type Measurement struct {
Type string `json:"type"`
ActiveCount int `json:"activeCount"`
ReadingTime int `json:"readingTime"`
WNow float64 `json:"wNow"`
WhLifetime float64 `json:"whLifetime"`
MeasurementType string `json:"measurementType,omitempty"`
VarhLeadLifetime float64 `json:"varhLeadLifetime,omitempty"`
VarhLagLifetime float64 `json:"varhLagLifetime,omitempty"`
VahLifetime float64 `json:"vahLifetime,omitempty"`
RmsCurrent float64 `json:"rmsCurrent,omitempty"`
RmsVoltage float64 `json:"rmsVoltage,omitempty"`
ReactPwr float64 `json:"reactPwr,omitempty"`
ApprntPwr float64 `json:"apprntPwr,omitempty"`
PwrFactor float64 `json:"pwrFactor,omitempty"`
WhToday float64 `json:"whToday,omitempty"`
WhLastSevenDays float64 `json:"whLastSevenDays,omitempty"`
VahToday float64 `json:"vahToday,omitempty"`
VarhLeadToday float64 `json:"varhLeadToday,omitempty"`
VarhLagToday float64 `json:"varhLagToday,omitempty"`
Lines []Line `json:"lines,omitempty"`
}
type OptionFunc ¶
func WithDebug ¶ added in v0.0.4
func WithDebug(debug bool) OptionFunc
func WithEnlightenBase ¶
func WithEnlightenBase(enlightenBase string) OptionFunc
func WithGatewayAddress ¶
func WithGatewayAddress(address string) OptionFunc
type ProductionResponse ¶
type ProductionResponse struct {
Production []Measurement `json:"production"`
Consumption []Measurement `json:"consumption"`
Storage []Storage `json:"storage"`
}
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.