Skip to content

InvalidCredentials: "Local hash does not match server hash" #320

Closed
@kaleem-peeroo

Description

@kaleem-peeroo

Hello,

I have several smart plugs (P100). I have successfully gotten this API working on all but 2 devices. Thank you for implementing this library!

Below is my sample code for restarting the P100 plugs:

import asyncio
from tapo import ApiClient
from my_secrets import TAPO_USERNAME, TAPO_PASSWORD

async def restart():
    client = ApiClient(TAPO_USERNAME, TAPO_PASSWORD)

    device = await client.p100("192.168.1.31")

    logger.debug(f"Turning off {self.name} smart plug")
    await device.off()

    logger.debug("Waiting 3 seconds...")
    await asyncio.sleep(3)

    logger.debug(f"Turning on {self.name} smart plug")
    await device.on()

asyncio.run(restart())

And here is the output when executing the code:
Screenshot 2024-12-11 at 14 03 34

Both, the computer executing the code and the smart plug are on the same LAN. I have looked at previous issues for any solutions. I have made sure the email is all lower case. I checked that the email matches the case sensitivity shown on my Tapo app.

What confuses me is how the username and password works for the other devices except for two. Do you know how to resolve this or at least how to debug this?

Any help would be very much appreciated!

Thanks,
Kaleem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions