So today I wanted to install my D-Link W215 switch by adding the component and filling in all credentials etc.
The switch does not show up.
I got these errors in the logs.
16-03-13 16:01:48 homeassistant.loader: Loaded switch.dlink from homeassistant.components.switch.dlink
16-03-13 16:01:48 homeassistant.util.package: Attempting install of https://github.com/LinuxChristian/pyW215/archive/v0.1.1.zip#pyW215==0.1.1
16-03-13 16:01:59 homeassistant.components.switch: Error while setting up platform dlink
Traceback (most recent call last):
File "/usr/lib/python3.4/urllib/request.py", line 1174, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.4/http/client.py", line 1090, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.4/http/client.py", line 1128, in _send_request
self.endheaders(body)
File "/usr/lib/python3.4/http/client.py", line 1086, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.4/http/client.py", line 924, in _send_output
self.send(msg)
File "/usr/lib/python3.4/http/client.py", line 859, in send
self.connect()
File "/usr/lib/python3.4/http/client.py", line 836, in connect
self.timeout, self.source_address)
File "/usr/lib/python3.4/socket.py", line 509, in create_connection
raise err
File "/usr/lib/python3.4/socket.py", line 500, in create_connection
sock.connect(sa)
OSError: [Errno 113] No route to host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 95, in _setup_platform
discovery_info)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/switch/dlink.py", line 44, in setup_platform
name)])
File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 145, in add_entities
if self.component.add_entity(entity):
File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 116, in add_entity
entity.update_ha_state()
File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 147, in update_ha_state
state = STATE_UNKNOWN if self.state is None else str(self.state)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 232, in state
return STATE_ON if self.is_on else STATE_OFF
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/switch/dlink.py", line 71, in is_on
return self.smartplug.state == 'ON'
File "/var/opt/homeassistant/lib/pyW215/pyW215.py", line 157, in state
response = self.SOAPAction('GetSocketSettings', 'OPStatus', self.moduleParameters("1"))
File "/var/opt/homeassistant/lib/pyW215/pyW215.py", line 100, in SOAPAction
auth = self.auth()
File "/var/opt/homeassistant/lib/pyW215/pyW215.py", line 201, in auth
response = urlopen(Request(self.url, payload, headers))
File "/usr/lib/python3.4/urllib/request.py", line 153, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.4/urllib/request.py", line 455, in open
response = self._open(req, data)
File "/usr/lib/python3.4/urllib/request.py", line 473, in _open
'_open', req)
File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(*args)
File "/usr/lib/python3.4/urllib/request.py", line 1202, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.4/urllib/request.py", line 1176, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 113] No route to host>