|
| TuyaIRControl (string ip, string localKey, string deviceId, TuyaProtocolVersion protocolVersion=TuyaProtocolVersion.V33, int port=6668, int receiveTimeout=250) |
| Creates a new instance of the TuyaDevice class. More...
|
|
| TuyaIRControl (string ip, TuyaApi.Region region, string accessId, string apiSecret, string deviceId, TuyaProtocolVersion protocolVersion=TuyaProtocolVersion.V33, int port=6668, int receiveTimeout=250) |
| Creates a new instance of the TuyaDevice class. More...
|
|
async Task< string > | GetButtonCodeAsync (int timeout, int retries=2, CancellationToken cancellationToken=default) |
| Learns button code of remote control. More...
|
|
async Task | SendButtonCodeAsync (string buttonCode, int retries=2, int? overrideRecvTimeout=null, CancellationToken cancellationToken=default) |
| Sends button code. More...
|
|
| TuyaDevice (string ip, string localKey, string deviceId, TuyaProtocolVersion protocolVersion=TuyaProtocolVersion.V33, int port=6668, int receiveTimeout=250) |
| Creates a new instance of the TuyaDevice class. More...
|
|
| TuyaDevice (string ip, TuyaApi.Region region, string accessId, string apiSecret, string deviceId, TuyaProtocolVersion protocolVersion=TuyaProtocolVersion.V33, int port=6668, int receiveTimeout=250) |
| Creates a new instance of the TuyaDevice class. More...
|
|
string | FillJson (string json, bool addGwId=true, bool addDevId=true, bool addUid=true, bool addTime=true) |
| Fills JSON string with base fields required by most commands. More...
|
|
byte[] | EncodeRequest (TuyaCommand command, string json) |
| Creates encoded and encrypted payload data from JSON string. More...
|
|
TuyaLocalResponse | DecodeResponse (byte[] data) |
| Parses and decrypts payload data from received bytes. More...
|
|
async Task< TuyaLocalResponse > | SendAsync (TuyaCommand command, string json, int retries=2, int nullRetries=1, int? overrideRecvTimeout=null, CancellationToken cancellationToken=default) |
| Sends JSON string to device and reads response. More...
|
|
async Task< byte[]> | SendAsync (byte[] data, int retries=2, int nullRetries=1, int? overrideRecvTimeout=null, CancellationToken cancellationToken=default) |
| Sends raw data over to device and read response. More...
|
|
async Task< Dictionary< int, object > > | GetDpsAsync (int retries=5, int nullRetries=1, int? overrideRecvTimeout=null, CancellationToken cancellationToken=default) |
| Requests current DPs status. More...
|
|
async Task< Dictionary< int, object > > | SetDpAsync (int dp, object value, int retries=2, int nullRetries=1, int? overrideRecvTimeout=null, bool allowEmptyResponse=false, CancellationToken cancellationToken=default) |
| Sets single DP to specified value. More...
|
|
async Task< Dictionary< int, object > > | SetDpsAsync (Dictionary< int, object > dps, int retries=2, int nullRetries=1, int? overrideRecvTimeout=null, bool allowEmptyResponse=false, CancellationToken cancellationToken=default) |
| Sets DPs to specified value. More...
|
|
async Task< Dictionary< int, object > > | UpdateDpsAsync (IEnumerable< int > dpIds, int retries=5, int nullRetries=1, int? overrideRecvTimeout=null, CancellationToken cancellationToken=default) |
| Update DP values. More...
|
|
async Task | RefreshLocalKeyAsync (bool forceTokenRefresh=false, CancellationToken cancellationToken=default) |
| Get current local key from Tuya Cloud API More...
|
|
void | Dispose () |
| Disposes object. More...
|
|
Tuya virtual IR remote control