| | |
| | | { |
| | | await SetAirerTimeAsync(time, controlEpoint); |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 开关 |
| | | ///<summary > |
| | | ///开关控制(仅用于cluster=6的设备) |
| | | /// <para>设备支持cluster=6的设备才能调用该接口</para> |
| | | /// <para>command的值</para> |
| | | ///<para>0 : 关闭</para> |
| | | ///<para>1: 打开</para> |
| | | ///<para>2:取反</para> |
| | | /// </summary> |
| | | public void SwitchControl(int command, int ctrlEpoint) |
| | | { |
| | | try |
| | | { |
| | | var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", ctrlEpoint }, { "Cluster_ID", 6 }, { "Command", command }, { "SendMode", 2 } }; |
| | | Gateway?.Send(("DeviceControl"), jobject.ToString()); |
| | | System.Console.WriteLine("SwitchControl_发送数据" + "_" + jobject.ToString() + "_" + System.DateTime.Now.ToString()); |
| | | |
| | | } |
| | | catch { } |
| | | } |
| | | #endregion |
| | | } |
| | | } |