TP-Link Switches

I’ve been using my TP-Link HS-110 switches for a while in HA. However since the update to 0.33.1 (did not happen in 0.33 base) they no longer load. Nothing in my config has changed and the error in the logs is as follows:

16-11-21 17:09:01 homeassistant.components.switch: Error while setting up platform tplink
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity_component.py", line 150, in      _async_setup_platform
entity_platform.add_entities, discovery_info
File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
yield self  # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/switch/tplink.py", line 43, in setup_platform
add_devices([SmartPlugSwitch(SmartPlug(host), name)], True)
File "/home/tino/.homeassistant/deps/pyHS100/pyHS100.py", line 35, in __init__
self.model = self._identify_model()
File "/home/tino/.homeassistant/deps/pyHS100/pyHS100.py", line 254, in _identify_model
sys_info = self.get_info()
File "/home/tino/.homeassistant/deps/pyHS100/pyHS100.py", line 70, in get_info
return self._send_command('{"system":{"get_sysinfo":{}}}')
File "/home/tino/.homeassistant/deps/pyHS100/pyHS100.py", line 244, in _send_command
s.connect((self.ip, self.port))
socket.gaierror: [Errno -3] Temporary failure in name resolution

I find the error odd since it is added by IP address and no resolution is needed. Both IPs can be reached from the server too.

Anything else I can add or do to help solve this?

The problem is fixed with release 0.33.2

Awesome! That seems to have fixed it. Thanks!

Now to figure out why the updater didn’t tell me there was an update available…

Just as a heads up, it only checks two times a day so depending on the release time it can take awhile to show up.

it gives you the status of the switch and also the energy consumption?

You recommend them?

Yeah, the HS-110, in addition to wifi on/off control, reports the following things:

Current Consumption in W (at that moment)
Current in A (at that moment)
Daily Consumption in kW
Voltage
Total consumption (I assume since the start of using it) in kW

While I would prefer actual in-wall z-wave controlled outlets, I really am fairly satisfied with the TP-Link ones and would probably pick up a few more if the price was right.

Wow, that’s cool!

I ordered one.

In HA you can get all the above data?

That’s right. It appears in HA like a normal switch and when you click on it to see more detail this is what you get:

I do find it somewhat amusing that I am currently using this particular switch not as a switch but just as a power consumption reporter.

1 Like

Cool.

I think need to be updated, if I am not mistaken::
Current consumption (power) is ok in W
Daily consumption in KWh (energy)
Total in kWh (energy.

No?