Skip to content

Requests: connect user pass

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

connect user pass


#01: tuya.m.user.mobile.token.get

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.user.mobile.token.get&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.42792&clientId=3qp5cfk8c4gyrf3mpmc8&sign=7fe587df3965a8726570001ed81a4c43&lang=en&requestId=5cdaf922-b232-4928-ab57-4e4941b6a94f&time=1517228269&appRnVersion=2.9&lat=42.4231047&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.token.get",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.42792",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "7fe587df3965a8726570001ed81a4c43",
  "lang": "en",
  "requestId": "5cdaf922-b232-4928-ab57-4e4941b6a94f",
  "time": "1517228269",
  "appRnVersion": "2.9",
  "lat": "42.4231047",
  "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:18:29 GMT
Server: Apache-Coyote/1.1
Content-Length: 441
Connection: keep-alive

RESPONSE DATA

{
  "result": {
    "publicKey": "42602702025892007219735058741683371480679851803331242305771869996479499942381429766596755280350188106597601146021814995081365533968915864413897207952236692029197804569804288724862283076796718729871950003197250831428153888420901311514684492609008608487549379275046169082800587654694941801776371358644506054542",
    "exponent": "3",
    "token": "f47a959143f19cdd9f19030550ad37fd"
  },
  "t": 1517228309942,
  "success": true,
  "status": "ok"
}

#02: tuya.m.user.mobile.passwd.login

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=tuya.m.user.mobile.passwd.login&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.42792&clientId=3qp5cfk8c4gyrf3mpmc8&sign=3fb3ab6378cbdd13d1bcf0747c9e4e2c&lang=en&requestId=83b5b87a-cf33-4c1e-a83b-21fc20630bc3&time=1517228271&appRnVersion=2.9&lat=42.4231047&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.passwd.login",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.42792",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "3fb3ab6378cbdd13d1bcf0747c9e4e2c",
  "lang": "en",
  "requestId": "83b5b87a-cf33-4c1e-a83b-21fc20630bc3",
  "time": "1517228271",
  "appRnVersion": "2.9",
  "lat": "42.4231047",
  "imsi": "40895Galaxy75dd"
}
User-Agent: TY-UA=APP/Android/2.9.1/SDK/1.11.11
Content-Type: application/x-www-form-urlencoded
Content-Length: 433
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22countryCode%22%3A%221%22%2C%22ifencrypt%22%3A1%2C%22mobile%22%3A%221235556789%22%2C%22passwd%22%3A%22000000000000000000000000000000000000000000000000000000000000000004215f33145d130d1dd02ee9249125251d3d4824bc72ad311da82abe3b9b8784940a3d983d0254a9b9480607cdd579008a78563bf20a89ee0196aa4d78986ad0e9b59d352c6ebb34e48a964eadd40996d9af1c9b4a6c78df8eb5bb2552da8042%22%2C%22token%22%3A%22f47a959143f19cdd9f19030550ad37fd%22%7D

I applied a URL_DECODE on postData ...

{
  "countryCode": "1",
  "ifencrypt": 1,
  "mobile": "1235556789",
  "passwd": "000000000000000000000000000000000000000000000000000000000000000004215f33145d130d1dd02ee9249125251d3d4824bc72ad311da82abe3b9b8784940a3d983d0254a9b9480607cdd579008a78563bf20a89ee0196aa4d78986ad0e9b59d352c6ebb34e48a964eadd40996d9af1c9b4a6c78df8eb5bb2552da8042",
  "token": "f47a959143f19cdd9f19030550ad37fd"
}

RESPONSE

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

RESPONSE DATA

