Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Generation
}
Connection is the Shelly connection
func NewConnection ¶
func NewConnection(uri, user, password string, channel int, cache time.Duration) (*Connection, error)
NewConnection creates a new Shelly device connection.
type DeviceInfo ¶
type DeviceInfo struct { Mac string `json:"mac"` Gen int `json:"gen"` Model string `json:"model"` Type string `json:"type"` Auth bool `json:"auth"` AuthEn bool `json:"auth_en"` NumMeters int `json:"num_meters"` Profile string `json:"profile"` }
DeviceInfo is the common /shelly endpoint response https://shelly-api-docs.shelly.cloud/gen1/#shelly https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Shelly#http-endpoint-shelly
type Gen1Status ¶
type Gen1SwitchResponse ¶
type Gen1SwitchResponse struct {
Ison bool
}
type Gen2EM1Data ¶
type Gen2EM1Status ¶
type Gen2EMData ¶
type Gen2EMStatus ¶
type Gen2EMStatus struct { TotalActPower float64 `json:"total_act_power"` ACurrent float64 `json:"a_current"` BCurrent float64 `json:"b_current"` CCurrent float64 `json:"c_current"` AVoltage float64 `json:"a_voltage"` BVoltage float64 `json:"b_voltage"` CVoltage float64 `json:"c_voltage"` AActPower float64 `json:"a_act_power"` BActPower float64 `json:"b_act_power"` CActPower float64 `json:"c_act_power"` }
type Gen2Methods ¶
type Gen2Methods struct {
Methods []string
}
type Gen2RpcPost ¶
type Gen2SwitchStatus ¶
type Generation ¶
Click to show internal directories.
Click to hide internal directories.