question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to scan or connect to wifi

See original GitHub issue

OS: Kubuntu 20.04 Node: v14.17.2 Bulb: KL130

There appears to be a bug effecting wifi onboarding - I received the same error when attempting to scan available networks and connect to a network (both while connected to the bulb’s setup network). Other functions I tried (turn light on/off, change color temp) worked perfectly. To rule out issues with my node setup, I fresh installed node on a different computer (same OS + node version) and got identical errors.

Scan:

jamedeus@desktop:~/tp-link-python-client$ tplight wifi 192.168.0.1
TypeError: Cannot read property 'ap_list' of undefined
    at /usr/lib/node_modules/tplink-lightbulb/build/lib.js:1:1042
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

Connect:

jamedeus@desktop:~/tp-link-python-client$ tplight join 192.168.0.1 <credentials-removed>
TypeError: Cannot read property 'ap_list' of undefined
    at /usr/lib/node_modules/tplink-lightbulb/build/lib.js:1:1042
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

Unfortunately I’m not able to debug this as I don’t know javascript.

I can however confirm that the bulb is capable of connecting without the kasa app. I had previously used this python client to onboard and control my TP-Link HS220 smart dimmers. It includes an option for sending raw JSON to the device from CLI. However, it didn’t work with my new KL130 bulb which led me to this project.

After reading this commit, I noticed that the first JSON parameter is different than what I had used for the dimmers (Bulb=smartlife.iot.common.softaponboarding, dimmer=netif), while the rest was identical. I went back to the python client and swapped these parameters out. The bulb connected without issue, confirming that TP-Link hasn’t disabled this with a firmware update.

While I’m not able to debug, I’d be happy to reproduce the problem and test out potential solutions if that would help. Great project, much more user-friendly than what I had used previously!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
konsumercommented, Jul 31, 2021

model and hwId both look like reliable indicators of which device it is.

Agreed. I’d prefer to not keep a big table of all the supported versions (it’s more fragile, and requires a lot more maintenance.) I think we might be able to try some other stuff to figure it out, though. I am ok with the fall-through for now, but I bet it could be improved.

mic_type might be useful? Says IOT.SMARTPLUGSWITCH for a dimmer which is odd

I saw this on mine, too. super-weird.

Please continue tracking this issue at #61, as it’s really a separate thing.

1reaction
jamedeuscommented, Jul 31, 2021

Here’s the full details for all my devices in case it’s helpful. Couple possibilities:

  • model and hwId both look like reliable indicators of which device it is.
  • mic_type might be useful? Says IOT.SMARTPLUGSWITCH for a dimmer which is odd, maybe there are only a few possible values here which would be easy split into 2 groups.

Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scanner Cannot Connect to a Wireless Router or Access Point
If your scanner has trouble finding or connecting to a wireless router or access point, try these solutions: If you are connecting the...
Read more >
Device Can't Connect to Wi-Fi? Here's What to Do
Avoid the dreaded "Can't connect to network" error by using the tips in this guide.
Read more >
Solved: No WiFi scan, but WiFi print works - HP Community
Solved: Photosmart 5515 won't scan via WiFi, but printing is fine via WiFi (scan is fine via USB cable). WiFi scanning worked fine...
Read more >
Cannot Connect the Scanner and a Computer via Wi-Fi - PFU
In the [Wi-Fi Diagnosis] screen, check that the scanner is connected to the correct wireless access point. If the scanner is not connected...
Read more >
Fixed: My PC cannot connect to my scanner - HELP!
Via WiFi: If your scanner is connected to your PC via WiFi, make sure that the WiFi network is properly set up and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found