TP-Link Kasa on an internal WiFi network

You can easily configure your TP-LINK Kasa wifi connection using the NODE-based tplink-smarthome-api (GitHub - plasticrake/tplink-smarthome-api: TP-Link Smarthome WiFi API) cli and a computer with wifi. This is tested with EU HS100 and HS110 and E27 LB110 and LB120. To configure the devices, proceed as follows:

  1. Short reset the device so it sets into connection mode (3 power on cycles for the bulbs and pressing the cog button till wifi LED turns to orange). Then, the device will create a open wifi AP named “TP-LINK_Smart Plug/Bulb_[MAC_5_6]”.
  2. Connect the computer wifi to that AP. If using Windows 10, it will think twice before connecting to that wifi.
  3. Using the terminal issue the following command, replacing SSID and password second fields with the correct values. The IP must be 192.168.0.1 and I had to escape all the quotation marks to make it work:
    tplink-smarthome-api send -u -D 192.168.0.1 "{\"netif\":{\"set_stainfo\": {\"ssid\":\"SSID\",\"password\":\"password\",\"key_type\":3}}}}"
  4. The device will start connecting to the new network and if it is successful, the wifi LED will turn into green (for plugs) or fade out and in (for bulbs).

This works like a charm and saves me plenty of time when any of the bulbs reset due to too fast power on and off cycles.

1 Like