I’ve a smart switch not connecting to home assistant …
The error message in the log :
16-12-28 16:45:24 INFO (MainThread) [homeassistant.loader] Loaded switch.tplink from homeassistant.components.switch.tplink
16-12-28 16:45:24 INFO (MainThread) [homeassistant.bootstrap] Setting up switch
16-12-28 16:45:24 INFO (MainThread) [homeassistant.components.switch] Setting up switch.tplink
16-12-28 16:45:24 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform tplink
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 150, in _async_setup_platform
entity_platform.add_entities, discovery_info
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 361, in __iter__
yield self # This tells Task to wait for completion.
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
future.result()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/homeassistant/components/switch/tplink.py", line 41, in setup_platform
add_devices([SmartPlugSwitch(SmartPlug(host), name)], True)
File "/Users/thesuperflycrib/.homeassistant/deps/pyHS100/pyHS100.py", line 73, in __init__
self.initialize()
File "/Users/thesuperflycrib/.homeassistant/deps/pyHS100/pyHS100.py", line 83, in initialize
self.sys_info = self.get_sysinfo()
File "/Users/thesuperflycrib/.homeassistant/deps/pyHS100/pyHS100.py", line 161, in get_sysinfo
return self._query_helper("system", "get_sysinfo")
File "/Users/thesuperflycrib/.homeassistant/deps/pyHS100/pyHS100.py", line 100, in _query_helper
request={target: {cmd: arg}}
File "/Users/thesuperflycrib/.homeassistant/deps/pyHS100/pyHS100.py", line 560, in query
sock.shutdown(socket.SHUT_RDWR)
OSError: [Errno 57] Socket is not connected
My configuration.yaml:
switch:
- platform: tplink
host: 192.168.0.154
name: Kettle Power Switch
The ip address is correct, the plug is responding to pings, ports 80 and 9999 are open, 80 returns a content-type of ‘text/html’ with the body ‘…’ and 9999 will accept a telnet connection.
Hass version : 0.35.2
Python version: 3.5