tapo

package
v0.0.0-...-aa513c4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

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