Skip to content

Requests: connect user sms

Éric Massé edited this page Jan 30, 2018 · 1 revision

connect user sms


#01: tuya.m.user.mobile.sendcode

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.user.mobile.sendcode&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=ecbde140a503019fbb8791c55889b694&lang=en&requestId=e311ed65-19c5-4579-9dcc-65e171deae35&time=1517228404&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.user.mobile.sendcode",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "ecbde140a503019fbb8791c55889b694",
  "lang": "en",
  "requestId": "e311ed65-19c5-4579-9dcc-65e171deae35",
  "time": "1517228404",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 76
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22countryCode%22%3A%221%22%2C%22mobile%22%3A%221235556789%22%7D

I applied a URL_DECODE on postData ...

{
  "countryCode": "1",
  "mobile": "1235556789"
}

RESPONSE

Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:20:44 GMT
Server: Apache-Coyote/1.1
Content-Length: 63
Connection: keep-alive

RESPONSE DATA

{
  "result": true,
  "t": 1517228445319,
  "success": true,
  "status": "ok"
}

#02: tuya.m.user.code.login

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.user.code.login&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=649f54ab74b0de43550aba0a125623dc&lang=en&requestId=3a59fd4b-78d2-42f5-bdbe-338c8ed0b0bc&time=1517228431&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.user.code.login",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "649f54ab74b0de43550aba0a125623dc",
  "lang": "en",
  "requestId": "3a59fd4b-78d2-42f5-bdbe-338c8ed0b0bc",
  "time": "1517228431",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 104
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22code%22%3A%22125005%22%2C%22countryCode%22%3A%221%22%2C%22mobile%22%3A%221235556789%22%7D

I applied a URL_DECODE on postData ...

{
  "code": "125005",
  "countryCode": "1",
  "mobile": "1235556789"
}

RESPONSE

Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:10 GMT
Server: Apache-Coyote/1.1
Content-Length: 638
Connection: keep-alive

RESPONSE DATA

{
  "result": {
    "timezone": "",
    "sex": 0,
    "mobile": "1-1235556789",
    "headPic": "",
    "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
    "ecode": "z6z6z945519zaC42",
    "uid": "fz1516934610837YmStU",
    "domain": {
      "gwApiUrl": "http://a.gw.tuyaus.com/gw.json",
      "gwMqttUrl": "mq.gw.tuyaus.com",
      "mobileApiUrl": "https://a1.tuyaus.com",
      "mobileMqttUrl": "mq.mb.tuyaus.com",
      "pxApiUrl": "https://px1.tuyaus.com",
      "regionCode": "AZ"
    },
    "nickname": "",
    "phoneCode": "1",
    "timezoneId": "America/Toronto",
    "userType": 1,
    "partnerIdentity": "p1000018",
    "email": "",
    "username": "1-1235556789",
    "snsNickname": "",
    "improveCompanyInfo": false
  },
  "t": 1517228471169,
  "success": true,
  "status": "ok"
}

#03: tuya.m.api.batch.invoke

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.api.batch.invoke&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=bb251f20f175ca6055ea3431f37b672c&lang=en&requestId=b3ded6e3-1e06-456b-aea5-b1e8be41c81c&time=1517228432&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.api.batch.invoke",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "bb251f20f175ca6055ea3431f37b672c",
  "lang": "en",
  "requestId": "b3ded6e3-1e06-456b-aea5-b1e8be41c81c",
  "time": "1517228432",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 624
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22apis%22%3A%5B%7B%22a%22%3A%22tuya.m.device.ref.info.my.list%22%2C%22sign%22%3A%228c9213c8f382f3462867641543a67c79%22%2C%22t%22%3A1517228432%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.device.my.list%22%2C%22sign%22%3A%22a64a2384d02cc3451b2b1499c3fe0abc%22%2C%22t%22%3A1517228432%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.mesh.my.list%22%2C%22sign%22%3A%22ac11c173825d6fddf259b1294a44ff01%22%2C%22t%22%3A1517228432%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.device.group.my.list%22%2C%22sign%22%3A%2288e15d99057026c06d9720e56b9d1d47%22%2C%22t%22%3A1517228432%2C%22v%22%3A%221.0%22%7D%5D%7D

I applied a URL_DECODE on postData ...

{
  "apis": [
    {
      "a": "tuya.m.device.ref.info.my.list",
      "sign": "8c9213c8f382f3462867641543a67c79",
      "t": 1517228432,
      "v": "1.0"
    },
    {
      "a": "tuya.m.device.my.list",
      "sign": "a64a2384d02cc3451b2b1499c3fe0abc",
      "t": 1517228432,
      "v": "1.0"
    },
    {
      "a": "tuya.m.mesh.my.list",
      "sign": "ac11c173825d6fddf259b1294a44ff01",
      "t": 1517228432,
      "v": "1.0"
    },
    {
      "a": "tuya.m.device.group.my.list",
      "sign": "88e15d99057026c06d9720e56b9d1d47",
      "t": 1517228432,
      "v": "1.0"
    }
  ]
}

RESPONSE

Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:11 GMT
Server: Apache-Coyote/1.1
Content-Length: 5089
Connection: keep-alive

RESPONSE DATA

{
  "result": [
    {
      "result": [
        {
          "schemaInfo": {
            "schema": "[{\"mode\":\"rw\",\"code\":\"switch_1\",\"name\":\"开关\",\"property\":{\"type\":\"bool\"},\"iconname\":\"icon-dp_power2\",\"id\":1,\"type\":\"obj\",\"desc\":\"\"},{\"mode\":\"rw\",\"code\":\"countdown\",\"name\":\"倒计时\",\"property\":{\"unit\":\"秒\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1,\"type\":\"value\"},\"iconname\":\"icon-dp_time2\",\"id\":11,\"type\":\"obj\",\"desc\":\"可根据产品实际倒计时功能修改。\"},{\"mode\":\"rw\",\"code\":\"randomTime\",\"name\":\"随机定时\",\"property\":{\"type\":\"string\",\"maxlen\":255},\"id\":101,\"type\":\"obj\",\"desc\":\"每6个字节代表 #1开关/#2星期/#3#4起始时间(min)/#5#6结束时间(min),最大42组\"},{\"mode\":\"rw\",\"code\":\"cycleTime\",\"name\":\"循环定时\",\"property\":{\"type\":\"string\",\"maxlen\":255},\"id\":102,\"type\":\"obj\",\"desc\":\"每10个字节代表 #1开关/#2星期/#3#4起始时间(min)/#5#6结束时间(min)/#7#8开启时间(min)/#9#10关闭时间(min)\\n星期:00(单次)01(周日)02(周一)04(周二)08(周三)10(周四)20(周五)40(周六)\"},{\"mode\":\"rw\",\"code\":\"normalTime\",\"name\":\"普通定时\",\"property\":{\"type\":\"string\",\"maxlen\":255},\"id\":103,\"type\":\"obj\",\"desc\":\"每6个字节代表 #1开关/#2星期/#3#4开启时间(min)/#5#6关闭时间(min),最大42组\"}]",
            "schemaExt": "[]"
          },
          "capability": 1,
          "uiInfo": {
            "phase": "release",
            "rnFind": true,
            "ui": "00000001uc_0.1.2",
            "id": 433338,
            "type": "RN"
          },
          "panelConfig": {
            "bic": [
              {
                "code": "timer",
                "selected": true
              },
              {
                "code": "jump_url",
                "selected": false
              }
            ]
          },
          "shortcut": {
            "quickOpDps": [
              1
            ],
            "faultDps": [],
            "displayDps": [
              1
            ],
            "switchDp": 1,
            "displayMsgs": {
              "quickop_dp_switch_1": "Switch",
              "quickop_dp_switch_1_on": "ON",
              "dp_switch_1_on": "ON",
              "dp_switch_1_off": "OFF",
              "quickop_dp_switch_1_off": "OFF",
              "dp_switch_1": "Switch"
            }
          },
          "i18nTime": 1509939182376,
          "id": "4PxSnRXcfvqrIi11",
          "attribute": 2944,
          "category": "cz",
          "supportGroup": true,
          "meshCategory": ""
        }
      ],
      "a": "tuya.m.device.ref.info.my.list",
      "t": 1517228472775,
      "success": true,
      "v": "1.0",
      "status": "ok"
    },
    {
      "result": [
        {
          "devId": "02200391ecfabc8af177",
          "dpMaxTime": 1517196514682,
          "virtual": false,
          "productId": "4PxSnRXcfvqrIi11",
          "dps": {
            "11": 0,
            "1": true,
            "101": "QVA=",
            "102": "QVA=",
            "103": "QVA="
          },
          "activeTime": 1517191924,
          "ip": "42.42.42.42",
          "lon": "-42.427927",
          "moduleMap": {
            "wifi": {
              "bv": "5.07",
              "cdv": "",
              "pv": "2.1",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            },
            "mcu": {
              "cdv": "",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            }
          },
          "uuid": "02200391ecfabc8af177",
          "name": "Switch 1 (kozy) ",
          "isShare": false,
          "timezoneId": "America/Toronto",
          "iconUrl": "https://images.tuyaus.com/smart/icon/1498529014_0.png",
          "lat": "42.4231103",
          "runtimeEnv": "prod",
          "localKey": "8fe570e3111f3711"
        },
        {
          "devId": "02200391ecfabc8180cc",
          "dpMaxTime": 1517170792569,
          "virtual": false,
          "productId": "4PxSnRXcfvqrIi11",
          "dps": {
            "11": 0,
            "1": true,
            "101": "QVA=",
            "102": "QVA=",
            "103": "QVA="
          },
          "activeTime": 1517170787,
          "ip": "42.42.42.42",
          "lon": "-42.427927",
          "moduleMap": {
            "wifi": {
              "bv": "5.07",
              "cdv": "",
              "pv": "2.1",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            },
            "mcu": {
              "cdv": "",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            }
          },
          "uuid": "02200391ecfabc8180cc",
          "name": "Stalky sw2",
          "isShare": false,
          "timezoneId": "America/Toronto",
          "iconUrl": "https://images.tuyaus.com/smart/icon/1498529014_0.png",
          "lat": "42.4231103",
          "runtimeEnv": "prod",
          "localKey": "15f80f9621483537"
        },
        {
          "devId": "02200391ecfabc8fa247",
          "dpMaxTime": 1517022471865,
          "virtual": false,
          "productId": "4PxSnRXcfvqrIi11",
          "dps": {
            "11": 0,
            "1": true,
            "101": "AP",
            "102": "AP",
            "103": "AP"
          },
          "activeTime": 1517022356,
          "ip": "42.42.42.42",
          "lon": "-42.427927",
          "moduleMap": {
            "wifi": {
              "bv": "5.07",
              "cdv": "",
              "pv": "2.1",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            },
            "mcu": {
              "cdv": "",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            }
          },
          "uuid": "02200391ecfabc8fa247",
          "name": "Snappy sw4",
          "isShare": false,
          "timezoneId": "America/Toronto",
          "iconUrl": "https://images.tuyaus.com/smart/icon/1498529014_0.png",
          "lat": "42.4231103",
          "runtimeEnv": "prod",
          "localKey": "53ab3e3c48e5a28f"
        },
        {
          "devId": "01200885ecfabc802c01",
          "dpMaxTime": 1517022406759,
          "virtual": false,
          "productId": "4PxSnRXcfvqrIi11",
          "dps": {
            "11": 0,
            "1": true,
            "101": "QVA=",
            "102": "QVA=",
            "103": "QVA="
          },
          "activeTime": 1517022280,
          "ip": "42.42.42.42",
          "lon": "-42.427927",
          "moduleMap": {
            "wifi": {
              "bv": "5.07",
              "cdv": "",
              "pv": "2.1",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            },
            "mcu": {
              "cdv": "",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            }
          },
          "uuid": "01200885ecfabc802c01",
          "name": "Olaf sw3",
          "isShare": false,
          "timezoneId": "America/Toronto",
          "iconUrl": "https://images.tuyaus.com/smart/icon/1498529014_0.png",
          "lat": "42.4231103",
          "runtimeEnv": "prod",
          "localKey": "cfa1fd901557fe8a"
        }
      ],
      "a": "tuya.m.device.my.list",
      "t": 1517228472758,
      "success": true,
      "v": "1.0",
      "status": "ok"
    },
    {
      "result": [
        {
          "uid": "fz1516934610837YmStU",
          "password": "a1944d364b2149b2",
          "code": "tymesh1517015922",
          "pv": "2.1",
          "name": "tymesh1517015922",
          "share": false,
          "meshId": "meebb921f5a09f385811fx",
          "localKey": "e5b87e7b1c5a9281"
        }
      ],
      "a": "tuya.m.mesh.my.list",
      "t": 1517228472753,
      "success": true,
      "v": "1.0",
      "status": "ok"
    },
    {
      "result": [],
      "a": "tuya.m.device.group.my.list",
      "t": 1517228472752,
      "success": true,
      "v": "1.0",
      "status": "ok"
    }
  ],
  "t": 1517228472775,
  "success": true,
  "status": "ok"
}

#04: tuya.p.weather.city.info.aggregate

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.p.weather.city.info.aggregate&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=c5756db8e74d3db89ef1f2602a0eac32&lang=en&requestId=e8d15df1-b342-486c-96d1-05cbaee3fd9e&time=1517228437&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.p.weather.city.info.aggregate",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "c5756db8e74d3db89ef1f2602a0eac32",
  "lang": "en",
  "requestId": "e8d15df1-b342-486c-96d1-05cbaee3fd9e",
  "time": "1517228437",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA


RESPONSE

HTTP/1.1 200 OK
Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:17 GMT
Server: Apache-Coyote/1.1
Content-Length: 112
Connection: keep-alive

RESPONSE DATA

{
  "result": {
    "condition": "Clear",
    "temp": "-14.22",
    "city": "Bikini Bottom"
  },
  "t": 1517228478041,
  "success": true,
  "status": "ok"
}

#05: tuya.m.device.sub.list

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.device.sub.list&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=1e3041a541ba3c031d2a20293bb1cd2b&lang=en&requestId=88bdfa9d-0f93-4698-8b95-450f627b13e2&time=1517228437&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.device.sub.list",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "1e3041a541ba3c031d2a20293bb1cd2b",
  "lang": "en",
  "requestId": "88bdfa9d-0f93-4698-8b95-450f627b13e2",
  "time": "1517228437",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 58
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22meshId%22%3A%22meebb921f5a09f385811fx%22%7D

