| | |
| | | d.Add("type", qType); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId ); |
| | | d.Add("key", "value" ); |
| | | d.Add("key", deviceKey ); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_EnvironmentalSensorHistoricalData, requestJson); |
| | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_ArmSensorHistoricalData, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 读取最近一个月的数据 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetLastMonthHistory(string deviceId,string key) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("key", key); |
| | | |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_SensorLastMonthHistoricalData, requestJson); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | |
| | | MainPage.cityInfo.pm25 = jt.GetValue("Air_Quality").ToString(); |
| | | MainPage.cityInfo.windLevel = jt.GetValue("WindLevel").ToString(); |
| | | MainPage.cityInfo.weather = jt.GetValue("Weather").ToString(); |
| | | MainPage.cityInfo.lowestTemperature = jt.GetValue("lowestTemperature").ToString(); |
| | | MainPage.cityInfo.highestTemperature = jt.GetValue("highestTemperature").ToString(); |
| | | |
| | | break; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("productPlatform", productPlatform); |
| | | d.Add("productBrand", productBrand); |
| | | d.Add("networkConfig", true); |
| | | if (productBrand != "MegaHealth") |
| | | { |
| | | d.Add("networkConfig", true); |
| | | } |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieList, requestJson); |
| | |
| | | d.Add("productBrand", productBrand); |
| | | d.Add("networkConfig", true); |
| | | |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyBrandDevcieList, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 注册第三方设备 |
| | | /// </summary> |
| | | /// <param name="productPlatform"></param> |
| | | /// <param name="productBrand"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew IndependentRegister3TyDevcie(string spk,string extDevId,string deviceName) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("spk", spk); |
| | | d.Add("extDevId", extDevId); |
| | | d.Add("name", deviceName); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_IndependentRegister3TyDevcie, requestJson); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取设备详情 |