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

Easier access to device id & key #52

Open
jonathang56 opened this issue Oct 29, 2022 · 7 comments
Open

Easier access to device id & key #52

jonathang56 opened this issue Oct 29, 2022 · 7 comments

Comments

@jonathang56
Copy link

Hi
As a newbie I wasnt so sure about your instructions to get the device links by re-adding the device etc as I operate a mesh router and it was very difficult to get them connected in the first place.
I did a bit of digging and found this link which helped me find the information quite easily on the IoT Tuya platform, so thought it might be good to put it on here for others.

https://linkdhome.com/articles/local-tuya-device-control-in-homekit

I did find that the data has been changed about a bit and after going into the API explorer I had to go to Smart Home Device System, then Device Management and get Device details to get the Local key for the devices.
But once I had them I loaded it into this integration and it found them right away

@make-all
Copy link
Contributor

Does this work with the Goldair branded app? Or do you need to install one of the Tuya branded apps (I have heard plain "Tuya" and "Smart Life" apps also work with this method)?

@jonathang56
Copy link
Author

jonathang56 commented Oct 30, 2022 via email

@make-all
Copy link
Contributor

Its a rebrand, but I think it also has its own device registration space separate from other apps. So linking with the developer portal does not work.

@craSH
Copy link

craSH commented Feb 3, 2023

Hi - I also just struggled with finding the local key via the instructions, but ultimately found that if you setup the IOT account and add your device e.g. via linking the Tuya Smart app, this API debug page can be used to get the device details which includes the localKey value.

From the Tuya Developer account:

  1. Load the API Explorer (Cloud -> API Explorer)
  2. Select "IoT Core" from the first dropdown menu
  3. Navigate to Get device details (Smart Home Device System > Device Management > Get device details)
  4. Finally, enter your device ID obtained from any of the previous methods and submit the form.
  5. A JSON response should be displayed that contains all the device details, including the key local_key which is the value needed.

Screenshot attached showing an example of the above page, since it's still a bit tricky to find when you're not used to their platform.

image

@Gerkie
Copy link

Gerkie commented Jun 10, 2023

Its a rebrand, but I think it also has its own device registration space separate from other apps. So linking with the developer portal does not work.

I can confirm this too - tested by linking an empty tuya app and it worked right away - but goldair app just doesnt.

Did you ever find a workaround?

@make-all
Copy link
Contributor

The only workaround to get local keys from the Goldair branded app is to have a rooted device, and find them on the filesystem yourself.

@Gerkie
Copy link

Gerkie commented Jun 10, 2023

The only workaround to get local keys from the Goldair branded app is to have a rooted device, and find them on the filesystem yourself.

Great. Ill give that a go - might try the old method of doing the traffic capture and see if that still works.

Thanks for the reply.

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