I applied a URL_DECODE on postData ...

{
  "meshId": "meebb921f5a09f385811fx"
}

RESPONSE

Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:17 GMT
Server: Apache-Coyote/1.1
Content-Length: 61
Connection: keep-alive

RESPONSE DATA

{
  "result": [],
  "t": 1517228478019,
  "success": true,
  "status": "ok"
}

#06: tuya.m.linkage.rule.query

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.linkage.rule.query&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=3.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=98af0cd020db7b5843fc962872b93c49&lang=en&requestId=1c58051f-fe93-4abe-b3b6-760757cd481d&time=1517228438&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.linkage.rule.query",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "3.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "98af0cd020db7b5843fc962872b93c49",
  "lang": "en",
  "requestId": "1c58051f-fe93-4abe-b3b6-760757cd481d",
  "time": "1517228438",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA


RESPONSE

HTTP/1.1 200 OK
Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:17 GMT
Server: Apache-Coyote/1.1
Content-Length: 1080
Connection: keep-alive

RESPONSE DATA

{
  "result": [
    {
      "code": "get_home",
      "displayIcon": "https://images.tuyaus.com/smart/rule/ty_index_get_home@2x.png",
      "subTitle": "Suggest to turn on lamp, air conditioner, air purifier",
      "name": "Back home",
      "editIcon": "https://images.tuyaus.com/smart/rule/ty_scene_get_home@2x.png"
    },
    {
      "code": "leave_home",
      "displayIcon": "https://images.tuyaus.com/smart/rule/ty_index_leave_home@2x.png",
      "subTitle": "Suggest to turn off lamp, air conditioner",
      "name": "Leave home",
      "editIcon": "https://images.tuyaus.com/smart/rule/ty_scene_leave_home@2x.png"
    },
    {
      "code": "get_up",
      "displayIcon": "https://images.tuyaus.com/smart/rule/ty_index_get_up@2x.png",
      "subTitle": "Suggest to set up wake-up light and your favorite music",
      "name": "Sunrise",
      "editIcon": "https://images.tuyaus.com/smart/rule/ty_scene_get_up@2x.png"
    },
    {
      "code": "rest",
      "displayIcon": "https://images.tuyaus.com/smart/rule/ty_index_rest@2x.png",
      "subTitle": "Suggest to dim the light and set up sleep mode for devices",
      "name": "Good night",
      "editIcon": "https://images.tuyaus.com/smart/rule/ty_scene_rest@2x.png"
    }
  ],
  "t": 1517228478319,
  "success": true,
  "status": "ok"
}

#07: b.m.device.register

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=b.m.device.register&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=3.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=5d918faaa24a93b7dd9355ec08539f71&lang=en&requestId=149b2dc9-40b3-42ee-9150-f74400fda0cc&time=1517228439&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "b.m.device.register",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "3.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "5d918faaa24a93b7dd9355ec08539f71",
  "lang": "en",
  "requestId": "149b2dc9-40b3-42ee-9150-f74400fda0cc",
  "time": "1517228439",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 317
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22isEnglish%22%3A0%2C%22model%22%3A%22Galaxy%20Nexus%22%2C%22pushProvider%22%3A%22gcm%22%2C%22pushToken%22%3A%22cJgWIR4xwGs%3AAPA91bFFrzOFPKsgZ2Yh6cpNMLpHpPCUACzMR2DJJFUWG5Y8H2QYv_2kR0Eo9rBvc78kxsESe5-N8pbDFJh5dCjm0P4WufhA_BA-aDWnZSjQrh-0lkEUSvrA_uXHnrnfFQ87NZZD6wL7%22%2C%22pushVersion%22%3A%221.0%22%7D

I applied a URL_DECODE on postData ...

{
  "isEnglish": 0,
  "model": "Galaxy Nexus",
  "pushProvider": "gcm",
  "pushToken": "cJgWIR4xwGs:APA91bFFrzOFPKsgZ2Yh6cpNMLpHpPCUACzMR2DJJFUWG5Y8H2QYv_2kR0Eo9rBvc78kxsESe5-N8pbDFJh5dCjm0P4WufhA_BA-aDWnZSjQrh-0lkEUSvrA_uXHnrnfFQ87NZZD6wL7",
  "pushVersion": "1.0"
}

RESPONSE

Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:19 GMT
Server: Apache-Coyote/1.1
Content-Length: 94
Connection: keep-alive

RESPONSE DATA

{
  "result": {
    "objectId": "A6G46P7Jqd453e84gppB"
  },
  "t": 1517228479736,
  "success": true,
  "status": "ok"
}

#08: tuya.m.device.relation.entity.list

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.device.relation.entity.list&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=5d4a53445a81bac71d758ec4977f6fa8&lang=en&requestId=7df199ed-776f-474e-bc09-810909a10571&time=1517228440&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.device.relation.entity.list",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "5d4a53445a81bac71d758ec4977f6fa8",
  "lang": "en",
  "requestId": "7df199ed-776f-474e-bc09-810909a10571",
  "time": "1517228440",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 83
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22parentId%22%3A%22meebb921f5a09f385811fx%22%2C%22parentType%22%3A3%7D

I applied a URL_DECODE on postData ...

{
  "parentId": "meebb921f5a09f385811fx",
  "parentType": 3
}

RESPONSE

Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:19 GMT
Server: Apache-Coyote/1.1
Content-Length: 61
Connection: keep-alive

RESPONSE DATA

{
  "result": {},
  "t": 1517228480058,
  "success": true,
  "status": "ok"
}

#09: tuya.m.msg.maxtime

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.msg.maxtime&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=d52cb1d30791d1e57fd021008b0378be&lang=en&requestId=244e5d59-4727-4600-8d6a-85f8bc4bccb8&time=1517228440&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.msg.maxtime",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "d52cb1d30791d1e57fd021008b0378be",
  "lang": "en",
  "requestId": "244e5d59-4727-4600-8d6a-85f8bc4bccb8",
  "time": "1517228440",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA


RESPONSE

HTTP/1.1 200 OK
Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:19 GMT
Server: Apache-Coyote/1.1
Content-Length: 60
Connection: keep-alive

RESPONSE DATA

{
  "result": 0,
  "t": 1517228480133,
  "success": true,
  "status": "ok"
}

#10: tuya.m.api.batch.invoke

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.api.batch.invoke&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=71a81de7eb2e2d58aa486ade94fdb364&lang=en&requestId=ad881b36-4308-40a9-8dd7-fb54b04a1517&time=1517228440&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.api.batch.invoke",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "71a81de7eb2e2d58aa486ade94fdb364",
  "lang": "en",
  "requestId": "ad881b36-4308-40a9-8dd7-fb54b04a1517",
  "time": "1517228440",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 624
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22apis%22%3A%5B%7B%22a%22%3A%22tuya.m.device.ref.info.my.list%22%2C%22sign%22%3A%22d244ffaa46b3560835ae8832a2863cc0%22%2C%22t%22%3A1517228440%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.device.my.list%22%2C%22sign%22%3A%22eed7266284ba6ef7889767a073e24d66%22%2C%22t%22%3A1517228440%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.mesh.my.list%22%2C%22sign%22%3A%228b17a0a2fecd31df07e26c3eebf1cb50%22%2C%22t%22%3A1517228440%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.device.group.my.list%22%2C%22sign%22%3A%220a93fcdfff23dff75e84e753a66ef1c6%22%2C%22t%22%3A1517228440%2C%22v%22%3A%221.0%22%7D%5D%7D

I applied a URL_DECODE on postData ...

{
  "apis": [
    {
      "a": "tuya.m.device.ref.info.my.list",
      "sign": "d244ffaa46b3560835ae8832a2863cc0",
      "t": 1517228440,
      "v": "1.0"
    },
    {
      "a": "tuya.m.device.my.list",
      "sign": "eed7266284ba6ef7889767a073e24d66",
      "t": 1517228440,
      "v": "1.0"
    },
    {
      "a": "tuya.m.mesh.my.list",
      "sign": "8b17a0a2fecd31df07e26c3eebf1cb50",
      "t": 1517228440,
      "v": "1.0"
    },
    {
      "a": "tuya.m.device.group.my.list",
      "sign": "0a93fcdfff23dff75e84e753a66ef1c6",
      "t": 1517228440,
      "v": "1.0"
    }
  ]
}

RESPONSE

Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:19 GMT
Server: Apache-Coyote/1.1
Content-Length: 5089
Connection: keep-alive

RESPONSE DATA

{
  "result": [
    {
      "result": [
        {
          "schemaInfo": {
            "schema": "[{\"mode\":\"rw\",\"code\":\"switch_1\",\"name\":\"开关\",\"property\":{\"type\":\"bool\"},\"iconname\":\"icon-dp_power2\",\"id\":1,\"type\":\"obj\",\"desc\":\"\"},{\"mode\":\"rw\",\"code\":\"countdown\",\"name\":\"倒计时\",\"property\":{\"unit\":\"秒\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1,\"type\":\"value\"},\"iconname\":\"icon-dp_time2\",\"id\":11,\"type\":\"obj\",\"desc\":\"可根据产品实际倒计时功能修改。\"},{\"mode\":\"rw\",\"code\":\"randomTime\",\"name\":\"随机定时\",\"property\":{\"type\":\"string\",\"maxlen\":255},\"id\":101,\"type\":\"obj\",\"desc\":\"每6个字节代表 #1开关/#2星期/#3#4起始时间(min)/#5#6结束时间(min),最大42组\"},{\"mode\":\"rw\",\"code\":\"cycleTime\",\"name\":\"循环定时\",\"property\":{\"type\":\"string\",\"maxlen\":255},\"id\":102,\"type\":\"obj\",\"desc\":\"每10个字节代表 #1开关/#2星期/#3#4起始时间(min)/#5#6结束时间(min)/#7#8开启时间(min)/#9#10关闭时间(min)\\n星期:00(单次)01(周日)02(周一)04(周二)08(周三)10(周四)20(周五)40(周六)\"},{\"mode\":\"rw\",\"code\":\"normalTime\",\"name\":\"普通定时\",\"property\":{\"type\":\"string\",\"maxlen\":255},\"id\":103,\"type\":\"obj\",\"desc\":\"每6个字节代表 #1开关/#2星期/#3#4开启时间(min)/#5#6关闭时间(min),最大42组\"}]",
            "schemaExt": "[]"
          },
          "capability": 1,
          "uiInfo": {
            "phase": "release",
            "rnFind": true,
            "ui": "00000001uc_0.1.2",
            "id": 433338,
            "type": "RN"
          },
          "panelConfig": {
            "bic": [
              {
                "code": "timer",
                "selected": true
              },
              {
                "code": "jump_url",
                "selected": false
              }
            ]
          },
          "shortcut": {
            "quickOpDps": [
              1
            ],
            "faultDps": [],
            "displayDps": [
              1
            ],
            "switchDp": 1,
            "displayMsgs": {
              "quickop_dp_switch_1": "Switch",
              "quickop_dp_switch_1_on": "ON",
              "dp_switch_1_on": "ON",
              "dp_switch_1_off": "OFF",
              "quickop_dp_switch_1_off": "OFF",
              "dp_switch_1": "Switch"
            }
          },
          "i18nTime": 1509939182376,
          "id": "4PxSnRXcfvqrIi11",
          "attribute": 2944,
          "category": "cz",
          "supportGroup": true,
          "meshCategory": ""
        }
      ],
      "a": "tuya.m.device.ref.info.my.list",
      "t": 1517228480330,
      "success": true,
      "v": "1.0",
      "status": "ok"
    },
    {
      "result": [
        {
          "devId": "02200391ecfabc8af177",
          "dpMaxTime": 1517196514682,
          "virtual": false,
          "productId": "4PxSnRXcfvqrIi11",
          "dps": {
            "11": 0,
            "1": true,
            "101": "QVA=",
            "102": "QVA=",
            "103": "QVA="
          },
          "activeTime": 1517191924,
          "ip": "42.42.42.42",
          "lon": "-42.427927",
          "moduleMap": {
            "wifi": {
              "bv": "5.07",
              "cdv": "",
              "pv": "2.1",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            },
            "mcu": {
              "cdv": "",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            }
          },
          "uuid": "02200391ecfabc8af177",
          "name": "Switch 1 (kozy) ",
          "isShare": false,
          "timezoneId": "America/Toronto",
          "iconUrl": "https://images.tuyaus.com/smart/icon/1498529014_0.png",
          "lat": "42.4231103",
          "runtimeEnv": "prod",
          "localKey": "8fe570e3111f3711"
        },
        {
          "devId": "02200391ecfabc8180cc",
          "dpMaxTime": 1517170792569,
          "virtual": false,
          "productId": "4PxSnRXcfvqrIi11",
          "dps": {
            "11": 0,
            "1": true,
            "101": "QVA=",
            "102": "QVA=",
            "103": "QVA="
          },
          "activeTime": 1517170787,
          "ip": "42.42.42.42",
          "lon": "-42.427927",
          "moduleMap": {
            "wifi": {
              "bv": "5.07",
              "cdv": "",
              "pv": "2.1",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            },
            "mcu": {
              "cdv": "",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            }
          },
          "uuid": "02200391ecfabc8180cc",
          "name": "Stalky sw2",
          "isShare": false,
          "timezoneId": "America/Toronto",
          "iconUrl": "https://images.tuyaus.com/smart/icon/1498529014_0.png",
          "lat": "42.4231103",
          "runtimeEnv": "prod",
          "localKey": "15f80f9621483537"
        },
        {
          "devId": "02200391ecfabc8fa247",
          "dpMaxTime": 1517022471865,
          "virtual": false,
          "productId": "4PxSnRXcfvqrIi11",
          "dps": {
            "11": 0,
            "1": true,
            "101": "AP",
            "102": "AP",
            "103": "AP"
          },
          "activeTime": 1517022356,
          "ip": "42.42.42.42",
          "lon": "-42.427927",
          "moduleMap": {
            "wifi": {
              "bv": "5.07",
              "cdv": "",
              "pv": "2.1",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            },
            "mcu": {
              "cdv": "",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            }
          },
          "uuid": "02200391ecfabc8fa247",
          "name": "Snappy sw4",
          "isShare": false,
          "timezoneId": "America/Toronto",
          "iconUrl": "https://images.tuyaus.com/smart/icon/1498529014_0.png",
          "lat": "42.4231103",
          "runtimeEnv": "prod",
          "localKey": "53ab3e3c48e5a28f"
        },
        {
          "devId": "01200885ecfabc802c01",
          "dpMaxTime": 1517022406759,
          "virtual": false,
          "productId": "4PxSnRXcfvqrIi11",
          "dps": {
            "11": 0,
            "1": true,
            "101": "QVA=",
            "102": "QVA=",
            "103": "QVA="
          },
          "activeTime": 1517022280,
          "ip": "42.42.42.42",
          "lon": "-42.427927",
          "moduleMap": {
            "wifi": {
              "bv": "5.07",
              "cdv": "",
              "pv": "2.1",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            },
            "mcu": {
              "cdv": "",
              "verSw": "1.0.0",
              "isOnline": true,
              "cadv": ""
            }
          },
          "uuid": "01200885ecfabc802c01",
          "name": "Olaf sw3",
          "isShare": false,
          "timezoneId": "America/Toronto",
          "iconUrl": "https://images.tuyaus.com/smart/icon/1498529014_0.png",
          "lat": "42.4231103",
          "runtimeEnv": "prod",
          "localKey": "cfa1fd901557fe8a"
        }
      ],
      "a": "tuya.m.device.my.list",
      "t": 1517228480253,
      "success": true,
      "v": "1.0",
      "status": "ok"
    },
    {
      "result": [
        {
          "uid": "fz1516934610837YmStU",
          "password": "a1944d364b2149b2",
          "code": "tymesh1517015922",
          "pv": "2.1",
          "name": "tymesh1517015922",
          "share": false,
          "meshId": "meebb921f5a09f385811fx",
          "localKey": "e5b87e7b1c5a9281"
        }
      ],
      "a": "tuya.m.mesh.my.list",
      "t": 1517228480248,
      "success": true,
      "v": "1.0",
      "status": "ok"
    },
    {
      "result": [],
      "a": "tuya.m.device.group.my.list",
      "t": 1517228480249,
      "success": true,
      "v": "1.0",
      "status": "ok"
    }
  ],
  "t": 1517228480330,
  "success": true,
  "status": "ok"
}

#11: tuya.m.iconfont.version.get

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.iconfont.version.get&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=b193f61535d4a516901cea58f4d09d4c&lang=en&requestId=14bee19e-3aa9-4c71-93e8-0e874e45f027&time=1517228447&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.iconfont.version.get",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "b193f61535d4a516901cea58f4d09d4c",
  "lang": "en",
  "requestId": "14bee19e-3aa9-4c71-93e8-0e874e45f027",
  "time": "1517228447",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA


RESPONSE

HTTP/1.1 200 OK
Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:26 GMT
Server: Apache-Coyote/1.1
Content-Length: 78
Connection: keep-alive

RESPONSE DATA

{
  "result": {
    "version": "1.1.7"
  },
  "t": 1517228486972,
  "success": true,
  "status": "ok"
}

#12: tuya.m.user.info.get

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.user.info.get&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=0269fa3e945632551876076946399b1f&lang=en&requestId=e8da0417-8fab-4916-b02d-0e0df246fd9c&time=1517228447&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.user.info.get",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "0269fa3e945632551876076946399b1f",
  "lang": "en",
  "requestId": "e8da0417-8fab-4916-b02d-0e0df246fd9c",
  "time": "1517228447",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA


RESPONSE

HTTP/1.1 200 OK
Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:27 GMT
Server: Apache-Coyote/1.1
Content-Length: 421
Connection: keep-alive

RESPONSE DATA

{
  "result": {
    "mobile": "1-1235556789",
    "domain": {
      "gwApiUrl": "http://a.gw.tuyaus.com/gw.json",
      "gwMqttUrl": "mq.gw.tuyaus.com",
      "mobileApiUrl": "https://a1.tuyaus.com",
      "mobileMqttUrl": "mq.mb.tuyaus.com",
      "pxApiUrl": "https://px1.tuyaus.com",
      "regionCode": "AZ"
    },
    "nickname": "",
    "timezoneId": "America/Toronto",
    "userType": 1,
    "id": "fz1516934610837YmStU",
    "email": "",
    "username": "1-1235556789"
  },
  "t": 1517228487862,
  "success": true,
  "status": "ok"
}

#13: tuya.m.user.loginout

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.user.loginout&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=981168ada503ade9c6b8d5666a184570&lang=en&requestId=5ee23f30-4fb8-4d19-9ce8-75bd6babb708&time=1517228450&appRnVersion=2.9&lat=42.4231103&imsi=40895Galaxy75dd HTTP/1.1

I decoded the URL parms into a dictionnary ...

{
  "sdkVersion": "1.11.11",
  "platform": "Galaxy Nexus",
  "ttid": "sdk_google1@3qp5cfk8c4gyrf3mpmc8",
  "a": "tuya.m.user.loginout",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693C4610837YNmStUR3bcca337372f65e767617d95a70488cf9",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "981168ada503ade9c6b8d5666a184570",
  "lang": "en",
  "requestId": "5ee23f30-4fb8-4d19-9ce8-75bd6babb708",
  "time": "1517228450",
  "appRnVersion": "2.9",
  "lat": "42.4231103",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA


RESPONSE

HTTP/1.1 200 OK
Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:21:30 GMT
Server: Apache-Coyote/1.1
Content-Length: 77
Connection: keep-alive

RESPONSE DATA

{
  "result": {
    "success": "true"
  },
  "t": 1517228490742,
  "success": true,
  "status": "ok"
}
Clone this wiki locally