using System;
using Newtonsoft.Json.Linq;
namespace ZigBee.Device
{
[System.Serializable]
public class CurtainBase : CommonDevice
{
#region 开关
///
///窗帘开关停控制
/// command的值
///0 : 窗帘设备上拉或打开窗帘
///1: 窗帘设备下降或关闭窗帘
///2:窗帘设备停止窗帘转动
///
public void CurtainUpDownStopControl(int command)
{
var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 258 }, { "Command", command }, { "SendMode", 2 } };
Gateway?.Send("DeviceControl", jobject.ToString());
System.Console.WriteLine("CurtainOpenControl_发送数据" + "_" + jobject.ToString() + "_" + System.DateTime.Now.ToString());
}
#endregion
///
/// 读取窗帘设备类型
/// AttriButeId=0 (先调用发现属性接口,查看设备是否支持该接口的属性)
/// 0:卷帘
/// 4:开合帘
///
public void ReadWcdType()
{
ReadAttri(Device.Cluster_ID.WindowCovering, AttriButeId.WindowCoveringType);
}
}
}