| | |
| | | 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 |
| | | |
| | | #endregion |