I’m running the latest version of HA (0.33.4) and today I tried to add a TP-Link HS200 switch. I got these errors in the logs.
16-11-30 17:15:32 homeassistant.components.switch: Error while setting up platform tplink
Traceback (most recent call last):
File "/srv/hass/lib/python3.5/site-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 "/srv/hass/lib/python3.5/site-packages/homeassistant/components/switch/tplink.py", line 43, in setup_platform
add_devices([SmartPlugSwitch(SmartPlug(host), name)], True)
File "/home/hass/.homeassistant/deps/pyHS100/pyHS100.py", line 35, in __init__
self.model = self._identify_model()
File "/home/hass/.homeassistant/deps/pyHS100/pyHS100.py", line 261, in _identify_model
return model
So my question is (maybe stupid of me), do I just wait for a new version where the fix may be included or is there something I should do to fix my installation?
I’m having the same issue with my HS200 switches. I’m on 33.4. What make you chose 30.2 for the version where the hs200s worked? Note that my hs100 and 110s work in 33.4.
You can put the blame for this on me. Since the HS200 was never mentioned in the documentation, I added extra functionality for the energy monitoring in the HS110 plugs in the underlying module responsible for handling the plugs (and apparently the HS200 wall switches).
A pull request was accepted in the library to bring back HS200 functionality, and in HA but the person who opened the pull request on HA didn’t update his dependency. The fix should be available with the next HA release.
If you roll back to 0.30.2 your switches should be working again.
I upgraded to 34 and while the HS200 now appears in HA, it does not show the correct state. I can turn the switch on but it returns to off state. Rolled-back to 30.2 again to regain the HS200 functionality.
My HS100 switches are doing the same as @linodavid . They show Off and when I switch them to On they switch right back to Off with no actual state change of the switch.
The code to fix HS200 was included in 0.34.0 but reversed in 0.34.1 because instead of fixing HS200 it broke the HS100 plugs. A fix is planned for the current version (0.34). HS100/110 plugs should be working with 0.34.1