Closed potatoch1p closed 7 years ago
Hi,
So I stupidly require a login before any command can be executed. Including the one that would help us debug this - EnableDebug
.
You could try adding the following after this line:
hub.EnableDebug(true)
Then when the login happens, you should see the output of the HTTP request & response.
Also check your router firmware version. This project has only been tested against specific versions. Unfortunately, there's no guarantee it'll work properly with others.
The latest version of the project would enable you to diagnose this. You can run EnableDebug true
prior to login and it'll dump the HTTP request / response.
Hi, I've tried to run this code and get the following issue when I login.
Can you help me debug this issue please?
sy@homehub: Login Home hub URL: http://192.168.0.3 Home hub user name: admin Home hub password: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x4c38e3]
goroutine 1 [running]: panic(0x7d75c0, 0xc42000c0e0) /usr/local/go/src/runtime/panic.go:500 +0x1a1 github.com/jamesnetherton/homehub-cli/vendor/github.com/jamesnetherton/homehub-client.(*Hub).Login(0xc420159940, 0x12, 0xc4201785b0, 0x5) /home/ubuntu/.go_project/src/github.com/jamesnetherton/homehub-cli/vendor/github.com/jamesnetherton/homehub-client/hub.go:225 +0x63 main.doLogin(0xc4200cb740, 0x5) /home/ubuntu/.go_project/src/github.com/jamesnetherton/homehub-cli/homehub-cli.go:237 +0x307 main.main() /home/ubuntu/.go_project/src/github.com/jamesnetherton/homehub-cli/homehub-cli.go:96 +0x481