| | |
| | | //如果当前是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return TemplateData.TemplateDeviceDataLogic.Current.GetPanelColorInfo(device, keyNum);
|
| | | return ModelData.DeviceModelDataLogic.Current.GetPanelColorInfo(device, keyNum);
|
| | | }
|
| | | //发送数据 keyNum转为16进制 范围:01~10
|
| | | var passData = "0504040101" + Convert.ToString((int)keyNum, 16).ToUpper().PadLeft(2, '0');
|
| | |
| | | //如果当前是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return TemplateData.TemplateDeviceDataLogic.Current.SetPanelColorInfo(device, keyColorData, keyNumStatus, null);
|
| | | return ModelData.DeviceModelDataLogic.Current.SetPanelColorInfo(device, keyColorData, keyNumStatus, "ZbDataPassthrough");
|
| | | }
|
| | | //获取配置按键指示灯颜色的命令字符
|
| | | var sendData = this.GetPanelColorCommandText(device.DeviceAddr, keyColorData, keyNumStatus);
|
| | |
| | | var tempD = new CommonDevice.ResponseData();
|
| | | tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString();
|
| | | tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16);
|
| | |
|
| | | //添加缓存
|
| | | TemplateData.TemplateDeviceDataLogic.Current.SetPanelColorInfo(device, keyColorData, keyNumStatus, result.JsonData[0]);
|
| | |
|
| | | return new CommonDevice.ResponseAllData { responseData = tempD };
|
| | | }
|
| | |
|
| | |
| | | //如果当前是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return TemplateData.TemplateDeviceDataLogic.Current.GetDeviceLightSettion(device);
|
| | | return ModelData.DeviceModelDataLogic.Current.GetDeviceLightSettion(device);
|
| | | }
|
| | | //获取发送的命令字符
|
| | | var passData = "050604010101";
|
| | |
| | | //如果当前是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return TemplateData.TemplateDeviceDataLogic.Current.SetDeviceLightSettion(device, directionsLevel, backlightLevel, null);
|
| | | return ModelData.DeviceModelDataLogic.Current.SetDeviceLightSettion(device, directionsLevel, backlightLevel, "ZbDataPassthrough");
|
| | | }
|
| | | //获取修改面板的亮度调节的命令字符
|
| | | var sendData = this.GetPanelLevelCommadText(device.DeviceAddr, directionsLevel, backlightLevel);
|
| | |
| | | }
|
| | |
|
| | | //修改缓存
|
| | | TemplateData.TemplateDeviceDataLogic.Current.SetDeviceLightSettion(device, directionsLevel, backlightLevel, result.JsonData[0]);
|
| | | ModelData.DeviceModelDataLogic.Current.SetDeviceLightSettion(device, directionsLevel, backlightLevel, "ZbDataPassthrough");
|
| | |
|
| | | return true;
|
| | | }
|
| | |
| | | //如果当前住宅是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return TemplateData.TemplateDeviceDataLogic.Current.GetDeviceEnergyConservationMode(device);
|
| | | return ModelData.DeviceModelDataLogic.Current.GetDeviceEnergyConservationMode(device);
|
| | | }
|
| | | //发送命令
|
| | | string passData = "050804010101";
|
| | |
| | | //如果当前是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return TemplateData.TemplateDeviceDataLogic.Current.SetDeviceEnergyConservationMode(device, modeEnable, modeTime, level, null);
|
| | | return ModelData.DeviceModelDataLogic.Current.SetDeviceEnergyConservationMode(device, modeEnable, modeTime, level, "ZbDataPassthrough");
|
| | | }
|
| | | //获取设置设备的节能模式的命令字符
|
| | | var sendData = this.GetDeviceEnergyConservationModeCommandText(device.DeviceAddr, modeEnable, modeTime, level);
|
| | |
| | | }
|
| | |
|
| | | //修改缓存
|
| | | TemplateData.TemplateDeviceDataLogic.Current.SetDeviceEnergyConservationMode(device, modeEnable, modeTime, level, result.JsonData[0]);
|
| | | ModelData.DeviceModelDataLogic.Current.SetDeviceEnergyConservationMode(device, modeEnable, modeTime, level, "ZbDataPassthrough");
|
| | |
|
| | | return true;
|
| | | }
|
| | |
| | | //如果是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return TemplateData.TemplateDeviceDataLogic.Current.GetPanelVibrationInfo(device);
|
| | | return ModelData.DeviceModelDataLogic.Current.GetPanelVibrationInfo(device);
|
| | | }
|
| | | //发送数据
|
| | | var jObject = new Newtonsoft.Json.Linq.JObject { { "DeviceAddr", device.DeviceAddr }, { "Epoint", 200 }, { "Cluster_ID", 64513 }, { "Command", 0 } };
|
| | |
| | | //如果是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return TemplateData.TemplateDeviceDataLogic.Current.SetPanelVibrationInfo(device, datainfo, null);
|
| | | return ModelData.DeviceModelDataLogic.Current.SetPanelVibrationInfo(device, datainfo, "ClientDataPassthrough");
|
| | | }
|
| | | //获取编辑面板震动功能的命令字符
|
| | | var sendData = this.GetPanelVibrationCommandText(device.DeviceAddr, datainfo);
|
| | |
| | | this.ShowTipMsg(errorMsg);
|
| | | return false;
|
| | | }
|
| | | //添加缓存
|
| | | TemplateData.TemplateDeviceDataLogic.Current.SetPanelVibrationInfo(device, datainfo, result.JsonData[0]);
|
| | |
|
| | | return true;
|
| | | }
|
| | |
|
| | |
| | | private void LoadDryContactFunctionFromLocaltion()
|
| | | {
|
| | | this.dicDryContactFunction = new Dictionary<string, DryContactFunctionInfo>();
|
| | |
|
| | | byte[] filebyte = HdlFileLogic.Current.ReadFileByteContent(DirNameResourse.DryContactFunctionFile);
|
| | | if (filebyte == null)
|
| | | {
|