petretiandrea / home-assistant-tapo-p100

A custom integration to control Tapo devices from home assistant.
MIT License
804 stars 100 forks source link

All P100s, P110, are not working anymore (after a firmware update?) #468

Closed frank777777 closed 11 months ago

frank777777 commented 1 year ago

-->

Version of the integration

HACS Version: TP-Link Tapo controller V.2.4.0

HA: Home Assistant 2023.8.1 Supervisor 2023.07.1 Operating System 10.4 Frontend 20230802.0 - latest

-->

Configuration

Tapo P100 1.4.18 Build 20230711 Rel. 55651

P110 1.2.3 Build 230425 Rel. 142542

Add your logs here.

Describe the bug

after the update of the firmware in the Tapo app of the P1XX everything stops working - error mentioned: configuration failed since couple of days ago everything was working smoothly

Debug log

Logger: homeassistant.config_entries Source: custom_components/tapo/tapo_device.py:31 Integration: TP-Link Tapo (documentation, issues) First occurred: 7 agosto 2023 alle ore 19:01:02 (28 occurrences) Last logged: 08:35:57

Error setting up entry frigorifero for tapo Error setting up entry lavatrice for tapo Error setting up entry piano cottura for tapo Error setting up entry luce viale 1 for tapo Error setting up entry lampada di sale grande for tapo Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 388, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tapo/init.py", line 39, in async_setup_entry raise error File "/config/custom_components/tapo/init.py", line 37, in async_setup_entry return await device.initialize_device(hass) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tapo/tapo_device.py", line 31, in initialize_device raise DeviceNotSupported(f"Device {host} not supported!") custom_components.tapo.errors.DeviceNotSupported: Device 192.168.1.36 not supported!

jm320767 commented 1 year ago

Hi Frank777777,

I had the same problem and deleted the devices and reinstalled them. After that the problem was solved.

Best regards, Jan

frank777777 commented 1 year ago

thanks for the hint . quick question, as I have 32 devices, with energy data memorized. do you know if I'm going to lose all data? thanks for your kind reply. Frank

frank777777 commented 1 year ago

I also like to confirm, is not working. I can not add anymore a device, seems on the add a new device on tapo HACS, that I'm not recognized ( invalid ) and I check the password twice.

jm320767 commented 1 year ago

I have no experience, sorry for that.

TeDeVPrime commented 1 year ago

well i can't connect to my tapo devices anymore as well.... what is going on. i tried to remove the addon .... install it again... update .... check firmware updates.... no matter what i do when i try to add the devices again... i get a failed to connect

OliverStoll commented 1 year ago

Same for me, all my L530 suddenly stopped working. I tried to reinstall the integrations for them, but now it just gives an "Invalid Authentication".

My Username is my fully lowercase email adress, so this is no Uppercase issue.

FredM17 commented 1 year ago

I had the same problem with two P110 plugs. No longer recognized by HA and the Tapo application on Android.

Since I had other problems with my network and especially with Zigbee devices, probably due to interference between WIFI and Zigbee using both channel 11, I reconfigured Zigbee2MQTT to use channel 20. Impossible to change the WIFI channel on Deco P9+M4... As TP-Link support told me: "the algorithm takes care of it"!

After that, I had no more problems with the Zigbee devices and I reinstalled the two P110 plugs via the Android app before reinstalling the HA integration.

Of course, it's impossible to say that changing the Zigbee channel is responsible for getting the P110 plugs working again, but as far as I'm concerned, it works perfectly now.

TeDeVPrime commented 1 year ago

the Tapo integration refuses to connect to the P110. Zigbee has nothing to do with it. i can control the plugs via the TAPO android app just fine.

fromNL commented 1 year ago

I have 6 working P110 devices. IP is via DHCP, so I would like to track and assign them via their MAC address. When I run arp in the terminal, everything is shown (I have several P110 plugs, all are firmware up to date). But. If I go to the configuration and enable the checkbox for MAC support, the device is no longer maintained by the tapo integration according to h.a. and I can't see any data anymore. Since I am making an overview of everything in my house, I need to eject and insert the plug every 7 days or so, until everything is tested. Currently I am forced to find the IP address manually, this is not what I expect of automation.

After running arp manually in the terminal several times, and after enabling debug, I now do can check the checkbox for tracking. After disabling the debug log, I do see the MAC address in there, so I am now reconfiguring all of my switches (without debugging).

I found 3 switches that accept tracking by mac, and 3 do not (the serial numbers indicate I have 2 batches, and all three in the same batch either work or not). Debug shows: 2023-09-05 11:37:58.849 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 3 oven' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background

More complete debug log: 2023-09-05 10:50:41.347 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 3 oven' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 10:50:45.954 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 2 t.v.' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 10:50:51.567 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 1 heating' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 10:51:56.672 ERROR (MainThread) [frontend.js.latest.202308021] http://homeassistant.local:8123/frontend_latest/15664-2R3AuA7BqSA.js:1:78472 TypeError: this.contentElement is null 2023-09-05 10:52:02.743 ERROR (MainThread) [frontend.js.latest.202308021] http://homeassistant.local:8123/frontend_latest/15664-2R3AuA7BqSA.js:1:78472 TypeError: this.contentElement is null 2023-09-05 10:52:10.048 ERROR (MainThread) [frontend.js.latest.202308021] http://homeassistant.local:8123/frontend_latest/15664-2R3AuA7BqSA.js:1:78472 TypeError: this.contentElement is null 2023-09-05 11:37:56.479 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.137 seconds (success: True) 2023-09-05 11:37:56.864 INFO (MainThread) [custom_components.tapo.config_flow] <homeassistant.config_entries.ConfigEntry object at 0x7f8e6c3780> 2023-09-05 11:37:58.849 INFO (MainThread) [custom_components.tapo] Unloaded entry for a207fca4d2838ac53aa13093befefbeb 2023-09-05 11:37:58.849 INFO (MainThread) [custom_components.tapo.setup_helpers] Trying to track ip address of None, last known ip is 192.168.2.215 2023-09-05 11:37:58.849 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 3 oven' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 11:38:04.227 INFO (MainThread) [custom_components.tapo.setup_helpers] Trying to track ip address of None, last known ip is 192.168.2.215 2023-09-05 11:38:07.829 INFO (MainThread) [custom_components.tapo.setup_helpers] Trying to track ip address of None, last known ip is 192.168.2.215 2023-09-05 11:38:07.830 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 3 oven' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 11:38:09.252 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.155 seconds (success: True) 2023-09-05 11:38:12.446 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.140 seconds (success: True) 2023-09-05 11:38:12.625 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.140 seconds (success: True) 2023-09-05 11:38:13.089 INFO (MainThread) [custom_components.tapo.setup_helpers] Trying to track ip address of None, last known ip is 192.168.2.215 2023-09-05 11:38:14.518 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.147 seconds (success: True) 2023-09-05 11:38:17.541 ERROR (MainThread) [frontend.js.latest.202308021] http://homeassistant.local:8123/frontend_latest/15664-2R3AuA7BqSA.js:1:78472 TypeError: this.contentElement is null 2023-09-05 11:38:17.592 INFO (MainThread) [custom_components.tapo.config_flow] <homeassistant.config_entries.ConfigEntry object at 0x7f8e6c3780> 2023-09-05 11:38:17.606 INFO (MainThread) [custom_components.tapo.config_flow] <homeassistant.config_entries.ConfigEntry object at 0x7f8e6c3780> 2023-09-05 11:38:23.228 DEBUG (MainThread) [custom_components.tapo.setup_helpers] Creating new API to create a coordinator for 8022FE1EFCCD3F739C3A78963DDCF5E1204AB557 2023-09-05 11:38:23.471 INFO (MainThread) [custom_components.tapo.coordinators] Detected model of 192.168.2.215: p110 2023-09-05 11:38:23.610 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.138 seconds (success: True) 2023-09-05 11:38:23.777 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.153 seconds (success: True)

When I enable the mac tracking, H.A. shows 'Failed setup, will retry' and the mouse hoover text shows 'NoneType' object has no attribute 'replace'. I waited some time, but it remains in error state. As soon as I uncheck the MAC address tracking, h.a. is pleased and everything is working again.

I think the code which looks for the MAC address is getting an empty variable. I think this should ve tested in the code, so it does not go in 'error' mode, but still collects data via the IP. The MAC tracking should be secondary and not break functionality. imho.

TeDeVPrime commented 1 year ago

i have the Track MAC unchecked when i try to add the plug. it doesn't work. this is getting out of hand. i can't be dealing with stupid things like that all the time. i have tapo P110 that opens my office door so that people don't have to get up and open the door 20 times per day. i am replacing the p110 with a shelly smart plug and move on.

petretiandrea commented 1 year ago

i have the Track MAC unchecked when i try to add the plug. it doesn't work. this is getting out of hand. i can't be dealing with stupid things like that all the time. i have tapo P110 that opens my office door so that people don't have to get up and open the door 20 times per day. i am replacing the p110 with a shelly smart plug and move on.

This is an open source and custom integration. I don't have enough time to add functionality and test everything. The right way to report a problem is to at least report a version of the integration and home assistant. So what version of integration are you running now? From which version did you start having problems? Have you a logs?

petretiandrea commented 1 year ago

I have 6 working P110 devices. IP is via DHCP, so I would like to track and assign them via their MAC address. When I run arp in the terminal, everything is shown (I have several P110 plugs, all are firmware up to date). But. If I go to the configuration and enable the checkbox for MAC support, the device is no longer maintained by the tapo integration according to h.a. and I can't see any data anymore. Since I am making an overview of everything in my house, I need to eject and insert the plug every 7 days or so, until everything is tested. Currently I am forced to find the IP address manually, this is not what I expect of automation.

After running arp manually in the terminal several times, and after enabling debug, I now do can check the checkbox for tracking. After disabling the debug log, I do see the MAC address in there, so I am now reconfiguring all of my switches (without debugging).

I found 3 switches that accept tracking by mac, and 3 do not (the serial numbers indicate I have 2 batches, and all three in the same batch either work or not). Debug shows: 2023-09-05 11:37:58.849 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 3 oven' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background

More complete debug log: 2023-09-05 10:50:41.347 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 3 oven' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 10:50:45.954 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 2 t.v.' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 10:50:51.567 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 1 heating' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 10:51:56.672 ERROR (MainThread) [frontend.js.latest.202308021] http://homeassistant.local:8123/frontend_latest/15664-2R3AuA7BqSA.js:1:78472 TypeError: this.contentElement is null 2023-09-05 10:52:02.743 ERROR (MainThread) [frontend.js.latest.202308021] http://homeassistant.local:8123/frontend_latest/15664-2R3AuA7BqSA.js:1:78472 TypeError: this.contentElement is null 2023-09-05 10:52:10.048 ERROR (MainThread) [frontend.js.latest.202308021] http://homeassistant.local:8123/frontend_latest/15664-2R3AuA7BqSA.js:1:78472 TypeError: this.contentElement is null 2023-09-05 11:37:56.479 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.137 seconds (success: True) 2023-09-05 11:37:56.864 INFO (MainThread) [custom_components.tapo.config_flow] <homeassistant.config_entries.ConfigEntry object at 0x7f8e6c3780> 2023-09-05 11:37:58.849 INFO (MainThread) [custom_components.tapo] Unloaded entry for a207fca4d2838ac53aa13093befefbeb 2023-09-05 11:37:58.849 INFO (MainThread) [custom_components.tapo.setup_helpers] Trying to track ip address of None, last known ip is 192.168.2.215 2023-09-05 11:37:58.849 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 3 oven' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 11:38:04.227 INFO (MainThread) [custom_components.tapo.setup_helpers] Trying to track ip address of None, last known ip is 192.168.2.215 2023-09-05 11:38:07.829 INFO (MainThread) [custom_components.tapo.setup_helpers] Trying to track ip address of None, last known ip is 192.168.2.215 2023-09-05 11:38:07.830 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smart-plug 3 oven' for tapo integration not ready yet: 'NoneType' object has no attribute 'replace'; Retrying in background 2023-09-05 11:38:09.252 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.155 seconds (success: True) 2023-09-05 11:38:12.446 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.140 seconds (success: True) 2023-09-05 11:38:12.625 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.140 seconds (success: True) 2023-09-05 11:38:13.089 INFO (MainThread) [custom_components.tapo.setup_helpers] Trying to track ip address of None, last known ip is 192.168.2.215 2023-09-05 11:38:14.518 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.147 seconds (success: True) 2023-09-05 11:38:17.541 ERROR (MainThread) [frontend.js.latest.202308021] http://homeassistant.local:8123/frontend_latest/15664-2R3AuA7BqSA.js:1:78472 TypeError: this.contentElement is null 2023-09-05 11:38:17.592 INFO (MainThread) [custom_components.tapo.config_flow] <homeassistant.config_entries.ConfigEntry object at 0x7f8e6c3780> 2023-09-05 11:38:17.606 INFO (MainThread) [custom_components.tapo.config_flow] <homeassistant.config_entries.ConfigEntry object at 0x7f8e6c3780> 2023-09-05 11:38:23.228 DEBUG (MainThread) [custom_components.tapo.setup_helpers] Creating new API to create a coordinator for 8022FE1EFCCD3F739C3A78963DDCF5E1204AB557 2023-09-05 11:38:23.471 INFO (MainThread) [custom_components.tapo.coordinators] Detected model of 192.168.2.215: p110 2023-09-05 11:38:23.610 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.138 seconds (success: True) 2023-09-05 11:38:23.777 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.153 seconds (success: True)

When I enable the mac tracking, H.A. shows 'Failed setup, will retry' and the mouse hoover text shows 'NoneType' object has no attribute 'replace'. I waited some time, but it remains in error state. As soon as I uncheck the MAC address tracking, h.a. is pleased and everything is working again.

I think the code which looks for the MAC address is getting an empty variable. I think this should ve tested in the code, so it does not go in 'error' mode, but still collects data via the IP. The MAC tracking should be secondary and not break functionality. imho.

Did you see Migration to version xxx successful" on logs?

petretiandrea commented 1 year ago

v2.8.1 should fix issue related to mac address

TeDeVPrime commented 1 year ago

thank you. it is working now. i managed to add the devices. i don't know what you fixed but it finally worked.

fromNL commented 1 year ago

@petretiandrea I did look for "Migration to version xxx successful", sorry. I see no search entry in the H.A. log. My current version: Integration version: | 1.32.1, Frontend version: | 20220906112053 Today I updated hacs, and I changed the [x] checkbox to [on] again, and now it works. All 6 of my P110 energy switches are accepting this. Note: Based on the MAC I did as well tell my wifi-router to use the same IP address over and over again, but now it is working I can remove that and let DHCP do its thing as usual.

fromNL commented 1 year ago

@petretiandrea Sorry .. .. A day later and 3 of the P110 disappeared. The mac tracking disables the switch. Why do I have 3 P110 switches which can be mac tracked, and 3 which do not? They are a different batch, but I upgraded the firmware of all 6 when I used them (they are new, a few weeks old).

fromNL commented 1 year ago

I deleted and added the P110 switches, they do definitely not work with mac tracking. My WiFi router does do mac tracking, and I assigned fixed IP's (in the DHCP range) to the switches. Now I am able to do whatever I want with the switches (energy meters).

brucetony commented 1 year ago

I had to basically remove, update, and reinstall everything to get it to work again. Here are the steps for anyone who needs the help:

petretiandrea commented 1 year ago

There is some issue regarding entity migration to support mac tracking. So my suggestion is to upgrade to 2.8.2, and re-add the device. This will fix any migration problem from 2.7.x to 2.8.x

MarcoEddizzo83 commented 11 months ago

Hi, I get back on this issue just to report another problem regarding the firmware update of Tapo SP P105. More than one week ago I noticed that some of this plugs doesn't been recognized by home assistant even if some else was perfectly working. I have actually plug 8 P105 and 14 P110.

The P105s that works, during the night are out of power (is placed in cascade with a master P110 that switch off during the night).

Checking the p105 "not working" (in home assistant) inside the TAPO APP i'd noticed that they have onboard firwmare version 1.2.1 Build 230804 Rel. 190922.

The p105 that works have onboard firware 1.1.5 Build 230324 Rel. 143956. That's because I'd enable the auto-update of the firmware during the night (03.00-05.00 AM) and the one's that works was switched off during that time.

Of course the updated one's is in grey in home assistant. I tried:

Nothing else to do... Of course the invalid authentication seems to depend to the firmware update... the "old" one still works (I deactivated the auto-firmware-update on all the plugs).

Of course directly on tapo app and with alexa, everything works!

I know that this is an open source and custom integration, and I really appreciate the time spent and the effort dedicated. Accordingly with you time, could you please take a look?

I've some automation with this plug that is not working anymore :(

I would say thank in advance for your eventually answer, kind and consideration.

Please let me know if you need any additional information.

Following the HA VERSION: Home assistant core 2022.11.2 Home assistant oS 10.3 Tapo controller ver.: Stable v2.9.1

petretiandrea commented 11 months ago

Are you using latest version of this integration? If not, update it, otherwise open a new issue by reporting your comment

Hi, I get back on this issue just to report another problem regarding the firmware update of Tapo SP P105. More than one week ago I noticed that some of this plugs doesn't been recognized by home assistant even if some else was perfectly working. I have actually plug 8 P105 and 14 P110.

The P105s that works, during the night are out of power (is placed in cascade with a master P110 that switch off during the night).

Checking the p105 "not working" (in home assistant) inside the TAPO APP i'd noticed that they have onboard firwmare version 1.2.1 Build 230804 Rel. 190922.

The p105 that works have onboard firware 1.1.5 Build 230324 Rel. 143956. That's because I'd enable the auto-update of the firmware during the night (03.00-05.00 AM) and the one's that works was switched off during that time.

Of course the updated one's is in grey in home assistant. I tried:

  • To delect the instance of the single plug over home assistant and re-create. I got "INVALID AUTHENTICATION" red warning, of course using TAPO-CONTROLLER Hacs integration in home assistant. I triple verify the ip, username and password (I have a DHCP RESERVATION on router for this plugs, bind with mac address). The mail address doesn't have CAPITALIZED letters.
  • I tried to delete the single plug from TAPO app, re-register and re-join. They come over with the updated firmware :(

Nothing else to do... Of course the invalid authentication seems to depend to the firmware update... the "old" one still works (I deactivated the auto-firmware-update on all the plugs).

Of course directly on tapo app and with alexa, everything works!

I know that this is an open source and custom integration, and I really appreciate the time spent and the effort dedicated. Accordingly with you time, could you please take a look?

I've some automation with this plug that is not working anymore :(

I would say thank in advance for your eventually answer, kind and consideration.

Please let me know if you need any additional information.

Following the HA VERSION: Home assistant core 2022.11.2 Home assistant oS 10.3 Tapo controller ver.: Stable v2.9.1

Are you using latest version of this integration? If not, update it, otherwise open a new issue by reporting your comment

MarcoEddizzo83 commented 11 months ago

Hi and thank you for your kindly answer. I strongly think I'm Using the Latest updated version. I do attach some screenshoot just to confirm:

WhatsApp Image 2023-10-09 at 10 32 02 WhatsApp Image 2023-10-09 at 10 32 03

So I can proceed to open a new issue?

Waiting your kind confirmation.

Thanks.