| | |
| | | /// <param name="qType">时间查询类型:hour=近24小时、week=近一周、month = 近一月 </param> |
| | | /// <param name="deviceId">设备ID</param> |
| | | /// <param name="deviceKey">功能查询类型:pm25</param> |
| | | /// <param name="time">具体查询的日期,金茂温控器使用</param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetSensorHistory(string qType, string deviceId, string deviceKey, string time = "") |
| | | { |
| | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectDevice, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 设备扩展配置 |
| | | /// </summary> |
| | | public ResponsePackNew DeviceExtSet(string deviceId,ExtSet extSet) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId ); |
| | | d.Add("extSet", extSet); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeviceExtSet, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 获取设备消息规则配置 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetDeviceMessageRulesSet(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_GetDeviceMessageRulesSet, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 设备消息规则配置 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="conditionIdentify"></param> |
| | | /// <param name="push"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew DeviceMessageRulesSet(string deviceId,string conditionIdentify,bool push) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("conditionIdentify", conditionIdentify); |
| | | d.Add("push", push); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeviceMessageRulesSet, requestJson); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |