I am just getting started with Home Assistant. I have already connected a few of my devices. I just tried to add my D-Link smart switch, and it appears that it is recognized, but when I try to toggle it, or when Home Assistant tries to poll it, I get an error.
Any ideas you guys have would be much appreciated.
I have a backup plan to use IFTTT, but it would be nice to have this work natively.
Toggle Error
Sat Oct 27 2018 17:34:00 GMT-0600 (Mountain Daylight Time)
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/service.py", line 224, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, 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 "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/dlink.py", line 112, in turn_on
self.data.smartplug.state = 'ON'
File "/srv/homeassistant/lib/python3.5/site-packages/pyW215/pyW215.py", line 280, in state
return self.SOAPAction('SetSocketSettings', 'SetSocketSettingsResult', self.controlParameters("1", "true"))
File "/srv/homeassistant/lib/python3.5/site-packages/pyW215/pyW215.py", line 132, in SOAPAction
self.authenticated = self.auth()
File "/srv/homeassistant/lib/python3.5/site-packages/pyW215/pyW215.py", line 319, in auth
Challenge = root.find('.//{http://purenetworks.com/HNAP1/}Challenge').text
AttributeError: 'NoneType' object has no attribute 'text'
Polling Error
Sat Oct 27 2018 17:35:45 GMT-0600 (Mountain Daylight Time)
Update for switch.dlink_smart_plug_w215 fails
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
await self.async_device_update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
await self.hass.async_add_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, 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 "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/dlink.py", line 120, in update
self.data.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/dlink.py", line 154, in update
_state = self.smartplug.state
File "/srv/homeassistant/lib/python3.5/site-packages/pyW215/pyW215.py", line 261, in state
response = self.SOAPAction('GetSocketSettings', 'OPStatus', self.moduleParameters("1"))
File "/srv/homeassistant/lib/python3.5/site-packages/pyW215/pyW215.py", line 132, in SOAPAction
self.authenticated = self.auth()
File "/srv/homeassistant/lib/python3.5/site-packages/pyW215/pyW215.py", line 319, in auth
Challenge = root.find('.//{http://purenetworks.com/HNAP1/}Challenge').text
AttributeError: 'NoneType' object has no attribute 'text'