Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[P115] it is not working on p115 #5

Open
enesusta opened this issue Mar 2, 2024 · 1 comment
Open

[P115] it is not working on p115 #5

enesusta opened this issue Mar 2, 2024 · 1 comment

Comments

@enesusta
Copy link

enesusta commented Mar 2, 2024

package main

import (
	"fmt"

	"github.com/richardjennings/tapo/pkg/tapo"
)

func main() {
	var t *tapo.Tapo

	t, err := tapo.NewTapo("192.168.0.2", "", "") // it's already set in my code
	fmt.Println(err)
	if err != nil {
		fmt.Println(err)
	}

	r, _ := t.GetEnergyUsage()
	fmt.Println(r)
}

Here is my code, and then I executed i got this error message:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 1 [running]:
github.com/richardjennings/tapo/pkg/tapo.(*Tapo).Handshake(0xc0000000c0)
/Users/enesusta/go/pkg/mod/github.com/richardjennings/tapo@v0.0.2/pkg/tapo/tapo.go:142 +0x934
github.com/richardjennings/tapo/pkg/tapo.NewTapo({0x12afd6c, 0xb}, {0x12b3e2d, 0x17}, {0x12afd77, 0xb})
/Users/enesusta/go/pkg/mod/github.com/richardjennings/tapo@v0.0.2/pkg/tapo/tapo.go:55 +0x37e
main.main()
/Users/enesusta/go/src/github.com/enesusta/tapo-go/main.go:13 +0x39
exit status 2

thank u for ur time

I also want to mention that, its work with https://github.com/mihai-dinculescu/tapo this repo. but I want a more efficient and reliable solution to use fewer resources at my home lab. thank you.

@ripienaar
Copy link

The auth protocol has changed in Tapo P110(EU)_V1_1.3.0 Build 230905 so this library wont work anymore.

The new auth method is shown here in python https://github.com/almottier/TapoP100/blob/main/PyP100/auth_protocol.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants