| | |
| | | public static ResponsePackNew GetTimerList () |
| | | { |
| | | var jObject = new JObject { }; |
| | | jObject.Add ("gatewayId", Int64.Parse (GatewayId)); |
| | | jObject.Add ("homeId", Int64.Parse (HomeId)); |
| | | jObject.Add ("gatewayId", GatewayId); |
| | | jObject.Add ("homeId", HomeId); |
| | | jObject.Add ("pageSize", 1000); |
| | | jObject.Add ("pageNo", 1); |
| | | |
| | | var responsePackNew = RequestServerhomeId (jObject, API.GetTimerList); |
| | | return responsePackNew; |
| | | } |
| | |
| | | } |
| | | |
| | | var deviceDateJObject = new JObject { }; |
| | | deviceDateJObject.Add ("gatewayId", Int64.Parse (GatewayId)); |
| | | deviceDateJObject.Add ("homeId", Int64.Parse (HomeId)); |
| | | deviceDateJObject.Add ("gatewayId", GatewayId); |
| | | deviceDateJObject.Add ("homeId", HomeId); |
| | | var funjArray = new JArray { }; |
| | | for (int i = 0; i < timer.controlData.actions.Count; i++) { |
| | | var fun = timer.controlData.actions [i]; |
| | |
| | | deviceDateJObject.Add ("actions", funjArray); |
| | | |
| | | var jObject = new JObject { }; |
| | | jObject.Add ("gatewayId", Int64.Parse (GatewayId)); |
| | | jObject.Add ("homeId", Int64.Parse (HomeId)); |
| | | jObject.Add ("gatewayId", GatewayId); |
| | | jObject.Add ("homeId", HomeId); |
| | | jObject.Add ("timerName", timer.timerName); |
| | | jObject.Add ("room", timer.RoomName); |
| | | jObject.Add ("isEnable", timer.isEnable); |
| | | jObject.Add ("executeUtcTime", Method.GetUtcTime (timer.executeUtcTime)); |
| | | jObject.Add ("controlData", deviceDateJObject); |
| | |
| | | } |
| | | |
| | | var deviceDateJObject = new JObject { }; |
| | | deviceDateJObject.Add ("gatewayId", Int64.Parse (GatewayId)); |
| | | deviceDateJObject.Add ("homeId", Int64.Parse (HomeId)); |
| | | deviceDateJObject.Add ("gatewayId", GatewayId); |
| | | deviceDateJObject.Add ("homeId", HomeId); |
| | | var funjArray = new JArray { }; |
| | | for (int i = 0; i < timer.controlData.actions.Count; i++) { |
| | | var fun = timer.controlData.actions [i]; |
| | |
| | | deviceDateJObject.Add ("actions", funjArray); |
| | | |
| | | var jObject = new JObject { }; |
| | | jObject.Add ("gatewayId", Int64.Parse (GatewayId)); |
| | | jObject.Add ("homeId", Int64.Parse (HomeId)); |
| | | jObject.Add ("gatewayId", GatewayId); |
| | | jObject.Add ("homeId", HomeId); |
| | | jObject.Add ("id", timer.id); |
| | | jObject.Add ("timerName", timer.timerName); |
| | | jObject.Add ("room", timer.RoomName); |
| | | jObject.Add ("isEnable", timer.isEnable); |
| | | jObject.Add ("executeUtcTime", Method.GetUtcTime (timer.executeUtcTime)); |
| | | jObject.Add ("controlData", deviceDateJObject); |
| | |
| | | { |
| | | var jObject = new JObject { }; |
| | | jObject.Add ("id", Int64.Parse (id)); |
| | | jObject.Add ("gatewayId", Int64.Parse (GatewayId)); |
| | | jObject.Add ("homeId", Int64.Parse (HomeId)); |
| | | jObject.Add ("gatewayId", GatewayId); |
| | | jObject.Add ("homeId", HomeId); |
| | | var responsePackNew = RequestServerhomeId (jObject, API.DeleteTimer); |
| | | return responsePackNew; |
| | | } |
| | |
| | | |
| | | var jObject = new JObject { }; |
| | | jObject.Add ("id", timer.id); |
| | | jObject.Add ("gatewayId", Int64.Parse (GatewayId)); |
| | | jObject.Add ("homeId", Int64.Parse (HomeId)); |
| | | jObject.Add ("gatewayId", GatewayId); |
| | | jObject.Add ("homeId", HomeId); |
| | | var responsePackNew = RequestServerhomeId (jObject, API.IsEnableTimer); |
| | | return responsePackNew; |
| | | } |