Versions in this module Expand all Collapse all v0 v0.1.2 Oct 19, 2023 v0.1.1 Oct 18, 2023 Changes in this version + type DeviceInfo struct + ErrorCode int + Result DeviceInfoResult + type DeviceInfoDefaultStates struct + State DeviceInfoState + Type string + type DeviceInfoResult struct + AutoOffRemainTime int + AutoOffStatus string + Avatar string + DefaultStates DeviceInfoDefaultStates + DeviceID string + DeviceOn bool + FwID string + FwVer string + HasSetLocationInfo bool + HwID string + HwVer string + IP string + Lang string + Latitude int + Longitude int + Mac string + Model string + Nickname string + OemID string + OnTime int + Overheated bool + PowerProtectionStatus string + Region string + Rssi int + SignalLevel int + Specs string + Ssid string + TimeDiff int + Type string + type DeviceInfoState struct + type DeviceRunningInfo struct + ErrorCode int + Result DeviceRunningInfoResult + type DeviceRunningInfoResult struct + AutoOffRemainTime int + AutoOffStatus string + Avatar string + DefaultStates DeviceInfoDefaultStates + DeviceID string + DeviceOn bool + FwVer string + HasSetLocationInfo bool + IP string + Lang string + Latitude int + Longitude int + Nickname string + OnTime int + Overheated bool + PowerProtectionStatus string + Region string + Rssi int + SignalLevel int + Specs string + type EnergyUsage struct + ErrorCode int + Result EnergyUsageResult + type EnergyUsageResult struct + CurrentPower int + ElectricityCharge []int + LocalTime string + MonthEnergy int + MonthRuntime int + TodayEnergy int + TodayRuntime int + type Tapo struct + func NewTapo(ip string, email string, password string) (*Tapo, error) + func (d *Tapo) DeviceInfo() (map[string]interface{}, error) + func (d *Tapo) DeviceRunningInfo() (map[string]interface{}, error) + func (d *Tapo) EnergyUsage() (map[string]interface{}, error) + func (d *Tapo) GetDeviceInfo() (DeviceInfo, error) + func (d *Tapo) GetDeviceRunningInfo() (DeviceRunningInfo, error) + func (d *Tapo) GetEnergyUsage() (EnergyUsage, error) + func (d *Tapo) Handshake() error + func (d *Tapo) Login() error + func (d *Tapo) Request(url string, method string, body map[string]interface{}) (map[string]interface{}, error) + func (d *Tapo) RequestPath(path string, method string, body map[string]interface{}) (map[string]interface{}, error) + func (d *Tapo) RequestRaw(url string, method string, body map[string]interface{}) ([]byte, error) + func (d *Tapo) RequestResult(url string, method string, body map[string]interface{}, result any) error + func (d *Tapo) TurnOff() (map[string]interface{}, error) + func (d *Tapo) TurnOn() (map[string]interface{}, error)