diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-07-10 20:38:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-10 20:38:05 +0300 |
commit | 94bf8184d8729dbe237db02f4e74ce594b063b05 (patch) | |
tree | 0447050d1e34b5adbf455e915b208e7a61eaa783 | |
parent | 975de302b42d66c88daa501adb244c9dbf630898 (diff) |
Update README.md
-rw-r--r-- | README.md | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -231,17 +231,6 @@ 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() -``` - ### IR Remote Control Since version 1.0.3 you can control infrared remote controls. There is TuyaIRControl class for it. You can learn button from real remote control using `GetButtonCodeAsync` method (it returns Base64-encoded pulses sequences) and simulate button press using `SendButtonCodeAsync` method. @@ -257,6 +246,17 @@ while (true) } ``` +### 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() +``` + ## Using the Cloud API You can use official [Tuya Cloud API](https://developer.tuya.com/en/docs/cloud/). |