petretiandrea / home-assistant-tapo-p100

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

First P110 connected successfully, but cannot add any additional P110's? #629

Open Ady1892 opened 9 months ago

Ady1892 commented 9 months ago

I am pretty new to Home Assistant / HACS so please take it easy with me.

I am running HA on Intel NUC with HA OS, versions as follows:

My Tapo smart plus are all P110's:

All of my P110's have static IP addressed and are setup and working in the Tapo app.

Following the instructions I successfully installed the TP-Link Tapo custom integration and was able to setup my first Tapo P110. I was able to turn the plug on/off and monitor energy usage.

Once I was happy I then tried to add the rest of my P110's by going into the custom integration and clicking add device. Enter the IP address of next P110 and credentials again. But I am getting a 'Failed to connect' error message.

I have tried a few of my P110's but getting the same error message?

Am I trying to add the remaining P110's correctly?

Any advice would be hugely appreciated.

juahan commented 9 months ago

I think this is connected to the other lately posted issues. Maybe the firmware 1.30 making some changes on how the device communicates.

n-d78 commented 9 months ago

Same Problem. The first P110 works fine. The next one don't. Tried all of my 6 P110. 5 are working, one don't. Also my two P100 and the L530 don't work. All of them have the newest updates.

Tapo: P110 --> 1.3.0 P100 --> 1.2.1 L530 --> 1.1.0

HA: Core 2023.11.3 Supervisor 2023.11.6 Operating System 11.1 Frontend 20231030.2

ianfretwell commented 9 months ago

In my case - 2x P110's on latest firmware 1.3.0. First one added fine, 2nd one added ok but the control is missing - so no on/off!

Removed and re-added it but it's just the same.

Edit:- The control appeared after a period of time. No restart of HA, it just appeared!

bazmattaz commented 9 months ago

i have 4 P110's and none are working. I used to have 2 working but I had to reset my router and now I cant add those ones back into HA. I hate these plugs. I'm so close to switching over to Kasa plugs

Dyrkon commented 8 months ago

This is most likely caused by new firmware. I have updated the firmware on my first p110 and can't add it to HA. I have skipped the update on the second one and I can add that one just fine.

bazmattaz commented 8 months ago

What firmware version is working for you

On Mon, Dec 25, 2023 at 13:41, Matěj Mudra @.***(mailto:On Mon, Dec 25, 2023 at 13:41, Matěj Mudra < wrote:

This is most likely caused by new firmware. I have updated the firmware on my first p110 and can't add it to HA. I have skipped the update on the second one and I can add that one just fine.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

n-d78 commented 8 months ago

This is most likely caused by new firmware. I have updated the firmware on my first p110 and can't add it to HA. I have skipped the update on the second one and I can add that one just fine.

For me that makes no sense. I have 6 P110. All with the newest update. 5 are working in HA, one not. Also my lightbulb L530 and two P100 don't work. Can't imagine, why it should be the Tapo P110 fw.

Dyrkon commented 8 months ago

This is most likely caused by new firmware. I have updated the firmware on my first p110 and can't add it to HA. I have skipped the update on the second one and I can add that one just fine.

For me that makes no sense. I have 6 P110. All with the newest update. 5 are working in HA, one not. Also my lightbulb L530 and two P100 don't work. Can't imagine, why it should be the Tapo P110 fw.

It was my theory, but you have way more tapo devices. I have one p100 running on 1.4.10 which works. Then the working p110 has 1.2.3 fw and the one I can't integrate is running on 1.3.0

EDIT:

I have updated HA and the tapo integration and everything is working now.

n-d78 commented 8 months ago

EDIT:

I have updated HA and the tapo integration and everything is working now.

Congrats! I also have the newest HA version. But still no changes. Don't know why.

bazmattaz commented 8 months ago

ok so I got this working. I usually keep my home assistant up to date so that wasn't the reason.

I went into HACS on the side menu and updated the HACS store. I then restarted. I found the TAPO integration and updated that and restarted.

Now everything works. I can add a P110 with firmware 1.30.

Hope this helps someone

jajera commented 8 months ago

i have 4 P110 with latest firmware and tapo controller integration software, have no issues connecting.

its easy to ensure the devices gets the latest firmware. and normally homeassistant should handle updating the tapo controller integration software codes if an update is triggered.

otherwise, worth checking the two these paths contains the latest.

  1. /usr/local/lib/python3.11/site-packages/plugp100
  2. /config/custom_components/tapo

and they originated from these repositories.

  1. https://github.com/petretiandrea/plugp100
  2. https://github.com/petretiandrea/home-assistant-tapo-p100
ziriuz84 commented 8 months ago

I have the same issue with P125M, 2 are okay but one is unable to connect. I have the 2023.12.3 version of HA and the 2.12.2 version of the plugin

ziriuz84 commented 8 months ago

I have the same issue with P125M, 2 are okay but one is unable to connect. I have the 2023.12.3 version of HA and the 2.12.2 version of the plugin

Ok, I solved it. I must add my plugs with the + button and not with the autodiscovery of the Tapo App.

petretiandrea commented 8 months ago

Try to run this and report here the output

import os

from plugp100.api.light_effect_preset import LightEffectPreset
from plugp100.api.tapo_client import TapoClient
from plugp100.common.credentials import AuthCredential
from plugp100.discovery.arp_lookup import ArpLookup
from plugp100.discovery.tapo_discovery import TapoDiscovery

async def main():
    # create generic tapo api

    credentials = AuthCredential("<tapo_email>", "<tapo_password>")
    client = TapoClient.create(credentials, "<tapo_device_ip>")

    print(await client.get_device_info())
    print(await client.get_component_negotiation())

if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    loop.run_until_complete(main())
    loop.run_until_complete(asyncio.sleep(0.1))
    loop.close()