| | |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoorlockUserList, requestJson); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 修改门锁用户备注 |
| | | /// </summary> |
| | |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_setDoorUserRemark, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除门锁用户数字密码 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="lockUserIndex"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew DeleteDoorlockUserNumberPassword(string deviceId, string lockUserIndex) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("lockUserIndex", lockUserIndex); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_NumberPassword, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除门锁用户卡密码 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="lockUserIndex"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew DeleteDoorlockUserCardPassword(string deviceId, string lockUserIndex) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("lockUserIndex", lockUserIndex); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteCardPassword, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除门锁用户指纹密码 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="lockUserIndex"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew DeleteDoorlockUserFingerPassword(string deviceId, string lockUserIndex) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("lockUserIndex", lockUserIndex); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteFingerPassword, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除门锁用户人脸密码 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="lockUserIndex"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew DeleteDoorlockUserFacePassword(string deviceId, string lockUserIndex) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("lockUserIndex", lockUserIndex); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteFacePassword, requestJson); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 删除门锁用户 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="lockUserIndex"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew DeleteDoorlockUser(string deviceId, string lockUserIndex) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("lockUserIndex", lockUserIndex); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteUser, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询按键两次开门 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetDoubleClickOpenDoorSwitch(string deviceId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoubleClickOpenDoorSwitch, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 设置按键两次开门 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="enabled">按键两次开门开关 0-关闭,1次按键开门 1-开启,2次按键开门</param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew SetDoubleClickOpenDoorSwitch(string deviceId,int enabled) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("enabled", enabled); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDoubleClickOpenDoorSwitch, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询童锁开关 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetChildLockSwitch(string deviceId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetChildLockSwitch, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 设置童锁开关 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="enabled">童锁开关 0-关闭 1-开启</param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew SetChildLockSwitch(string deviceId, int enabled) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("enabled", enabled); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetChildLockSwitch, requestJson); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 查询反锁配置 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetAntiLockCfg(string deviceId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetAntiLockCfg, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 设置反锁配置 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="enabled"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew SetAntiLockCfg(string deviceId, bool enabled) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("enabled", enabled); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetAntiLockCfg, requestJson); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 查询布撤防状态 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetDefenceStatus(string deviceId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDefenceStatus, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 设置布撤防状态 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="armStatus">布防状态 disarmed-撤防 armed-已布防</param> |
| | | /// <param name="defenceMode">布防模式 global-全局 atHome-在家 outDoor-外出 sleep-睡眠</param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew SetDefenceStatus(string deviceId, bool defance)//,string defenceMode) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | if(defance) |
| | | d.Add("armStatus", "armed"); |
| | | else |
| | | d.Add("armStatus", "disarmed"); |
| | | d.Add("defenceMode", "global"); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDefenceStatus, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询人脸开锁配置 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetFaceUnlockCfg(string deviceId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetFaceRecognitionUnlockCfg, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 设置人脸开锁配置 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="enabled"></param> |
| | | /// <param name="mode">解锁方式 0-自动 1-手动</param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew SetFaceUnlockCfg(string deviceId, bool enabled,int mode) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("enabled", enabled); |
| | | d.Add("mode", mode);//解锁方式 0-自动 1-手动 |
| | | d.Add("sensitivity", 0);//灵敏度 0-高 1-低 |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetFaceRecognitionUnlockCfg, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询门锁系统声音 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetDoorLockSystemSound(string deviceId) |
| | | { |
| | | var d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoorLockSystemSound, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置门锁系统声音 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="sound"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew SetDoorLockSystemSound(string deviceId,int sound) |
| | | { |
| | | var d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("sound", sound); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDoorLockSystemSound, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询门铃提示音 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetDoorBellTone(string deviceId) |
| | | { |
| | | var d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoorBellTone, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置门铃提示音 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="volume"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew SetDoorBellTone(string deviceId, int volume) |
| | | { |
| | | var d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("volume", volume); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDoorBellTone, requestJson); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |