New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Credentials hash does not work for H100 #878
Comments
If you need only the hash and not the rest of the device config, you could try Looking at the code, the credentials nor the credentials hash are not actually included, but you need to pass it manually:
I cannot recall the reasoning for this, maybe @sdb9696 has some ideas here :-) |
Hi @ngaertner it looks like you might be using the 0.6.2.1 version of the library which does not support the Out of interest why are you trying to get the credential_hashes as opposed to just using the username and password? |
Hi @sdb9696,
I prefer the credentials hash as I dont want to store my TAPO username and password in a script. |
Yeah, it's a good idea to use hashes for storage and we do this in homeassistant, too. The problem arises when we have two (or more) types of hashes. We could solve this either by:
The first may not work that well in practise, as different klap versions did use different way for hashing. It also clutters the environment, may confuse users, and is a bit complicated to extend when and if new ways for hashing appear. @ngaertner Steven meant that you should try this again with the current master branch. FWIW, the code you gave is working for me and prints out the same hash as There is a bug in the condition when passing the hash though, and you are forced to define at least |
I was able to generate an AES credentials-hash for the hub, but only after fixing lots of errors like this:
I think i will anyways need to wait for the next stable release - any date for it? |
I'm not sure of the bug here as I believe it does work to reconstruct the device from the config. Is there an example I can try?
If you provide a
I wouldn't call this a bug at the moment because the
This is not that different from storing the
Not yet but aiming for this month. |
When i control the Tapo Plugs (like P100) i can use KLAP encryption with --credentions-hash , but when i try to access the H100 Hub I have to use AES and --username and --password.
Using credentials-hash gives me:
Raised error: 'utf-8' codec can't decode byte 0xed in position 1: invalid continuation byte
Note:
I used the same credentials hash for the Hub (AES) as I used for the Plug (KLAP) - I already learned that the hashes have to be different, so that is probably related.
My other problem is that I cannot find out the correct credential hash for the hub...
For the Plug i use the following snippet:
But for the H100 this code does not work - result:
The text was updated successfully, but these errors were encountered: