localtuya icon indicating copy to clipboard operation
localtuya copied to clipboard

Using Tuya's new API, tuya-device-sharing

Open MusiCode1 opened this issue 1 year ago • 3 comments

Will this project move to use Tuya's newly published API, the TuyaDeviceSharing project that does not require a developer account to connect?

The official Tuya integration already uses it: https://www.home-assistant.io/integrations/tuya

This is the SDK: https://github.com/tuya/tuya-device-sharing-sdk

The official Tuya integration repo with an explanation of the difference between the connection options: https://github.com/tuya/tuya-smart-life

MusiCode1 avatar Feb 15 '24 09:02 MusiCode1

I believe those SDK still rely on cloud. localtuya controls directly using a localkey. Would be nice if they provided easy access to local key.

Doughboy68 avatar Feb 21 '24 00:02 Doughboy68

Not necessarily needed I think. Thanks to this German post who found a very easy way of gathering the local keys:

  • Go to https://iot.tuya.com/cloud/
  • Select your project (or create one like in some of the tutorials)
  • Select tab “Service API”
  • Select “Smart Home Basic Service” -> Debug
  • Select “Smart Home Device Management” -> “Get Device Details” on the left
  • Enter the Id of the device you need the key for
  • Hit “Submit Request”

Read the local key (and the mappings) on the right.

pdsccode avatar Feb 25 '24 03:02 pdsccode

I just tried the mentioned method to retrieve the local key. Unfortunately it require a valid subscription to launch...

SoniaMalki avatar Mar 17 '24 03:03 SoniaMalki