diff --git a/meter/tapo/connection.go b/meter/tapo/connection.go index ef81c4cc8..6a635b9da 100644 --- a/meter/tapo/connection.go +++ b/meter/tapo/connection.go @@ -104,6 +104,10 @@ func (d *Connection) Login() error { return err } + if err := d.CheckErrorCode(res.ErrorCode); err != nil { + return err + } + d.Token = res.Result.Token deviceResponse, err := d.ExecMethod("get_device_info", false)