Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetEnergyCommand ¶
type GetEnergyCommand struct { LastToggleTime time.Time NowCurrent float64 // Measured in Ampere NowPower float64 // Measured in Watts DailyEnergy float64 // Measured in kWh WeeklyEnergy float64 // Measured in kWh MonthlyEnergy float64 // Measured in kWh // contains filtered or unexported fields }
GetEnergyCommand retrieves the energy stats from the plug
func (*GetEnergyCommand) GetXML ¶
func (g *GetEnergyCommand) GetXML() ([]byte, error)
GetXML assembles the request XML
type GetStateCommand ¶
type GetStateCommand struct { CurrentState string // contains filtered or unexported fields }
GetStateCommand retrieves the current state from the plug (CurrentState will be "ON" or "OFF")
func (*GetStateCommand) GetXML ¶
func (g *GetStateCommand) GetXML() ([]byte, error)
GetXML assembles the request XML
type GetSystemInfoCommand ¶
type GetSystemInfoCommand struct { Model string FirmwareVersion string MacAddress string SystemName string DeviceTime time.Time // contains filtered or unexported fields }
GetSystemInfoCommand retrieves general information about the plug
func (*GetSystemInfoCommand) GetXML ¶
func (g *GetSystemInfoCommand) GetXML() ([]byte, error)
GetXML assembles the request XML
type SetStateCommand ¶
SetStateCommand switches a plug on or off. DesiredState needs to be set to "ON" or "OFF" (in caps)
func (*SetStateCommand) GetXML ¶
func (s *SetStateCommand) GetXML() ([]byte, error)
GetXML assembles the request XML
Click to show internal directories.
Click to hide internal directories.