BUG修复
1.场景增加插座功能
2.rgb配合zb调整
3.场景控制只发送一次。
| | |
| | | <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs"> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/MainPage.cs"> |
| | | <Files> |
| | | <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="12" Column="26" /> |
| | | <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs" /> |
| | | <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs" /> |
| | | <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs" Line="100" Column="16" /> |
| | | <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="87" /> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="1142" Column="38" /> |
| | | <File FileName="HDL_ON/UI/UI2/UserPage.cs" Line="1" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" Line="880" Column="6" /> |
| | | <File FileName="HDL_ON/Entity/Function/Function.cs" Line="1575" Column="25" /> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="832" Column="30" /> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" Line="224" Column="50" /> |
| | | <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="79" Column="30" /> |
| | | <File FileName="HDL_ON/UI/MainPage.cs" Line="111" Column="27" /> |
| | | </Files> |
| | | <Pads> |
| | | <Pad Id="ProjectPad"> |
| | | <State name="__root__"> |
| | | <Node name="HDL_APP_Project" expanded="True"> |
| | | <Node name="HDL_ON" expanded="True"> |
| | | <Node name="Common" expanded="True" /> |
| | | <Node name="DAL" expanded="True"> |
| | | <Node name="DriverLayer" expanded="True" /> |
| | | <Node name="Server" expanded="True" /> |
| | | </Node> |
| | | <Node name="Entity" expanded="True"> |
| | | <Node name="ResponseEntity" expanded="True" /> |
| | | <Node name="Function" expanded="True" /> |
| | | </Node> |
| | | <Node name="UI" expanded="True"> |
| | | <Node name="UI0-Public" expanded="True" /> |
| | | <Node name="UI2" expanded="True"> |
| | | <Node name="3-Intelligence" expanded="True"> |
| | | <Node name="Automation" expanded="True"> |
| | | <Node name="LogicView" expanded="True"> |
| | | <Node name="TopView.cs" selected="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="FuntionControlView" expanded="True"> |
| | | <Node name="Curtain" expanded="True" /> |
| | | <Node name="FoolHeating" expanded="True" /> |
| | | </Node> |
| | | <Node name="4-PersonalCenter" expanded="True" /> |
| | | </Node> |
| | | <Node name="MainPage.cs" selected="True" /> |
| | | </Node> |
| | | </Node> |
| | | <Node name="HDL-ON_iOS" expanded="True" /> |
| | |
| | | <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> |
| | | <String>Shared.IOS/Shared.IOS.csproj</String> |
| | | </DisabledProjects> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" /> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> |
| | | <MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <BreakpointStore> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="1415" column="1" /> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202110281" android:versionName="1.2.202110281" package="com.hdl.onpro"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202111031" android:versionName="1.3.202111031" package="com.hdl.onpro"> |
| | | <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" /> |
| | | <!-- 乐橙可视对讲需要的权限 --> |
| | | <!--<uses-permission android:name="android.permission.INTERNET" />--> |
| | |
| | | return _control; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 记录接收到的消息,方便zb的工程师调试他们的设备 |
| | | /// </summary> |
| | | public List<string> MsgInfoList = new List<string>(); |
| | | |
| | | int _msg_id = 1; |
| | | /// <summary> |
| | | /// 通讯ID |
| | |
| | | /// <param name="function"></param> |
| | | /// <param name="useRemote">是否直接使用远程发送</param> |
| | | /// <returns></returns> |
| | | public void SendWriteCommand(Function function, Dictionary<string, string> commandDictionary, bool useRemote = false) |
| | | public void SendWriteCommand(Function function, Dictionary<string, string> commandDictionary, bool useRemote = false,int resend = 3) |
| | | { |
| | | function.controlCounter++; |
| | | function.refreshTime = DateTime.Now; |
| | |
| | | var functionControlDataObj = function.GetGatewayAlinkControlData(commandDictionary); |
| | | var functionControlDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(functionControlDataObj); |
| | | var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlFunctionTopic, functionControlDataJson); |
| | | new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id); |
| | | new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id,resend); |
| | | MainPage.Log($"本地通讯 发送HDL-Link数据:{functionControlDataJson}"); |
| | | } |
| | | } |
| | |
| | | }; |
| | | var aLinkJson = Newtonsoft.Json.JsonConvert.SerializeObject(aLinkData); |
| | | var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlScene, aLinkJson); |
| | | new Control_Udp().SendLocalHdlLinkData(sendBytes, aLinkData.id); |
| | | new Control_Udp().SendLocalHdlLinkData(sendBytes, aLinkData.id,0); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | var revString = Encoding.UTF8.GetString(receiveBytes); |
| | | receiveObj.BodyDataString = revString; |
| | | MainPage.Log($"局域网信息: 解密后:" + receiveObj.BodyDataString); |
| | | if(receiveObj.Topic.EndsWith("/thing/property/up")) |
| | | { |
| | | MsgInfoList.Add(revString + "\r\n"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <summary> |
| | | /// 发送udp A协议数据 |
| | | /// </summary> |
| | | public void SendLocalHdlLinkData(byte[] sendBytes,string id, bool isWait=false) |
| | | public void SendLocalHdlLinkData(byte[] sendBytes,string id, int resend = 3) |
| | | { |
| | | packet = new Packet(sendBytes, new System.Net.IPEndPoint(System.Net.IPAddress.Parse(Control.Ins.reportIp), 8585)); |
| | | packet.HaveSendCount = 3 - resend;//重发次数 |
| | | sendFlag = id; |
| | | System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(managerSendCount)); |
| | | thread.IsBackground = true; |
| | | thread.Start(packet); |
| | | if (isWait) |
| | | { |
| | | wait(); |
| | | } |
| | | //if (isWait) |
| | | //{ |
| | | // wait(); |
| | | //} |
| | | MainPage.Log($"发送Hdl-Link数据,IP:{Control.Ins.reportIp}:8585"); |
| | | } |
| | | } |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | /// <summary> |
| | | /// RegionMark |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "1.2.1028"; |
| | | public static string VersionString = "1.3.1103"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
| | |
| | | SPK.FloorHeatStandard,SPK.HvacFloorHeat, |
| | | SPK.AirFreshStandard,SPK.HvacAirFresh, |
| | | SPK.AirSwitch, |
| | | SPK.PanelSocket,SPK.ElectricSocket, |
| | | }; |
| | | |
| | | |
| | |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.DriverLayer; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | #endregion |
| | | |
| | | #region 获取支持 |
| | | //FrameLayout supView = new FrameLayout() |
| | | //{ |
| | | // Height = Application.GetRealWidth(44), |
| | | //}; |
| | | //supportView.AddChidren(supView); |
| | | FrameLayout supView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealWidth(44), |
| | | BackgroundColor = 0xFFFF0000, |
| | | }; |
| | | supportView.AddChidren(supView); |
| | | supView.MouseUpEventHandler = (sender, e) => { |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | var bodyView = new FrameLayout(); |
| | | dialog.AddChidren(bodyView); |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(600), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | var btnClose = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(600), |
| | | Height = Application.GetRealHeight(67), |
| | | BackgroundColor = CSS_Color.WarningColor, |
| | | Text = "关 闭", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | }; |
| | | btnClose.MouseUpEventHandler = (sender, e) => { |
| | | dialog.Close(); |
| | | }; |
| | | bodyView.AddChidren(btnClose); |
| | | |
| | | foreach (var msg in Control.Ins.MsgInfoList) |
| | | { |
| | | var et = new TextView() |
| | | { |
| | | IsMoreLines = true, |
| | | Height = Application.GetRealHeight(150), |
| | | Width = Application.GetRealWidth(300), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = msg, |
| | | }; |
| | | contentView.AddChidren(et); |
| | | } |
| | | |
| | | dialog.Show(); |
| | | }; |
| | | |
| | | //Button btnSupportIcon = new Button() |
| | | //{ |
| | |
| | | public override void InitFrameWhiteContent() |
| | | { |
| | | |
| | | var sk = device.GetAttribute(FunctionAttributeKey.SetTemp); |
| | | if (sk != null) |
| | | { |
| | | if (sk.min == 0) |
| | | { |
| | | sk.min = 16; |
| | | } |
| | | if (sk.max == 0) |
| | | { |
| | | sk.max = 32; |
| | | } |
| | | } |
| | | |
| | | base.ShowColltionButton = false; |
| | | base.SetTitleText(Language.StringByID(StringId.Electric)); |
| | | |
| | |
| | | void LoadColorChangeEvent() |
| | | { |
| | | DateTime colorChangeTime = DateTime.MinValue; |
| | | //bool send = false; |
| | | |
| | | //当前点击的【点】是否正确 |
| | | bool pointIsRight = false; |
| | |
| | | //pointIsRight:点的区域不是圆盘内 |
| | | return; |
| | | } |
| | | lastColor = e2; |
| | | //if (send) |
| | | //{ |
| | | lastColor = e2; |
| | | // send = false; |
| | | //} |
| | | }; |
| | | |
| | | //colorPicker.MouseUpEventHandler += (sender, e) => { |
| | | // send = true; |
| | | //}; |
| | | |
| | | colorPicker.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | if (function.trait_on_off.curValue.ToString() == "off") |
| | |
| | | lightTemp.SetRGBcolor(lastColor, function); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.RGB, lightTemp.GetRGBcolorString(function)); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | Control.Ins.SendWriteCommand(function, d,false,0); |
| | | break; |
| | | } |
| | | } |