{
  "result": {
    "timezone": "",
    "sex": 0,
    "mobile": "1-1235556789",
    "headPic": "",
    "sid": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
    "ecode": "z6z6z945319zaw42",
    "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": 1517228311585,
  "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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.42792&clientId=3qp5cfk8c4gyrf3mpmc8&sign=93220f61f04f009e53f7d2c667d3c180&lang=en&requestId=38c6b261-2a8b-4aeb-8155-e01a66a2a69b&time=1517228272&appRnVersion=2.9&lat=42.4231047&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.42792",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "93220f61f04f009e53f7d2c667d3c180",
  "lang": "en",
  "requestId": "38c6b261-2a8b-4aeb-8155-e01a66a2a69b",
  "time": "1517228272",
  "appRnVersion": "2.9",
  "lat": "42.4231047",
  "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%22903127446e1da480904a4bda4ebbb6fe%22%2C%22t%22%3A1517228272%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.device.my.list%22%2C%22sign%22%3A%22bdf4d68407a9d06a216ff9152851deb7%22%2C%22t%22%3A1517228272%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.mesh.my.list%22%2C%22sign%22%3A%22ca62a18a889e0f0a500210af0fb7bc5d%22%2C%22t%22%3A1517228272%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.device.group.my.list%22%2C%22sign%22%3A%2296722ce38a9689e33feea3e30dff9182%22%2C%22t%22%3A1517228272%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": "903127446e1da480904a4bda4ebbb6fe",
      "t": 1517228272,
      "v": "1.0"
    },
    {
      "a": "tuya.m.device.my.list",
      "sign": "bdf4d68407a9d06a216ff9152851deb7",
      "t": 1517228272,
      "v": "1.0"
    },
    {
      "a": "tuya.m.mesh.my.list",
      "sign": "ca62a18a889e0f0a500210af0fb7bc5d",
      "t": 1517228272,
      "v": "1.0"
    },
    {
      "a": "tuya.m.device.group.my.list",
      "sign": "96722ce38a9689e33feea3e30dff9182",
      "t": 1517228272,
      "v": "1.0"
    }
  ]
}

RESPONSE

Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:18:32 GMT
Server: Apache-Coyote/1.1
Content-Length: 5093
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": 1517228312616,
      "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.4279139",
          "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.4231269",
          "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.4279139",
          "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.4231269",
          "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.4279139",
          "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.4231269",
          "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.4279139",
          "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.4231269",
          "runtimeEnv": "prod",
          "localKey": "cfa1fd901557fe8a"
        }
      ],
      "a": "tuya.m.device.my.list",
      "t": 1517228312615,
      "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": 1517228312614,
      "success": true,
      "v": "1.0",
      "status": "ok"
    },
    {
      "result": [],
      "a": "tuya.m.device.group.my.list",
      "t": 1517228312613,
      "success": true,
      "v": "1.0",
      "status": "ok"
    }
  ],
  "t": 1517228312616,
  "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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=4c1df7d05666784a665a7512845b68d2&lang=en&requestId=6bbc12a2-17d5-4026-b731-f2a88bde6917&time=1517228283&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "4c1df7d05666784a665a7512845b68d2",
  "lang": "en",
  "requestId": "6bbc12a2-17d5-4026-b731-f2a88bde6917",
  "time": "1517228283",
  "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:18:44 GMT
Server: Apache-Coyote/1.1
Content-Length: 112
Connection: keep-alive

RESPONSE DATA

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

#05: s.m.gw.location.update

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=s.m.gw.location.update&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=56c715195beaa1eaa8ce2df275355971&lang=en&requestId=bf029a4f-b8d2-4c28-b537-44219bc6ad0a&time=1517228284&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": "s.m.gw.location.update",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "56c715195beaa1eaa8ce2df275355971",
  "lang": "en",
  "requestId": "bf029a4f-b8d2-4c28-b537-44219bc6ad0a",
  "time": "1517228284",
  "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: 54
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22gwId%22%3A%2202200391ecfabc8180cc%22%7D

I applied a URL_DECODE on postData ...

{
  "gwId": "02200391ecfabc8180cc"
}

RESPONSE

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

RESPONSE DATA

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

#06: s.m.gw.location.update

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=s.m.gw.location.update&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=3003f31dead70f64546492dce17a510a&lang=en&requestId=dc44e52b-5d22-4685-b87e-0d94bf23b33e&time=1517228284&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": "s.m.gw.location.update",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "3003f31dead70f64546492dce17a510a",
  "lang": "en",
  "requestId": "dc44e52b-5d22-4685-b87e-0d94bf23b33e",
  "time": "1517228284",
  "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: 54
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22gwId%22%3A%2201200885ecfabc802c01%22%7D

I applied a URL_DECODE on postData ...

{
  "gwId": "01200885ecfabc802c01"
}

RESPONSE

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

RESPONSE DATA

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

#07: s.m.gw.location.update

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=s.m.gw.location.update&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=753f870abb97d4f0a777ea998eca1778&lang=en&requestId=992d3cf2-64c0-49f0-9a4b-f1c194b54692&time=1517228284&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": "s.m.gw.location.update",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "753f870abb97d4f0a777ea998eca1778",
  "lang": "en",
  "requestId": "992d3cf2-64c0-49f0-9a4b-f1c194b54692",
  "time": "1517228284",
  "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: 54
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22gwId%22%3A%2202200391ecfabc8af177%22%7D

I applied a URL_DECODE on postData ...

{
  "gwId": "02200391ecfabc8af177"
}

RESPONSE

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

RESPONSE DATA

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

#08: s.m.gw.location.update

POST https://a1.tuyaus.com/api.json?sdkVersion=1.11.11&platform=Galaxy%20Nexus&ttid=sdk_google1@3qp5cfk8c4gyrf3mpmc8&a=s.m.gw.location.update&timeZoneId=America/Atikokan&deviceId=e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff&osSystem=4.4.4&sid=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=d1f3a7901da98265d620450fad712c8f&lang=en&requestId=155c628f-8b17-4c6e-8bb4-87a4ff1fd43a&time=1517228284&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": "s.m.gw.location.update",
  "timeZoneId": "America/Atikokan",
  "deviceId": "e742886e7bca1f0b6b99d8483ac0003fca13a18b46ff",
  "osSystem": "4.4.4",
  "sid": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "d1f3a7901da98265d620450fad712c8f",
  "lang": "en",
  "requestId": "155c628f-8b17-4c6e-8bb4-87a4ff1fd43a",
  "time": "1517228284",
  "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: 54
Host: a1.tuyaus.com
Connection: Keep-Alive
Accept-Encoding: gzip

REQUEST DATA

postData=%7B%22gwId%22%3A%2202200391ecfabc8fa247%22%7D

I applied a URL_DECODE on postData ...

{
  "gwId": "02200391ecfabc8fa247"
}

RESPONSE

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

RESPONSE DATA

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

#09: 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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=c5836ed46edb55c0e480d0c753ecd6ac&lang=en&requestId=c8c5fc9c-6d05-4e29-a27a-02e6287a3a6f&time=1517228284&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "c5836ed46edb55c0e480d0c753ecd6ac",
  "lang": "en",
  "requestId": "c8c5fc9c-6d05-4e29-a27a-02e6287a3a6f",
  "time": "1517228284",
  "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:18:44 GMT
Server: Apache-Coyote/1.1
Content-Length: 61
Connection: keep-alive

RESPONSE DATA

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

#10: 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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=3.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=bab2b86418d2004a9424ec2e081b913c&lang=en&requestId=256862f1-b97d-44dd-82cf-4746dcc39ef1&time=1517228284&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "3.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "bab2b86418d2004a9424ec2e081b913c",
  "lang": "en",
  "requestId": "256862f1-b97d-44dd-82cf-4746dcc39ef1",
  "time": "1517228284",
  "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:18:44 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": 1517228325059,
  "success": true,
  "status": "ok"
}

#11: 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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=3.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=681b5902b58537a63c28752a2a62de1e&lang=en&requestId=d3743272-cd06-44ce-a7c6-ca8d7741ee9a&time=1517228287&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "3.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "681b5902b58537a63c28752a2a62de1e",
  "lang": "en",
  "requestId": "d3743272-cd06-44ce-a7c6-ca8d7741ee9a",
  "time": "1517228287",
  "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:18:46 GMT
Server: Apache-Coyote/1.1
Content-Length: 94
Connection: keep-alive

RESPONSE DATA

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

#12: 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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=dae7e10661ff7057782484c1f3c0e55e&lang=en&requestId=339ed27e-1d2a-42be-94f6-0dc17561d507&time=1517228287&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "dae7e10661ff7057782484c1f3c0e55e",
  "lang": "en",
  "requestId": "339ed27e-1d2a-42be-94f6-0dc17561d507",
  "time": "1517228287",
  "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:18:47 GMT
Server: Apache-Coyote/1.1
Content-Length: 60
Connection: keep-alive

RESPONSE DATA

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

#13: 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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=5c23ed45efafe3ee5ce317ac5be2be76&lang=en&requestId=8cfafba5-4950-43a3-b165-73708dc70a23&time=1517228288&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "5c23ed45efafe3ee5ce317ac5be2be76",
  "lang": "en",
  "requestId": "8cfafba5-4950-43a3-b165-73708dc70a23",
  "time": "1517228288",
  "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:18:47 GMT
Server: Apache-Coyote/1.1
Content-Length: 61
Connection: keep-alive

RESPONSE DATA

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

#14: 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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=4c2f2b4628ccbef630d0ae3f00d0dc7d&lang=en&requestId=34df4f07-2386-4fb7-87dc-80ea3f5ec40e&time=1517228288&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "4c2f2b4628ccbef630d0ae3f00d0dc7d",
  "lang": "en",
  "requestId": "34df4f07-2386-4fb7-87dc-80ea3f5ec40e",
  "time": "1517228288",
  "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%22d1bf577760c410c57736c750169caed3%22%2C%22t%22%3A1517228288%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.device.my.list%22%2C%22sign%22%3A%22140a4382d31403a240dc56589f2e0e26%22%2C%22t%22%3A1517228288%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.mesh.my.list%22%2C%22sign%22%3A%229edfed9a146ec3d7c1493fbc4c520627%22%2C%22t%22%3A1517228288%2C%22v%22%3A%221.0%22%7D%2C%7B%22a%22%3A%22tuya.m.device.group.my.list%22%2C%22sign%22%3A%22320ed2fb0e88bf184962ef2fbc7d0a15%22%2C%22t%22%3A1517228288%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": "d1bf577760c410c57736c750169caed3",
      "t": 1517228288,
      "v": "1.0"
    },
    {
      "a": "tuya.m.device.my.list",
      "sign": "140a4382d31403a240dc56589f2e0e26",
      "t": 1517228288,
      "v": "1.0"
    },
    {
      "a": "tuya.m.mesh.my.list",
      "sign": "9edfed9a146ec3d7c1493fbc4c520627",
      "t": 1517228288,
      "v": "1.0"
    },
    {
      "a": "tuya.m.device.group.my.list",
      "sign": "320ed2fb0e88bf184962ef2fbc7d0a15",
      "t": 1517228288,
      "v": "1.0"
    }
  ]
}

RESPONSE

Content-Language: zh-CN
Content-Type: application/json;charset=UTF-8
Date: Mon, 29 Jan 2018 12:18:48 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": 1517228328717,
      "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": 1517228328716,
      "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": 1517228328712,
      "success": true,
      "v": "1.0",
      "status": "ok"
    },
    {
      "result": [],
      "a": "tuya.m.device.group.my.list",
      "t": 1517228328712,
      "success": true,
      "v": "1.0",
      "status": "ok"
    }
  ],
  "t": 1517228328717,
  "success": true,
  "status": "ok"
}

#15: 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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=5c9a665c82ce25215fac5a6b816e6484&lang=en&requestId=e66d7a6c-e426-4356-9f90-665c3c9ace0f&time=1517228288&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "5c9a665c82ce25215fac5a6b816e6484",
  "lang": "en",
  "requestId": "e66d7a6c-e426-4356-9f90-665c3c9ace0f",
  "time": "1517228288",
  "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:18:48 GMT
Server: Apache-Coyote/1.1
Content-Length: 78
Connection: keep-alive

RESPONSE DATA

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

#16: 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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=1658ed10da8043ca34f81e6d22ad03fc&lang=en&requestId=40b0ed40-0ce2-4780-949b-15909bd7811d&time=1517228299&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "1658ed10da8043ca34f81e6d22ad03fc",
  "lang": "en",
  "requestId": "40b0ed40-0ce2-4780-949b-15909bd7811d",
  "time": "1517228299",
  "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:18:59 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": 1517228339562,
  "success": true,
  "status": "ok"
}

#17: 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=az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825&imei=451746050955683&os=Android&v=1.0&appVersion=2.9.1&lon=-42.427927&clientId=3qp5cfk8c4gyrf3mpmc8&sign=1fbe756fc386d49411616ecb4dfe27e2&lang=en&requestId=1f562e9c-4f4e-46f6-852b-f6ffbc457ffb&time=1517228311&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": "az151693w4610837Y4mStUJ32700f0c9e88c40961d73ea5afa2d6825",
  "imei": "451746050955683",
  "os": "Android",
  "v": "1.0",
  "appVersion": "2.9.1",
  "lon": "-42.427927",
  "clientId": "3qp5cfk8c4gyrf3mpmc8",
  "sign": "1fbe756fc386d49411616ecb4dfe27e2",
  "lang": "en",
  "requestId": "1f562e9c-4f4e-46f6-852b-f6ffbc457ffb",
  "time": "1517228311",
  "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:19:10 GMT
Server: Apache-Coyote/1.1
Content-Length: 77
Connection: keep-alive

RESPONSE DATA

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