I’ve just purchased a TP Link HS110 (energy monitoring version) and when I am trying to add it into Home Assistant I’m getting the below error. I already have two HS100 (non energy monitoring) connected and working fine. Can anybody help to get it working?
tplink: Error on device update!
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 197, in _async_add_entity
yield from entity.async_device_update(warning=False)
File "/usr/src/app/homeassistant/helpers/entity.py", line 327, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
raise self._exception
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/switch/tplink.py", line 108, in update
= "{:.2f}".format(emeter_readings["power"])
KeyError: 'power'
Thank you. I have had a look and have downloaded both files. I have Putty for SSH but am not really familiar how to use it. There seem to be three places I need to replace the smartdevice.py file but I have absolutely no idea how to
You only need to replace one of the files (can’t tell you which one) but replacing all three it should work as well.
With putty you can upload the new file. On the left is your computer desktop and the right is the directory for your pi. Just navigate to the correct folder of the pi and then upload from them left
Thank you. I will see if I can get that to work. Using putty I was only able to see the command shell and no folder structures as you mentioned. I will look a bit harder
Thank you so much for your help. I could not find the file location that I had to replace as I was logging in using the SSH as described here. https://www.home-assistant.io/addons/ssh/
@zwierzak is there any way to change the refresh rate for power usage? At the moment it can take up to 30 seconds to register that the device I have connected is drawing power.
I have 3x HS100 which all work fine via the Kasa app. I also have them linked via home assistant, however only 2 of them work fine whilst the other appears in HA but is greyed out and can’t be controlled. Any ideas what is wrong with this 3rd device?