Home - 智能家居 登录  
最后修改者: root  2019-05-30 13:41:52 

39-网关版本信息上报

编号  :  39

POST - /api/sys/updateversion
网关版本信息上报
请求参数
参数名 参数类型 必传 缺省值 描述
_params String Y {"getway_id":"097c84036b9c05f6","hard_version":"1.0","soft_version":"1.0"}
返回值
{
    "success": true,
    "msg": "版本信息上报成功!"
}
备注
传参形如 {"getway_id":"097c84036b9c05f6","hard_version":"1.0","soft_version":"1.0"}
最后修改者: root  2019-05-21 16:44:50 

38-设置-网关名称

编号  :  38

GET - /api/getway/updateGetwayName
{"getway_id":"097c84036b9c05f6","getway_name":"网关名称"}
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"getway_id":"097c84036b9c05f6","getway_name":"网关名称"}
最后修改者: root  2019-05-21 13:12:44 

37-mqtt--日志上报成功

编号  :  37

POST - /api/sys/mqttlog
{"content":"内容","getway_id":"097c84036b9c05f6","member_id":50}
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"content":"内容","getway_id":"097c84036b9c05f6","member_id":50}
最后修改者: root  2019-05-17 18:31:37 

36-网关软件下载相关接口

编号  :  36

POST - /api/sys/getVersionInfo
参数 versionNo 软件版本号 hardwareNo 硬件版本号
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"versionNo":"1.0","hardwareNo":"1.1"}
返回值
{
  "success": true,
  "msg": "查询成功!",
  "data": {
    "apply_hardware_no": "v_1.1v_1.2",
    "version_no": "1.0",
    "version_url": "http://127.0.0.1/url/1.apk",
    "version_descript": "测试数据",
    "app_force": 1,
    "is_latest": 1
  }
}
备注
"apply_hardware_no": "适合硬件版本:",
    "version_no": "软件版本号",
    "version_url": "下载地址",
    "version_descript": 描述,
    "app_force": 是否强制更新(0-否,1-是),
    "is_latest": 当前版本是否是最新 1 是最新  0 不是最新可以更新
最后修改者: root  2019-05-10 17:05:47 

35-设置是否接收报警短信

编号  :  35

POST - /api/getway/setAlarm
alarm_state 1-接收报警短信,0-不接收报警短信
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"getway_id":"74b1a5adb0896cb3","alarm_state":"1"}
token string Y
最后修改者: root  2019-05-08 16:55:13 

34-获取协议说明页

编号  :  34

POST - /api/sys/explan
请求参数
参数名 参数类型 必传 缺省值 描述
返回值
返回页面
最后修改者: root  2019-04-09 10:27:13 

33-获取帮助页

编号  :  33

POST - /api/sys/help
请求参数
参数名 参数类型 必传 缺省值 描述
备注
返回页面
最后修改者: root  2019-03-27 16:15:16 

32-获取网关信息

编号  :  32

POST - /api/getway/getGetwayInfo
getway_id 悠致网关id
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"getway_id":"74b1a5adb0896cb3"}
token string Y 75fc92cb26d4c8a240d173cb8bdf94ad
返回值
{
    "success": true,
    "msg": "网关信息!",
    "data": {
        "id": 12,
        "entity_id": 1,
        "getway_id": "74b1a5adb0896cb3",
        "getway_sn": "74b1a5adb0896cb3",
        "getway_name": "联调网关",
        "getway_mac": "bc1c8142a084",
        "getway_ch_sn": "HGA123456710000903070002",
        "master_id": 49,
        "machine_version": "Apollo Pro V1.0",
        "soft_version": "version 1.0.0",
        "is_update": 0,
        "area_province": 23,
        "area_city": 385,
        "area": 4209,
        "address": null,
        "village": "未知",
        "bind_num": 0,
        "member_num": 0,
        "QRcode": "",
        "QRcode_time": null,
        "getway_state": 2,
        "state": 1,
        "create_time": "2019-03-07T01:55:48.000+0000",
        "update_time": "2019-03-27T06:52:37.000+0000"
    }
}
最后修改者: root  2019-03-19 14:40:34 

31-网关管理员-解绑指定用户

编号  :  31

POST - /api/getway/unbindGetwayMember
getway_id:网关id ;member_id:需要解绑用户的id
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"getway_id":"3db213da4659896e","member_id":45}
token string Y b7e273d75250ccc54b60e645966bb911
返回值
{
    "success": false,
    "msg": "修改失败,没找到相对应的网关用户!",
    "data": null
}
最后修改者: root  2019-03-19 11:39:05 

30-修改网关用户类型

编号  :  30

POST - /api/getway/updateMemberType
member_id:需要修改用户的id ; member_type:家人-family、访客-visitor
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"getway_id":"3db213da4659896e","member_id":45,"member_type":"family"}
token string Y b7e273d75250ccc54b60e645966bb911
返回值
{
    "success": true,
    "msg": "修改成功",
    "data": {
        "member_id": 45,
        "member_type": "family",
        "update_time": "2019-03-19 11:34:52",
        "getway_id": "3db213da4659896e",
        "getway_member_id": 11
    }
}
最后修改者: root  2019-03-18 17:08:51 

29-根据getway_id获取当前网关所有用户

编号  :  29

POST - /api/getway/getGetWayMemberAll
getway_ch_sn HGA开头 长虹 HGA123456710000903070002 ; getway_id 74b1a5adb0896cb3 悠致的id; 两个参数,二选一
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"getway_id":"74b1a5adb0896cb3"} 或: {"getway_ch_sn":"HGA123456710000903070002"}
token string Y b7e273d75250ccc54b60e645966bb911
返回值
{
    "success": true,
    "msg": "保存成功!",
    "data": [
        {
            "id": 13,
            "entity_id": 1,
            "getway_id": "3db213da4659896e",
            "getway_sn": "3db213da4659896e",
            "getway_name": null,
            "getway_mac": "006cfddfeb57",
            "getway_ch_sn": "HGA123456710000903120001",
            "master_id": 48,
            "machine_version": "smart home 2.0.0",
            "soft_version": "1.0.0",
            "is_update": 0,
            "area_province": null,
            "area_city": null,
            "area": null,
            "address": null,
            "village": "未知",
            "bind_num": 0,
            "member_num": 0,
            "QRcode": "",
            "QRcode_time": null,
            "getway_state": 2,
            "state": 0,
            "create_time": "2019-03-12T08:59:58.000+0000",
            "update_time": "2019-03-15T02:51:57.000+0000",
            "member_id": 44,
            "getway_type": 2,
            "member_type": "family",
            "member_name": "ac_JSCsvU",
            "member_mobile": "15196661920",
            "ch_cid": "844bc35ad12640b6"
        },
        {
            "id": 13,
            "entity_id": 1,
            "getway_id": "3db213da4659896e",
            "getway_sn": "3db213da4659896e",
            "getway_name": null,
            "getway_mac": "006cfddfeb57",
            "getway_ch_sn": "HGA123456710000903120001",
            "master_id": 48,
            "machine_version": "smart home 2.0.0",
            "soft_version": "1.0.0",
            "is_update": 0,
            "area_province": null,
            "area_city": null,
            "area": null,
            "address": null,
            "village": "未知",
            "bind_num": 0,
            "member_num": 0,
            "QRcode": "",
            "QRcode_time": null,
            "getway_state": 2,
            "state": 0,
            "create_time": "2019-03-12T08:59:58.000+0000",
            "update_time": "2019-03-15T02:51:57.000+0000",
            "member_id": 45,
            "getway_type": 2,
            "member_type": "visitor",
            "member_name": "闹钟",
            "member_mobile": "15680802660",
            "ch_cid": "b448226a1b104435"
        },
        {
            "id": 13,
            "entity_id": 1,
            "getway_id": "3db213da4659896e",
            "getway_sn": "3db213da4659896e",
            "getway_name": null,
            "getway_mac": "006cfddfeb57",
            "getway_ch_sn": "HGA123456710000903120001",
            "master_id": 48,
            "machine_version": "smart home 2.0.0",
            "soft_version": "1.0.0",
            "is_update": 0,
            "area_province": null,
            "area_city": null,
            "area": null,
            "address": null,
            "village": "未知",
            "bind_num": 0,
            "member_num": 0,
            "QRcode": "",
            "QRcode_time": null,
            "getway_state": 2,
            "state": 0,
            "create_time": "2019-03-12T08:59:58.000+0000",
            "update_time": "2019-03-15T02:51:57.000+0000",
            "member_id": 48,
            "getway_type": 1,
            "member_type": "master",
            "member_name": "ac_qTqYjlL",
            "member_mobile": "13678131200",
            "ch_cid": "49cbf314f6244a7f"
        },
        {
            "id": 13,
            "entity_id": 1,
            "getway_id": "3db213da4659896e",
            "getway_sn": "3db213da4659896e",
            "getway_name": null,
            "getway_mac": "006cfddfeb57",
            "getway_ch_sn": "HGA123456710000903120001",
            "master_id": 48,
            "machine_version": "smart home 2.0.0",
            "soft_version": "1.0.0",
            "is_update": 0,
            "area_province": null,
            "area_city": null,
            "area": null,
            "address": null,
            "village": "未知",
            "bind_num": 0,
            "member_num": 0,
            "QRcode": "",
            "QRcode_time": null,
            "getway_state": 2,
            "state": 0,
            "create_time": "2019-03-12T08:59:58.000+0000",
            "update_time": "2019-03-15T02:51:57.000+0000",
            "member_id": 48,
            "getway_type": 2,
            "member_type": "family",
            "member_name": "ac_qTqYjlL",
            "member_mobile": "13678131200",
            "ch_cid": "49cbf314f6244a7f"
        },
        {
            "id": 13,
            "entity_id": 1,
            "getway_id": "3db213da4659896e",
            "getway_sn": "3db213da4659896e",
            "getway_name": null,
            "getway_mac": "006cfddfeb57",
            "getway_ch_sn": "HGA123456710000903120001",
            "master_id": 48,
            "machine_version": "smart home 2.0.0",
            "soft_version": "1.0.0",
            "is_update": 0,
            "area_province": null,
            "area_city": null,
            "area": null,
            "address": null,
            "village": "未知",
            "bind_num": 0,
            "member_num": 0,
            "QRcode": "",
            "QRcode_time": null,
            "getway_state": 2,
            "state": 0,
            "create_time": "2019-03-12T08:59:58.000+0000",
            "update_time": "2019-03-15T02:51:57.000+0000",
            "member_id": 49,
            "getway_type": 2,
            "member_type": "family",
            "member_name": "ac_Zmlf4x1",
            "member_mobile": "15184498610",
            "ch_cid": "d5a17bd2bd784f15"
        }
    ]
}
最后修改者: root  2019-03-13 15:38:40 

28房间列表

编号  :  28

POST - /api/room/getRoomList
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"getway_id":12}
token string Y 5ebc7bee9766703a42d6e6083a34bb35
返回值
{
  "success": true,
  "msg": "查询成功!",
  "data": [
    {
      "room_id": 3,
      "room_name": "房间1",
      "device_num": 2,                   //设备数量
      "main_types": "1,1"                    //设备类型
    },
    {
      "room_id": 2,
      "room_name": "房间2",
      "device_num": 2,
      "main_types": "1,1"
    },
    {
      "room_id": 1,
      "room_name": "房间11",
      "device_num": 2,
      "main_types": "1,1"
    }
  ]
}
最后修改者: root  2019-03-13 15:32:35 

27删除房间

编号  :  27

POST - /api/room/delRoom
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"room_id":"4"}
token string Y 6a06ffeab3f8d4554a8e067cdcdba821
返回值
{
  "success": true,
  "msg": "删除成功!",
  "data": null
}
最后修改者: root  2019-03-13 15:31:00 

26添加房间/编辑房间

编号  :  26

POST - api/room/addRoom
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"getway_id":12,"room_name":"房间1","data":[{"device_id":2},{"device_id":1}]}
token string Y 5ebc7bee9766703a42d6e6083a34bb35
返回值
{
  "success": true,
  "msg": "操作成功!",
  "data": null
}
备注
{
    "room_id": 1,                    //房间      大于0 为编辑    null  添加
   "getway_id": 12,                    //网关ID
    "room_name": "房间1",
    "data": [
        {
            "device_id": 2          设备id
        },
        {
            "device_id": 1
        }
    ]
}
最后修改者: root  2019-03-15 15:05:44 

25-根据getway_id获取当前用户的绑定的网关信息

编号  :  25

POST - /api/getway/getMemberGetWayInfo
getway_ch_sn HGA开头 长虹 HGA123456710000903070002 ; getway_id 74b1a5adb0896cb3 悠致的id; 两个参数,二选一
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"getway_id":"74b1a5adb0896cb3"} 或: {"getway_ch_sn":"HGA123456710000903070002"}
token string Y d51fb8c5816f239441fa74e2bc0e91ad
返回值
{
    "success": true,
    "msg": "保存成功!",
    "data": {
        "id": 13,
        "entity_id": 1,
        "getway_id": "3db213da4659896e",
        "getway_sn": "3db213da4659896e",
        "getway_name": null,
        "getway_mac": "006cfddfeb57",
        "getway_ch_sn": "HGA123456710000903120001",
        "master_id": 48,
        "machine_version": "smart home 2.0.0",
        "soft_version": "1.0.0",
        "is_update": 0,
        "area_province": null,
        "area_city": null,
        "area": null,
        "address": null,
        "village": "未知",
        "bind_num": 0,
        "member_num": 0,
        "QRcode": null,
        "QRcode_time": null,
        "getway_state": 2,
        "state": 0,
        "create_time": "2019-03-12T08:59:58.000+0000",
        "update_time": "2019-03-13T06:32:49.000+0000",
        "member_id": 48,
        "getway_type": 1,
        "member_type": "master"
    }
}
最后修改者: root  2019-03-13 16:46:58 

24-获取所有网关列表

编号  :  24

POST - /api/getway/getMemberGetWayAll
请求参数
参数名 参数类型 必传 缺省值 描述
token string Y d51fb8c5816f239441fa74e2bc0e91ad
返回值
{
    "success": true,
    "msg": "保存成功!",
    "data": {
        "share_list": [
            {
                "id": 12,
                "entity_id": 1,
                "getway_id": "74b1a5adb0896cb3",
                "getway_sn": "74b1a5adb0896cb3",
                "getway_name": null,
                "getway_mac": "00-00-00-00-00-01",
                "getway_ch_sn": "HGA123456710000903070002",
                "master_id": 44,
                "machine_version": "Apollo Pro V1.0",
                "soft_version": "version 1.0.0",
                "is_update": 0,
                "area_province": 23,
                "area_city": 385,
                "area": 4209,
                "address": null,
                "village": "未知",
                "bind_num": 0,
                "member_num": 0,
                "QRcode": null,
                "QRcode_time": null,
                "getway_state": 2,
                "state": 1,
                "create_time": "2019-03-07T01:55:48.000+0000",
                "update_time": "2019-03-13T06:30:46.000+0000",
                "getway_type": 2,
                "member_type": "family"
            }
        ],
        "master_list": [
            {
                "id": 13,
                "entity_id": 1,
                "getway_id": "3db213da4659896e",
                "getway_sn": "3db213da4659896e",
                "getway_name": null,
                "getway_mac": "006cfddfeb57",
                "getway_ch_sn": "HGA123456710000903120001",
                "master_id": 48,
                "machine_version": "smart home 2.0.0",
                "soft_version": "1.0.0",
                "is_update": 0,
                "area_province": null,
                "area_city": null,
                "area": null,
                "address": null,
                "village": "未知",
                "bind_num": 0,
                "member_num": 0,
                "QRcode": null,
                "QRcode_time": null,
                "getway_state": 2,
                "state": 0,
                "create_time": "2019-03-12T08:59:58.000+0000",
                "update_time": "2019-03-13T06:32:49.000+0000",
                "getway_type": 1,
                "member_type": "master"
            }
        ]
    }
}
最后修改者: root  2019-03-13 13:18:57 

23-中控上报设备信息及状态

编号  :  23

POST - /api/sys/uploaddeviceinfo
中控上报设备信息及状态
请求参数
参数名 参数类型 必传 缺省值 描述
_params String Y {"topic":"sys/entities/got","data":[{"id":4194324,"state":{"desired":{},"reported":{"cap":{"commands":{"close":true,"gotoPercentage":true,"gotoPresetPosition":[],"open":true,"stepClose":false,"stepOpen":false,"stop":true,"tiltPercentage":false},"displayName":"悠致02开合帘","modelName":"618 AM68-1窗帘电机","modelType":2002,"protocolType":2002,"settings":{"pairing":false,"resetSetting":false,"reverseDir":true}},"name":"窗帘","nodeId":2097170,"onOff":false,"pause":false,"percent":0}},"tags":["@env","curtain"]},{"id":4194319,"state":{"desired":{},"reported":{"name":"智能插座","nodeId":2097165,"onOff":false}},"tags":["@appliance","smartsocket"]},{"id":4194309,"state":{"desired":{},"reported":{"colorTemperature":85,"groupBind":[4194320],"icon":8,"lightness":75,"name":"S灯-1","nodeId":2097155,"onOff":false,"voice":0}},"tags":["@lighting","lumekey"]},{"id":4194310,"state":{"desired":{},"reported":{"colorTemperature":31,"groupBind":[],"icon":9,"lightness":50,"name":"S灯-2","nodeId":2097155,"onOff":false,"voice":0}},"tags":["@lighting","lumekey"]},{"id":4194311,"state":{"desired":{},"reported":{"colorTemperature":31,"groupBind":[],"icon":10,"lightness":50,"name":"S灯-3","nodeId":2097155,"onOff":false,"voice":0}},"tags":["@lighting","lumekey"]},{"id":4194312,"state":{"desired":{},"reported":{"colorTemperature":31,"groupBind":[],"icon":8,"lightness":50,"name":"F灯-1","nodeId":2097161,"onOff":false,"voice":0}},"tags":["@lighting","lumekey"]},{"id":4194313,"state":{"desired":{},"reported":{"colorTemperature":31,"groupBind":[],"icon":9,"lightness":50,"name":"F灯-2","nodeId":2097161,"onOff":false,"voice":0}},"tags":["@lighting","lumekey"]},{"id":4194314,"state":{"desired":{},"reported":{"colorTemperature":31,"groupBind":[],"icon":8,"lightness":50,"name":"R灯-1","nodeId":2097162,"onOff":false,"voice":0}},"tags":["@lighting","lumekey"]},{"id":4194315,"state":{"desired":{},"reported":{"colorTemperature":31,"groupBind":[],"icon":9,"lightness":50,"name":"R灯-2","nodeId":2097162,"onOff":false,"voice":0}},"tags":["@lighting","lumekey"]},{"id":4194316,"state":{"desired":{},"reported":{"colorTemperature":31,"groupBind":[],"icon":10,"lightness":50,"name":"R灯-3","nodeId":2097162,"onOff":false,"voice":0}},"tags":["@lighting","lumekey"]},{"id":4194320,"state":{"desired":{},"reported":{"colorTemperature":85,"icon":0,"lightness":75,"name":"l色温","nodeId":2097166,"onOff":false}},"tags":["@lighting","smartbulb"]},{"id":4194321,"state":{"desired":{},"reported":{"colorTemperature":0,"icon":0,"lightness":78,"name":"RGB","nodeId":2097167,"onOff":true}},"tags":["@lighting","smartbulb"]},{"id":4194322,"state":{"desired":{},"reported":{"colorTemperature":0,"icon":0,"lightness":78,"name":"light-flex16","nodeId":2097168,"onOff":false}},"tags":["@lighting","smartbulb"]},{"id":2097152,"state":{"desired":{},"reported":{"mac":"_pseudo_dumy_","name":"","online":true}},"tags":["node"]},{"id":2097153,"state":{"desired":{},"reported":{"mac":"1a85d618004b1200","name":"gene1","online":true}},"tags":["node"]},{"id":2097154,"state":{"desired":{},"reported":{"mac":"0000000000000000","name":"host2","online":true}},"tags":["node"]},{"id":2097155,"state":{"desired":{},"reported":{"mac":"5444d518004b1200","name":"S灯","online":true}},"tags":["node"]},{"id":2097156,"state":{"desired":{},"reported":{"mac":"FAKE4NEWAPI4","name":"noreg4","online":true}},"tags":["node"]},{"id":2097157,"state":{"desired":{},"reported":{"mac":"FAKE4NEWAPId","name":"noreg5","online":true}},"tags":["node"]},{"id":2097158,"state":{"desired":{},"reported":{"mac":"FAKE4NEWAPIb","name":"noreg6","online":true}},"tags":["node"]},{"id":2097159,"state":{"desired":{},"reported":{"mac":"FAKE4NEWAPIc","name":"noreg7","online":true}},"tags":["node"]},{"id":2097160,"state":{"desired":{},"reported":{"mac":"FAKE4NEWAPI9","name":"noreg8","online":true}},"tags":["node"]},{"id":2097161,"state":{"desired":{},"reported":{"mac":"7bb3d518004b1200","name":"F灯","online":true}},"tags":["node"]},{"id":2097162,"state":{"desired":{},"reported":{"mac":"f0b1d518004b1200","name":"R灯","online":true}},"tags":["node"]},{"id":2097163,"state":{"desired":{},"reported":{"mac":"d399ee0f004b1200","name":"门磁","online":true}},"tags":["node"]},{"id":2097164,"state":{"desired":{},"reported":{"mac":"970bc30c004b1200","name":"水浸","online":true}},"tags":["node"]},{"id":2097165,"state":{"desired":{},"reported":{"mac":"6172ee0f004b1200","name":"智能插座","online":true}},"tags":["node"]},{"id":2097166,"state":{"desired":{},"reported":{"mac":"a0abc014004b1200","name":"l色温","online":true}},"tags":["node"]},{"id":2097167,"state":{"desired":{},"reported":{"mac":"3babc014004b1200","name":"RGB","online":true}},"tags":["node"]},{"id":2097168,"state":{"desired":{},"reported":{"mac":"e3a9c014004b1200","name":"light-flex16","online":true}},"tags":["node"]},{"id":2097169,"state":{"desired":{},"reported":{"mac":"05f07508004b1200","name":"燃气","online":true}},"tags":["node"]},{"id":2097170,"state":{"desired":{},"reported":{"mac":"62376c0b38363632","name":"窗帘","online":true}},"tags":["node"]},{"id":2097171,"state":{"desired":{},"reported":{"mac":"FAKE4NEWAPI5","name":"noreg19","online":true}},"tags":["node"]},{"id":2097172,"state":{"desired":{},"reported":{"mac":"FAKE4NEWAPI7","name":"noreg20","online":true}},"tags":["node"]},{"id":2097173,"state":{"desired":{},"reported":{"mac":"FAKE4NEWAPI2","name":"noreg21","online":true}},"tags":["node"]},{"id":2097174,"state":{"desired":{},"reported":{"mac":"FAKE4NEWAPI3","name":"noreg22","online":true}},"tags":["node"]},{"id":524289,"state":{"desired":{},"reported":{"actions":[{"action":[{"bindOnDev":0,"colorTemperature":0,"hue":0,"icon":0,"interlockBindDevId":18,"lastEventSource":4,"lightness":78,"nodeId":16,"onOff":"on","saturation":100,"subType":"3","type":"1","voice":0}],"delay":0,"id":4194322,"targetType":"device"}],"cooldownTime":null,"name":"当F灯-1打开","preConditions":{"devices":[],"guardzones":[],"scenes":[]},"status":"active","strategy":"interrupt","triggers":{"devices":[{"id":4194312,"onOff":{"value":"on"}}],"guardzones":[],"scenes":[]}}},"tags":["event"]},{"id":262145,"state":{"desired":{},"reported":{"devIdList":[4194317,4194318,4194323],"effectiveDelayInSec":0,"name":"水浸","onGuard":true}},"tags":["guardzone"]},{"id":131073,"state":{"desired":{},"reported":{"activate":false,"icon":1,"itemConfList":[{"colorTemperature":0,"id":4194322,"lightness":78,"onOff":"on"}],"name":"回家模式","roomId":0,"timing":{"enable":false,"hour":0,"minute":0,"repeat":"0000000"},"voice":137}},"tags":["scene"]},{"id":65537,"state":{"desired":{},"reported":{"devIdList":[4194309,4194310,4194311,4194312,4194313,4194314,4194315,4194316,4194319,4194320,4194321,4194322,4194324],"icon":1,"name":"未归类设备"}},"tags":["room"]},{"id":1,"state":{"desired":{},"reported":{"gatewayId":"74b1a5adb0896cb3","mac":"bc1c8142a084","manufacturer":"618tech","name":"联调网关"}},"tags":["gateway"]}]}
token String Y 用户token
返回值
{
    "success": true,
    "msg": "上报成功!"
}
最后修改者: root  2019-03-07 11:23:55 

