| | |
| | | public class PirSend |
| | | { |
| | | |
| | | public static string pirId = "1367032976869658625"; |
| | | /// <summary> |
| | | /// 住宅ID |
| | | /// </summary> |
| | |
| | | /// 自学按键删除 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static ResponsePackNew CodeRemove(AttributesStatus buttonObj) |
| | | public static ResponsePackNew CodeRemove(AttributesStatus buttonObj,string deviceId) |
| | | { |
| | | var job = new JObject { }; |
| | | job.Add("key", buttonObj.key); |
| | |
| | | job.Add("value", valuejArray); |
| | | var jArray = new JArray { }; |
| | | jArray.Add(job); |
| | | var jObject = new JObject { { "homeId", HomeId }, { "deviceId", pirId }, { "attributes", jArray } }; |
| | | var jObject = new JObject { { "homeId", HomeId }, { "deviceId", deviceId }, { "attributes", jArray } }; |
| | | var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_CodeRemove); |
| | | return responsePackNew; |
| | | } |
| | |
| | | return responsePackNew; |
| | | } |
| | | /// <summary> |
| | | /// 修改红外宝名称 |
| | | /// 修改红外宝/设备名称 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static ResponsePackNew DeviceRename(Pir pir) |
| | | public static ResponsePackNew DeviceRename(string deviceId,string name) |
| | | { |
| | | var jObject = new JObject { { "homeId", HomeId }, { "deviceId", pir.deviceId }, { "name", pir.name } }; |
| | | var jObject = new JObject { { "homeId", HomeId }, { "deviceId", deviceId }, { "name", name} }; |
| | | var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_DeviceRename); |
| | | return responsePackNew; |
| | | } |