Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/tuyanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-04-07 19:23:25 +0300
committerGitHub <noreply@github.com>2022-04-07 19:23:25 +0300
commit9d6bae6d583365c87638c233f02dd428e0d02a5e (patch)
tree644233956be41d477c1497fe7a5736d68206957d
parent31cfa238818d9fdec3bae4f7437ae8811c19a03e (diff)
Update README.md
Automatic local key refresh
-rw-r--r--README.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index ebd80a3..3e06402 100644
--- a/README.md
+++ b/README.md
@@ -231,6 +231,16 @@ Or just:
```C#
newDps = await device.UpdateDpsAsync(9, 10);
```
+## Automatic local key refresh
+
+You can create `TuyaDevice` object without local key but with API key/secret like this:
+```C#
+var dev = new TuyaDevice(ip: DEVICE_IP, region: API_REGION, accessId: ACCESS_ID, apiSecret: API_SECRET, deviceId: DEVICE_ID);
+```
+Then obtain local key:
+```C#
+await dev.RefreshLocalKeyAsync()
+```
## Credits
* TinyTuya https://github.com/jasonacox/tinytuya by Jason Cox