Open SBRK opened 9 months ago
I'm having this issue with all my Tapo devices for a while now, certainly not just with the last version of the integration - multiple duplicate entries listed under all devices, and often going "unavailable". I've had to set up an automation that detects when the device has changed to unavailable and reloads. Also, devices seem to merge within each other.
For example, I have a P110 used for my son's heated blanket, and a P100 for his guitar amp.
Clicking on "2 devices" then shows the following - note that the devices appear to have become nested, and the integration is listed twice alongside one device.
P110, P100, L530 bulbs - all are affected. Integration version 2.12.1 home-assistant_tapo_2023-12-13T18-17-17.548Z.log
I have both of these issues too, I love HA, and this Tapo plugin is fantastic, but a couple of usability issues around how the devices look on my system, especially post-reboot means I'm spending a lot of time "managing" this when it should "just work". I don't add devices very often, it's a fairly static system now.
Here's how my devices look after a reboot this morning: This is actually after 2 of them needed reloads as per the original post above.
From the Second post on the multiple devices, I have 5 devices total, but showing as multiple devices against the headers, 2 of them are not working at all and will require further reconfiguration to work properly, this is my Tapo Hub H100 which also controls "Office Sensor" the T315 - IP addresses are fine, so I have turned on Debug Logging to review later.
But my reason for posting is to say, that I have both issues raised above, so I'm joining the thread to make sure I get the updates because I've been impressed with all the updates and fixes so far on this, you've solved many issues I've experienced in the last few releases, so looking forward to this stabilising a little more!
@Bodfrey I didn't even think about that workaround. Care to share the automation you did ?
Sure. I also added a notification so I could see how often it had to reload.
alias: "Blanket Watcher "
description: ""
trigger:
- platform: state
entity_id:
- switch.oscar_electric_blanket
to: unavailable
for:
hours: 0
minutes: 10
seconds: 0
condition: []
action:
- service: homeassistant.reload_config_entry
data: {}
target:
entity_id: switch.oscar_electric_blanket
- service: notify.mobile_app_pixel_7_pro
data:
message: Blanket Integration Reloaded
mode: single
@jaward916 I'm the same - it's the only aspect of HA that's needed attention and everything's pretty static in terms of devices. I'm having to delete and add devices back in all the time to resolve problems. All devices have static IPs and the MAC address tracking switched on. I've even made sure that the devices are locked to the closest mesh node on my wifi network to rule out connectivity issues.
+1
Sure. I also added a notification so I could see how often it had to reload.
@Bodfrey Does it happen other than when rebooting HA?
Sure. I also added a notification so I could see how often it had to reload.
@Bodfrey Does it happen other than when rebooting HA?
Yes, it does. It'll be fine for a while, but then will happen a few times an hour. Of course, it could just be a device issue - not ruling that out.
Not sure if same underlying cause but a few of my Tapo bulbs need reinstalling on a regular basis (since 2023.12 I think). Log messages:
2023-12-14 22:34:54.421 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [546812326720] The length of the provided data is not a multiple of the block length.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 903, in entity_service_call
raise result from None
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1233, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 591, in async_handle_light_off_service
await light.async_turn_off(**filter_turn_off_params(light, params))
File "/config/custom_components/tapo/light.py", line 167, in async_turn_off
await self._set_state(on=False)
File "/config/custom_components/tapo/light.py", line 180, in _set_state
return (await self.coordinator.device.off()).get_or_raise()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/light_device.py", line 41, in off
return await self._api.set_device_info(SetPlugInfoParams(False))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 135, in set_device_info
return await self._set_device_info(dataclass_encode_json(device_info))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 236, in _set_device_info
response = await self._protocol.send_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/klap_protocol.py", line 49, in send_request
response = await self._send_request(request, retry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/klap_protocol.py", line 91, in _send_request
self._klap_session.chiper.decrypt(response_data)
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/klap_protocol.py", line 327, in decrypt
dp = decryptor.update(msg[32:]) + decryptor.finalize()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/cryptography/hazmat/primitives/ciphers/base.py", line 186, in finalize
data = self._ctx.finalize()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/cryptography/hazmat/backends/openssl/ciphers.py", line 222, in finalize
raise ValueError(
ValueError: The length of the provided data is not a multiple of the block length.
Sure. I also added a notification so I could see how often it had to reload.
@Bodfrey Does it happen other than when rebooting HA?
Yes, it does. It'll be fine for a while, but then will happen a few times an hour. Of course, it could just be a device issue - not ruling that out.
I gave it a go, and I think reloading one plug sometimes screws up another one.
Not sure if same underlying cause but a few of my Tapo bulbs need reinstalling on a regular basis (since 2023.12 I think).
I did not specify it, but I've been having these issues since at least 2023.10
I'm having the same two types of issues, but my IP's are not static. But if it reproduces with static IP devices too, then that's not the problem, I guess. I thought it was just because of having dynamic IP's, and a router restarting because of a power outage.
Where does the integration store its config? I have added all the devices through the UI, not configuration.xml. I'd like to check how it stores the settings.
The documentation says "manually change ip address. Now you can change the ip address of a tapo device wihtout removing and re-adding it." is a feature. How do I change the IP of a device without removing and re-adding it?
I'm having the same two types of issues, but my IP's are not static. But if it reproduces with static IP devices too, then that's not the problem, I guess. I thought it was just because of having dynamic IP's, and a router restarting because of a power outage.
Where does the integration store its config? I have added all the devices through the UI, not configuration.xml. I'd like to check how it stores the settings.
Not the issue I guess, because I have static IPs. I did however enabled the feature to automatically change the device ip based on its mac adress. I should disable it to see if it changes anything.
EDIT: After disabling MAC following and a restard, all plugs seem to work fine. @Bodfrey @jaward916 @BettySwallocks do you have dynamic ips and mac following enabled ?
I'm having the same two types of issues, but my IP's are not static. But if it reproduces with static IP devices too, then that's not the problem, I guess. I thought it was just because of having dynamic IP's, and a router restarting because of a power outage. Where does the integration store its config? I have added all the devices through the UI, not configuration.xml. I'd like to check how it stores the settings.
Not the issue I guess, because I have static IPs. I did however enabled the feature to automatically change the device ip based on its mac adress. I should disable it to see if it changes anything.
EDIT: After disabling MAC following and a restard, all plugs seem to work fine. @Bodfrey @jaward916 @BettySwallocks do you have dynamic ips and mac following enabled ?
I have that enabled, too. I've removed the devices and added them back manually, so they don't get grouped again. There was an update of the integration, introducing KLAP protocol from Tapo. Maybe migrating to that messed things up...
I'm having the same two types of issues, but my IP's are not static. But if it reproduces with static IP devices too, then that's not the problem, I guess. I thought it was just because of having dynamic IP's, and a router restarting because of a power outage. Where does the integration store its config? I have added all the devices through the UI, not configuration.xml. I'd like to check how it stores the settings.
Not the issue I guess, because I have static IPs. I did however enabled the feature to automatically change the device ip based on its mac adress. I should disable it to see if it changes anything.
EDIT: After disabling MAC following and a restard, all plugs seem to work fine. @Bodfrey @jaward916 @BettySwallocks do you have dynamic ips and mac following enabled ?
I have removed and readded at the weekend, and it seems more stable, I do have dynamic IPs and Mac Following, but IPs only change if router reboots, if device is powered off and on it gets the same IP 9/10 times. This is much better:
Same here, for now.
Just ran into this issue as well, not figuring out why a device/bulb would stop responding and I'm seeing most my devices multi-linked many times like others in this thread (I do have EERO router with dynamic IPs and I have also enabled the MAC tracking in HA's Tapo intergration).
I am thinking I'll assign each bulb an fixed IP adress via my EERO app then re-add them all to get this fixed I guess or is static addresses not required for a fix as well as turning off MAC tracking? Not sure I fully understand if this has been fixed already and is just a one off removal and re-add to resolve or something else?
Most of the time, if your router is not that busy, even you use DHCP, it will try to assign the same IP address if that is still available for use. For me, I would use DHCP but once the IP is assigned, I will set that as permanent to avoid this kind of issues. How you configure would depend on what router you use.
Please upgrade to 2.13.0 its more stable
I have this regularly with the latest version, the tapo module unfortunately seems very unstable. I have to reload at least once a day.
Is there anything I can provide log wise etc. that might help to narrow down what's happening?
Thank you for your help!
Like many of you I've had a similar issue and tried a number of fixes (ensuring DNS was mapped to 8.8.8.8 which I read on another post) - none of these worked until I disabled the 'Try to track device dynamic ip using MAC address' as soon as I disabled this all devices came back online. I have a Ubiquiti Dream Machine and all these are on their own IOT VLAN (and were accessible on the app and via pinging) and will now assign them all static IP addresses to see if that helps...
Version of the integration
2.12.0
Configuration
P115 (x10)
Describe the bug
Sometimes (almost all the time when restarting Home Assistant), my Tapo plugs entities become unavailable. To make them work, I have to "reload" each device on the Tapo integration page manually:
Might be related, almost all plugs have the "TP-Link Tapo" integration listed multiple times:
Debug log
This is the log after a restart. I think my issue has to do with the unique ids errors