Skip to content
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

Wizard returns a strange key (encoded ?) #160

Open
AlainKaim opened this issue Jun 13, 2023 · 8 comments
Open

Wizard returns a strange key (encoded ?) #160

AlainKaim opened this issue Jun 13, 2023 · 8 comments

Comments

@AlainKaim
Copy link

Hello
From time to time, one of my device is disconnected, so I have to connect it again with the Tuya App. And then, I use tuya-cli wizard to get the new key and modify my homebridge config file.
This is usually a smooth process, but today, after successfully reconnecting a blind to Tuya app( and it works through it), the wizard returned a strange key :
{
name: 'Volet salon petit',
id: 'XXXXXXX',
key: "1C<S<'HIBk*o_{eY"
},

The name and id fields are ok. And the full informations are also ok for my other devices.
It is just this key which is odd, and of course unusable in homebridge.

Any help will be appreciated :)

@ferni7
Copy link

ferni7 commented Jun 18, 2023

I've just came here to report the same thing, device disconnected had to re-add it with tuya app and now this one device has this weird key which doesn't work..

  {
    name: 'Stairs',
    id: 'xxxxxx',
    key: 'nKwYCKpsudKQn^?F'
  },

@caco3
Copy link

caco3 commented Jun 21, 2023

Note that it at least is consistent with what the Tuya IoT REST API provides:

https://eu.iot.tuya.com/cloud/explorer?groupId=group-home&interfaceId=470224448454738 > "Device Management" > "Query Device Details in Bulk" returns:

{
  "result": [
    {
      [..]
      "local_key": "V+IuH~QWR`)v6A{r",
      [..]
    }
  ],
  "success": true,
  "t": 1687381074266,
  "tid": "4acd3a94107611eea68636790d793901"
}

And tuya-cli wizard returned

  {
    name: 'Wi-Fi hub',
    id: 'bf641c545b9e1920da14vi',
    key: 'V+IuH~QWR`)v6A{r'
  },

@murtazabasrai
Copy link

I have having the same issue after re-adding the device to Tuya App.
Does anyone know how to get the correct key?

@caco3
Copy link

caco3 commented Jul 4, 2023

Are you sure it is now encrypted?
How did the yey look like before?
I use exactly the key that gets returned and it works fine.

@murtazabasrai
Copy link

Hi, I tried and the returned key is correct. It's just that the key format has changed. Earlier it used to be in HEX. Now it's having symbols.

The issue of new key not working was in the homebridge Tuya plug-in that I was using which was validating the key as per the old format. I have found the fix to that so this new key format is not an issue.
Thanks!

@ferni7
Copy link

ferni7 commented Jul 4, 2023 via email

@murtazabasrai
Copy link

Yep that's the one I'm using and here's the details of the fix that resolved the issue:
iRayanKhan/homebridge-tuya#409 (comment)

@AlainKaim
Copy link
Author

AlainKaim commented Jul 5, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants