Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection is the Tapo connection
func NewConnection ¶
func NewConnection(uri, user, password string) (*Connection, error)
NewConnection creates a new Tapo device connection. User is encoded by using MessageDigest of SHA1 which is afterwards B64 encoded. Password is directly B64 encoded.
func (*Connection) ChargedEnergy ¶
func (c *Connection) ChargedEnergy() (float64, error)
ChargedEnergy collects the daily charged energy
func (*Connection) CurrentPower ¶
func (c *Connection) CurrentPower() (float64, error)
CurrentPower provides current power consuption
func (*Connection) Enable ¶
func (c *Connection) Enable(enable bool) error
Enable implements the api.Charger interface
func (*Connection) Enabled ¶
func (c *Connection) Enabled() (bool, error)
Enabled implements the api.Charger interface
Click to show internal directories.
Click to hide internal directories.