diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-04-07 19:23:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 19:23:25 +0300 |
commit | 9d6bae6d583365c87638c233f02dd428e0d02a5e (patch) | |
tree | 644233956be41d477c1497fe7a5736d68206957d | |
parent | 31cfa238818d9fdec3bae4f7437ae8811c19a03e (diff) |
Update README.md
Automatic local key refresh
-rw-r--r-- | README.md | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |