DaveGut/DEPRECATED-TP-Link-SmartThings

" java.lang.NullPointerException: Cannot get property 'id' on null object @line 651 (getToken)"

Closed this issue · 6 comments

I've tried installing the app in Kasa Account mode to work with some TP-Link HS100 WiFi plugs which are connected directly to the internet over WiFi.

After entering my username and password, I get an error saying " java.lang.NullPointerException: Cannot get property 'id' on null object @line 651 (getToken)".

Looking at that line of the code, it is trying to extract the id property of the hub object. I don't have an ST hub, so presumably this is the issue. I am a bit confused as to why an ST hub is needed in Kasa Account (cloud) mode. I thought TP-Link products don't need a hub as they all connect via WiFi to the Kasa cloud?

Am I missing something?

Thanks

Paul

You must have a SmartThings hub to use this Service Manager.

Thanks for clarifying. Are there any plans to remove the dependency on an ST hub?

There are now many cloud-based products that work with ST that have WiFi connections to the cloud (Nest, Ring, Arlo and TPLink to name a few) with no hub needed.

Paul

I have modified the code to work without an ST hub and it seems to work fine. Happy to share the mods if you're interested. They are only minor.

Great app btw :-)

Paul

I would like to see the modifications.

Have submitted a pull request which details the modifications.

As a summary, I have removed all references to ST hub and changed the UUID for TP Link cloud token request to be randomly generated on first initialization rather than being derived from hub ID.

Unfortunately, there are some changes to code indentation as it messed up some of the indenting when pasting from SmartThings IDE in to Github.