TP-Link lights not working since 0.59 upgrade

I have hass.io running on a raspberry pi. I installed and configured three TP-Link (LB100) bulb and have them working well in the KASA app. I also had them working well in my HA. The configuration.yaml and includes are as follows:

# Includes 
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
device_tracker: !include device_tracker.yaml
light: !include lights.yaml
sensor: !include sensors.yaml
notify: !include notify.yaml

lights.yaml

  - platform: tplink
    host: 192.168.1.110
    name: The Love Nest
  - platform: tplink
    host: 192.168.1.111
    name: Boys Lamp
  - platform: tplink
    host: 192.168.1.113
    name: Couch Lamp

After the 0.59 upgrade, I noticed that I could no longer do anything with the TP-Link lights from HA. They still work fine in the KASA app and from my Google Home that has them linked through the KASA app. I have checked my router to insure that the IP’s have not changed. But from the HA info button I get 100’s of the following errors as the HA attempts to connect with the lights.

Could not read state for Couch Lamp: Communication error
1:20 PM components/light/tplink.py (WARNING)
Could not read state for Couch Lamp: Communication error
1:19 PM components/light/tplink.py (WARNING)
Could not read state for Boys Lamp: Communication error
1:19 PM components/light/tplink.py (WARNING)

The home-assistant.log file has similar errors.

2017-12-12 13:29:27 WARNING (MainThread) [homeassistant.setup] Setup of sensor is taking over 10 seconds. 2017-12-12 13:29:28 WARNING (MainThread) [homeassistant.setup] Setup of light is taking over 10 seconds. 2017-12-12 13:29:28 WARNING (MainThread) [homeassistant.setup] Setup of device_tracker is taking over 10 seconds. 2017-12-12 13:29:32 WARNING (SyncWorker_1) [homeassistant.components.light.tplink] Could not read state for Boys Lamp: Communication error 2017-12-12 13:29:32 WARNING (MainThread) [homeassistant.setup] Setup of tts is taking over 10 seconds. 2017-12-12 13:29:37 WARNING (SyncWorker_14) [homeassistant.components.light.tplink] Could not read state for Couch Lamp: Communication error 2017-12-12 13:29:42 WARNING (SyncWorker_8) [homeassistant.components.light.tplink] Could not read state for The Love Nest: Communication error 2017-12-12 13:30:07 WARNING (SyncWorker_2) [homeassistant.components.light.tplink] Could not read state for The Love Nest: Communication error 2017-12-12 13:30:10 WARNING (SyncWorker_5) [homeassistant.components.light.tplink] Could not read state for Boys Lamp: Communication error 2017-12-12 13:30:15 WARNING (SyncWorker_14) [homeassistant.components.light.tplink] Could not read state for Couch Lamp: Communication error 2017-12-12 13:30:17 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds. 2017-12-12 13:30:20 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds. 2017-12-12 13:30:36 WARNING (SyncWorker_6) [homeassistant.components.light.tplink] Could not read state for Boys Lamp: Communication error 2017-12-12 13:30:41 WARNING (SyncWorker_13) [homeassistant.components.light.tplink] Could not read state for The Love Nest: Communication error 2017-12-12 13:30:46 WARNING (SyncWorker_1) [homeassistant.components.light.tplink] Could not read state for Couch Lamp: Communication error 2017-12-12 13:31:06 WARNING (SyncWorker_12) [homeassistant.components.light.tplink] Could not read state for Boys Lamp: Communication error

I was getting some different errors before I upgraded the firmware on the bulbs but I didn’t save the logs so I can’t show them. Is anyone else experiencing a similar problem with your TP-Link bulbs?

I have never seen that error before, can you try if you receive any kind of output with pyhs100 command line tool? Some recent firmware version apparently changed the emeter functionality, but I’m not sure if your errors are related or not: https://github.com/GadgetReactor/pyHS100/issues/103 .

What firmware version do you have on your lightbulbs?
I’m running 1.2.3 on an LB100 and 1.6.0 on an LB110 and they both work fine with V0.59.2

I am currently running 1.7.1. I can’t remember for sure what it was before I upgraded. I think it was like 1.3.? But I was having the HA problem before I did the firmware upgrade on the bulbs. So I don’t think it is related to that.

OK, I’m am new to this but I am guessing that I need to clone the pyhs100 repository. I found this command in another thread.

git clone https://github.com/GadgetReactor/pyHS100.git

pip3 install pyHS100==0.2.3 --target ~/.homeassistant/deps

I can clone the repository but I can’t run pip3. Not sure that is available in hass.io. Am I right? What do I do now to install the needed cli commands (pyhs100)? Is there a guide somewhere that I can use on how to clone and install?

As far as I remember, I have not done anything in addition to adding the info for the lights as you show in your lights.yaml.
I don’t have any spaces in my names, though - but that’s the only difference I can see.

Just upgraded the firmware version of the LB100 to 1.7.1 and see what that does.

OK I found the problem. It was simply that my router had reassigned the bulbs a different IP address. So since you can’t assign a static IP address directly to the bulbs, I instead created a IP address reservation in my router based on the MAC address. Things are cool now.

2 Likes