| | |
| | | { |
| | | new System.Threading.Thread(() => |
| | | { |
| | | foreach (var temp in functions) |
| | | foreach (var function in functions) |
| | | { |
| | | Dictionary<string, string> d1 = new Dictionary<string, string>(); |
| | | d1.Add(FunctionAttributeKey.OnOff, open ? "on" : "off"); |
| | | SendWriteCommand(temp, d1); |
| | | if (function.spk == SPK.PanelSocket) |
| | | { |
| | | if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null) |
| | | { |
| | | d1.Add("on_off_usb", function.trait_on_off.curValue.ToString()); |
| | | } |
| | | } |
| | | SendWriteCommand(function, d1); |
| | | System.Threading.Thread.Sleep(100); |
| | | } |
| | | }) |
| | |
| | | var revString = Encoding.UTF8.GetString(receiveBytes); |
| | | receiveObj.BodyDataString = revString; |
| | | MainPage.Log($"局域网信息: 解密后:" + receiveObj.BodyDataString); |
| | | //if(receiveObj.Topic.EndsWith("/thing/property/up")) |
| | | //if (receiveObj.Topic.EndsWith("/thing/property/up")) |
| | | //{ |
| | | // MsgInfoList.Add(revString + "\r\n"); |
| | | //} |
| | |
| | | case SPK.ElectricSocket: |
| | | case SPK.PanelSocket: |
| | | SocketPage.UpdataState(localFunction); |
| | | SocketPage_InstantaneousValue.UpdataView(localFunction); |
| | | break; |
| | | case SPK.ElectricTV: |
| | | break; |