diff --git a/docs/SETUP.md b/docs/SETUP.md index 1b9702b..f565daa 100644 --- a/docs/SETUP.md +++ b/docs/SETUP.md @@ -12,7 +12,10 @@ Setup ![record toggle](images/record-toggle.png) -4. Setup Charles' [SSL certificate](https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/) for your phone. +4. Setup Charles' [SSL certificate](https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/) for your phone. If the app throws network errors, you may have to take an additional step to fully trust the Charles SSL certificate: + + `Settings > General > About > Certificate Trust Testings` + 5. Proxy your phone's traffic through Charles (IP is the IP of your computer): ![proxy config](images/proxy-config.png) diff --git a/index.js b/index.js index 1872781..e41ee5d 100644 --- a/index.js +++ b/index.js @@ -238,7 +238,7 @@ TuyaDevice.prototype.set = function (options) { if (options.dps === undefined) { thisRequest.dps = {1: options.set}; } else { - thisRequest.dps[options.dps.toString()] = options.set; + thisRequest.dps = {[options.dps.toString()]: options.set}; } debug('Payload: ');