22-上传用户图标

编号  :  22

POST - /api/member/uploadImg
img:图片需要转化为dase64进行上传
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"img":dase64}
返回值
data:中的数据是图片路径
最后修改者: root  2019-03-06 15:13:30 

21-广告图片上传

编号  :  21

POST - /api/startpage/uploadImg
广告图片上传
请求参数
参数名 参数类型 必传 缺省值 描述
img dase64 Y 图片
最后修改者: root  2019-03-07 15:09:25 

20-设备激活--中控器使用

编号  :  20

POST - /api/sys/deviceActive
json(application/json)方式 @RequestBody device_sn:设备sn mac:mac地址 hwver:硬件版本 swver:软件版本 network:设备类型入网方式 wifi设备可以不传,nb设备必须传cloud/nb
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"device_sn":"5e7qkhPz9FACjtzfa8er5PvNqaa8mQSg","mac":"00-00-00-00-00-00","hwver":"Apollo Pro V1.0","swver":"version 1.0.0","network":"wifi"}
返回值
{
    "success": true,
    "msg": "设备激活成功!",
    "data": "HGA123456710000903060003"
}
最后修改者: root  2019-03-07 16:05:34 

19-获取天气--中控器使用

编号  :  19

POST - /api/sys/weather
@RequestBody device_sn:中控器上的设备号,如果没有指定城市,测默认为成都
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"device_sn":"74b1a5adb0896c35"}
返回值
{
    "success": true,
    "msg": "保存成功!",
    "data": {
        "date": "2019-03-06",
        "hum": "98",
        "level": "优质",
        "currentCity": "成都",
        "WD": "静风",
        "realTimeTemp": "11",
        "pm25": "34",
        "wind_scale": "0级",
        "aqi": "49",
        "weather": "阴",
        "temperature": "9-15",
        "wind_speed": "5.4",
        "time": "09:04"
    }
}
最后修改者: root  2019-03-06 09:25:23 

18-解绑网关

编号  :  18

POST - /api/getway/unbind
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"getway_id":"74b1a5adb0896cb3"}
token string Y 144cf7b0cc4a08044d4864f4719ea800
最后修改者: root  2019-03-06 09:23:37 

17-绑定网关

编号  :  17

POST - /api/getway/bind
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"getway_id":"74b1a5adb0896cb3","entity_id":"01"}
token string Y 144cf7b0cc4a08044d4864f4719ea800
返回值
{
    "success": false,
    "msg": "设备不存在!",
    "data": null
}
最后修改者: root  2019-03-04 17:11:38 

16-分享二维码-保存

编号  :  16

POST - /api/getway/shareQRcode
分享给用户,扫描后。保存!
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"QRcode":"FtPzxlk51547NoXplZMjmiMb0zA7Aous1rnATODJYzOarNLkNd2QTNmJg5s1Cx89"}
token string Y 4014a35b489fe010415ecf6cd26abc97
返回值
{
    "success": false,
    "msg": "分享的二维码数据不正确或已经过期!",
    "data": null
}
最后修改者: root  2019-05-13 09:36:05 

15-创建二维码

编号  :  15

POST - /api/getway/createQRcode
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"getway_sn":"wg00001"}
token string Y 4014a35b489fe010415ecf6cd26abc97
返回值
{
    "success": true,
    "msg": "保存成功!",
    "data": {
        "update_time": "2019-03-04 16:33:20",
        "getway_sn": "wg00001",
        "getway_id": 1,
        "QRcode": "FtPzxlk51547NoXplZMjmiMb0zA7Aous1rnATODJYzOarNLkNd2QTNmJg5s1Cx89",
        "QRcode_time": "2019-03-04 16:33:20",
       "count":3
    }
}
最后修改者: root  2019-03-06 14:10:28 

14-网关添加-暂停

编号  :  14

POST - /api/getway/add
请求参数
参数名 参数类型 必传 缺省值 描述
getway_sn String Y 网关唯一编码
master_id int Y 网关主账号
machine_version String Y 硬件版本号
soft_version String Y 软件版本
area String Y 地址信息 例如 四川省,成都市,双流 必须是3级逗号分隔
address String N 街道地址
village String N 未知 小区名
返回值
{
    "success": true,
    "msg": "添加网关成功!",
    "data": null
}
最后修改者: root  2019-02-26 17:58:31 

13-获取服务器时间--中控使用

编号  :  13

POST - /api/sys/getSysTime
请求参数
参数名 参数类型 必传 缺省值 描述
Y
返回值
{
    "success": true,
    "msg": "保存成功!",
    "data": {
        "seconds": 1551174220,
        "currentDateTime": "2019-02-26 17:43:40"
    }
}
最后修改者: root  2019-05-13 14:26:03 

12-更新地址

编号  :  12

POST - /api/member/updateAddress
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"longitudes":"128.020230","latitudes":"304.48484","area_address":"全地址","address":"短地址/小区","street":"街道","province":"四川","city":"成都","county":"锦江区","getway_id":"74b1a5adb0896cb3"}
token string Y
最后修改者: root  2019-03-05 09:18:57 

11-获取区域信息

编号  :  11

POST - /api/area/list
parent_id 父级id 0-代表取省,
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"parent_id":"0"}
token string Y
返回值
{
    "success": true,
    "msg": "保存成功!",
    "data": [
        {
            "area_id": 1,
            "area_name": "北京",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华北"
        },
        {
            "area_id": 2,
            "area_name": "天津",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华北"
        },
        {
            "area_id": 3,
            "area_name": "河北",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华北"
        },
        {
            "area_id": 4,
            "area_name": "山西",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华北"
        },
        {
            "area_id": 5,
            "area_name": "内蒙古",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华北"
        },
        {
            "area_id": 6,
            "area_name": "辽宁",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "东北"
        },
        {
            "area_id": 7,
            "area_name": "吉林",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "东北"
        },
        {
            "area_id": 8,
            "area_name": "黑龙江",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "东北"
        },
        {
            "area_id": 9,
            "area_name": "上海",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华东"
        },
        {
            "area_id": 10,
            "area_name": "江苏",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华东"
        },
        {
            "area_id": 11,
            "area_name": "浙江",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华东"
        },
        {
            "area_id": 12,
            "area_name": "安徽",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华东"
        },
        {
            "area_id": 13,
            "area_name": "福建",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华南"
        },
        {
            "area_id": 14,
            "area_name": "江西",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华东"
        },
        {
            "area_id": 15,
            "area_name": "山东",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华东"
        },
        {
            "area_id": 16,
            "area_name": "河南",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华中"
        },
        {
            "area_id": 17,
            "area_name": "湖北",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华中"
        },
        {
            "area_id": 18,
            "area_name": "湖南",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华中"
        },
        {
            "area_id": 19,
            "area_name": "广东",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华南"
        },
        {
            "area_id": 20,
            "area_name": "广西",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华南"
        },
        {
            "area_id": 21,
            "area_name": "海南",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "华南"
        },
        {
            "area_id": 22,
            "area_name": "重庆",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西南"
        },
        {
            "area_id": 23,
            "area_name": "四川",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西南"
        },
        {
            "area_id": 24,
            "area_name": "贵州",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西南"
        },
        {
            "area_id": 25,
            "area_name": "云南",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西南"
        },
        {
            "area_id": 26,
            "area_name": "西藏",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西南"
        },
        {
            "area_id": 27,
            "area_name": "陕西",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西北"
        },
        {
            "area_id": 28,
            "area_name": "甘肃",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西北"
        },
        {
            "area_id": 29,
            "area_name": "青海",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西北"
        },
        {
            "area_id": 30,
            "area_name": "宁夏",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西北"
        },
        {
            "area_id": 31,
            "area_name": "新疆",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "西北"
        },
        {
            "area_id": 32,
            "area_name": "台湾",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "港澳台"
        },
        {
            "area_id": 33,
            "area_name": "香港",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "港澳台"
        },
        {
            "area_id": 34,
            "area_name": "澳门",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "港澳台"
        },
        {
            "area_id": 35,
            "area_name": "海外",
            "area_parent_id": 0,
            "area_sort": 0,
            "area_deep": true,
            "area_region": "海外"
        }
    ]
}
最后修改者: root  2019-03-05 09:18:43 

10-修改昵称

编号  :  10

POST - /api/member/updateNickname
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"member_id":1,"member_name":"中国人"}
token string Y
最后修改者: root  2019-02-26 15:45:06 

09-广告启动页获取

编号  :  09

POST - /api/startpage/getPageList
请求参数
参数名 参数类型 必传 缺省值 描述
返回值
{
    "success": true,
    "msg": "查询成功!",
    "data": [
        {
            "start_page_id": 3,
            "start_type": 1,
            "pic_url": "1550545858497967588.jpeg",
            "start_order": 2,
            "state": 1,
            "create_time": "2019-02-19T03:10:58.000+0000",
            "update_time": "2019-02-20T01:20:51.000+0000",
            "pic_site_url": "http://127.0.0.1/upload/image/small_1550545858497967588.jpeg"
        },
        {
            "start_page_id": 4,
            "start_type": 1,
            "pic_url": "1550546223282112414.jpeg",
            "start_order": 12,
            "state": 1,
            "create_time": "2019-02-19T03:17:03.000+0000",
            "update_time": null,
            "pic_site_url": "http://127.0.0.1/upload/image/small_1550546223282112414.jpeg"
        },
        {
            "start_page_id": 5,
            "start_type": 1,
            "pic_url": "1550546288102665195.jpeg",
            "start_order": 12,
            "state": 1,
            "create_time": "2019-02-19T03:18:08.000+0000",
            "update_time": null,
            "pic_site_url": "http://127.0.0.1/upload/image/small_1550546288102665195.jpeg"
        },
        {
            "start_page_id": 7,
            "start_type": 1,
            "pic_url": "1550546418072869887.png",
            "start_order": 13,
            "state": 1,
            "create_time": "2019-02-19T03:20:18.000+0000",
            "update_time": null,
            "pic_site_url": "http://127.0.0.1/upload/image/small_1550546418072869887.png"
        },
        {
            "start_page_id": 8,
            "start_type": 1,
            "pic_url": "1550546426436754146.png",
            "start_order": 13,
            "state": 1,
            "create_time": "2019-02-19T03:20:26.000+0000",
            "update_time": null,
            "pic_site_url": "http://127.0.0.1/upload/image/small_1550546426436754146.png"
        },
        {
            "start_page_id": 9,
            "start_type": 1,
            "pic_url": "1550547032972494771.jpeg",
            "start_order": 14,
            "state": 1,
            "create_time": "2019-02-19T03:30:33.000+0000",
            "update_time": null,
            "pic_site_url": "http://127.0.0.1/upload/image/small_1550547032972494771.jpeg"
        },
        {
            "start_page_id": 10,
            "start_type": 1,
            "pic_url": "1550628161522169505.jpeg",
            "start_order": 123,
            "state": 1,
            "create_time": "2019-02-20T02:02:41.000+0000",
            "update_time": null,
            "pic_site_url": "http://127.0.0.1/upload/image/small_1550628161522169505.jpeg"
        },
        {
            "start_page_id": 11,
            "start_type": 1,
            "pic_url": "1550628390539643160.png",
            "start_order": 12,
            "state": 1,
            "create_time": "2019-02-20T02:06:30.000+0000",
            "update_time": null,
            "pic_site_url": "http://127.0.0.1/upload/image/small_1550628390539643160.png"
        },
        {
            "start_page_id": 12,
            "start_type": 1,
            "pic_url": "1550768308422547145.jpeg",
            "start_order": 11,
            "state": 1,
            "create_time": "2019-02-21T03:38:09.000+0000",
            "update_time": "2019-02-21T03:58:28.000+0000",
            "pic_site_url": "http://127.0.0.1/upload/image/small_1550768308422547145.jpeg"
        }
    ]
}
最后修改者: root  2019-05-17 17:42:19 

08-Android下载信息接口

编号  :  08

POST - /api/sys/getAppInfo
参数 versionCode 为当前版本号
请求参数
参数名 参数类型 必传 缺省值 描述
_params json Y {"versionCode":"2"}
返回值
{
  "success": true,
  "msg": "查询成功!",
  "data": {
    "upgrade_name": null,
    "app_apk": "1111",
    "app_content": "11",
    "app_version": "22222",
    "version_code": "2",
    "app_type": 1,
    "app_force": 1,
    "is_latest": 1
  }
}
备注
`upgrade_name`  '名称',
  `app_apk`  '安装包地址',
  `app_content`  '更新内容',
  `app_version` '版本',
  `version_code`  '版本号code',
  `app_force`   '是否强制更新(0-否,1-是)',
   app_type  'app类型  1 Android 2 ios'
  `is_latest`    当前版本是否是最新 1 是最新  0 不是最新可以更新
最后修改者: root  2019-02-22 13:25:48 

00-移动端接口-加密说明--暂停

编号  :  00

POST -
1.请求参数_params都需要加密处理 2.返回数据是经过加密的字符串,需要解密后再使用,返回的加密字符串,增加了双引号,再解密前需要将双引号去除后,再解密,json数据格式 3.所有请求都是post 4.加密方式为:AES
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y 加密字符串
最后修改者: root  2019-03-05 14:01:07 

07-获取设备token-暂停用

编号  :  07

GET - /api/member/getDeviceToken
设备token-已经在登录时返回device_token, ch_cid--长虹统一账号系统用户ID
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"ch_cid":"10000049"}
返回值
{
    "success": true,
    "msg": "成功!",
    "data": {
        "ch_cid": "10000049",
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0YW8xLmppYW5nIiwidXNlciI6IjEwMDAwMDQ5In0.0xpjQ49AULVoImGKmg-95qVYF9hzJH2fWJFGBQkQC3Y"
    }
}
最后修改者: root  2019-03-05 09:18:32 

06-获取wifi设备列表

编号  :  06

POST - /api/member/getDevicelist
wifi设备列表是从云端获取,zigbee设备列表是从中控器获取 token 是设备中心的device_token,登录时,系统会返回device_token
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0YW8xLmppYW5nIiwidXNlciI6IjEwMDAwMDQ5In0.0xpjQ49AULVoImGKmg-95qVYF9hzJH2fWJFGBQkQC3Y"}
token string Y
返回值
{
	"success": true,
	"msg": "成功!",
	"data": [{
			"categoryid": "AIRCLEANER",
			"devid": "123107534512345678900812",
			"model": "KJ450F-E3N",
			"nickname": "空气净化器12",
			"secret": "",
			"sn": "123107534512345678900812",
			"status": "0",
			"network": null,
			"isIntegration": 0
		},
		{
			"categoryid": "AIRCONDITION",
			"devid": "123600544812345678900042",
			"model": "KFR-72LW/Q2F",
			"nickname": "Q2F",
			"secret": "",
			"sn": "123600544812345678900042",
			"status": "0",
			"network": "cloud/nb",
			"isIntegration": 1
		}
	]

}
最后修改者: root  2019-03-04 13:11:23 

05-找回密码

编号  :  05

POST - /api/login/resetPwdByPhone
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"member_mobile":"18030805290","member_passwd":"123456","captcha":"338039"}
返回值
{
    "success": true,
    "msg": "重置密码成功",
    "data": null
}
最后修改者: root  2019-03-04 13:11:38 

04-找回密码-获取验证码

编号  :  04

POST - /api/login/resetPwdGetValidCode
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"member_mobile":"18030805290"}
返回值
{
    "success": true,
    "msg": "验证码发送成功!",
    "data": null
}
最后修改者: root  2019-03-07 10:58:42 

03-登录

编号  :  03

POST - /api/login/login
http://47.93.197.229:8011/
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"member_mobile":"18030805290","member_passwd":"123456","device_sn":"123423243523"}
返回值
{
    "success": true,
    "msg": "登录成功",
    "data": {
        "member_id": 41,//用户id
        "member_name": "ac_2e4a979",
        "member_mobile": "18030805290",
        "address": null,
        "longitudes": null,
        "latitudes": null,
        "province_id": null,//省
        "city_id": null,//市
        "county_id": null,//区
        "member_type": null,//用户类型(主人-master、家人-family、访客-visitor)
        "token": "a47241155caecc1c4cceea6ab43b9f21",//登录token与统一账号token相同
        "device_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0YW8xLmppYW5nIiwidXNlciI6IjEwMDAwMDQ5In0.0xpjQ49AULVoImGKmg-95qVYF9hzJH2fWJFGBQkQC3Y",//设备中心token
        "ch_cid": "10000049",//统一账号系统中的用户ID
        "device_sn": "123423243523",//设备号imei
        "login_time": "2019-02-21 17:49:42",
        "state": 0,
        "create_time": "2019-02-21T08:23:15.000+0000",
        "update_time": "2019-02-21T09:47:02.000+0000",
        "getways": [
            {
                "id": 12,
                "entity_id": 1,
                "getway_id": "74b1a5adb0896cb3",//网关ID
                "getway_sn": "74b1a5adb0896cb3",
                "getway_mac": "00-00-00-00-00-01",//mac地址
                "getway_ch_sn": "HGA123456710000903070002",//长虹设备端使用的sn号
                "master_id": 41,//member_id
                "machine_version": "Apollo Pro V1.0",//硬件版本号
                "soft_version": "version 1.0.0",//软件版本号
                "is_update": 0,
                "area_province": null,
                "area_city": null,
                "area": null,
                "address": null,
                "village": "未知",
                "bind_num": 0,//绑定设备数
                "member_num": 0,//绑定用户数
                "QRcode": null,
                "QRcode_time": null,
                "getway_state": 2,//网关状态:1-激活 2-绑定
                "state": 0,//
                "create_time": "2019-03-07T01:55:48.000+0000",
                "update_time": "2019-03-07T01:56:06.000+0000"
            }
        ]
    }
}
最后修改者: root  2019-03-04 13:12:20 

02-注册保存

编号  :  02

POST - /api/login/registSave
device_sn 设备号 imei captcha 验证码
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"device_sn":"332398238","member_name":"18030805290","member_mobile":"18030805290","member_passwd":"123456","captcha":"489988"}
token string Y 67822961bd3f1c554e4ba202cd70ab93
返回值
{
	"success": true,
	"msg": "注册成功!",
	"data": {
		"userToken": "17a2c369a20",
		"cid": "82382",
		"email": "abc@changhong.com",
		"phone": ""
	}
}
最后修改者: root  2019-03-04 13:12:59 

01-注册-获取验证码

编号  :  01

POST - /api/login/registGetValidCode
统一地址:http://47.93.197.229:8011
请求参数
参数名 参数类型 必传 缺省值 描述
_params string Y {"member_mobile":"18030805290"}
token string Y 67822961bd3f1c554e4ba202cd70ab93
返回值
{
    "success": false,
    "msg": "手机号已注册",
    "data": null
}