From c2f74dd7b1df9829385c8fa7fcff860f6a5aae1f Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 12 七月 2024 14:23:40 +0800
Subject: [PATCH] Merge branch 'Wxr-UnuitTest' into Dev_v2.4.8_google
---
SiriIntents/SiriIntents.csproj | 4
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs | 2
HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 11 +
DLL/IOS/HDL.Shared.IOS.ScanQRCode.dll | 0
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs | 2
DLL/Aliyun.Api.LogService.dll | 0
HDL-ON_iOS/HDL-ON_iOS.csproj | 28 ++
HDL_ON/Common/AliyunLog/AliyunLogInvokeAsync.cs | 173 +++++++++++++++++++
HDL_ON/Common/AliyunLog/AliyunLogClient.cs | 160 +++++++++++++++++
HDL-ON_iOS/Assets.xcassets/preview_stopplay_btn .imageset/Contents.json | 1
DLL/Android/HdlEzvizDroid.dll | 0
HDL_ON/DAL/DriverLayer/Control_Udp.cs | 40 ++--
HDL_ON/HDL_ON.projitems | 2
HDL_ON/Entity/Function/Sensor.cs | 4
/dev/null | 0
HDL-ON_iOS/Info.plist | 4
HDL_ON/DAL/Server/HttpUtil.cs | 8
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs | 2
HDL_ON/DAL/DriverLayer/Control.cs | 11 +
HDL_ON/UI/MainPage.cs | 10 +
SiriIntentsUI/SiriIntentsUI.csproj | 6
HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs | 17 +
SiriIntents/Server/HttpUtil.cs | 4
23 files changed, 442 insertions(+), 47 deletions(-)
diff --git a/DLL/Aliyun.Api.LogService.dll b/DLL/Aliyun.Api.LogService.dll
new file mode 100644
index 0000000..6021ab8
--- /dev/null
+++ b/DLL/Aliyun.Api.LogService.dll
Binary files differ
diff --git a/DLL/HdlEzvizDroid.dll b/DLL/Android/HdlEzvizDroid.dll
similarity index 91%
rename from DLL/HdlEzvizDroid.dll
rename to DLL/Android/HdlEzvizDroid.dll
index 6e4edec..0f2639a 100644
--- a/DLL/HdlEzvizDroid.dll
+++ b/DLL/Android/HdlEzvizDroid.dll
Binary files differ
diff --git a/DLL/IOS/HDL.Shared.IOS.ScanQRCode.dll b/DLL/IOS/HDL.Shared.IOS.ScanQRCode.dll
index 8d81fa4..47131dd 100644
--- a/DLL/IOS/HDL.Shared.IOS.ScanQRCode.dll
+++ b/DLL/IOS/HDL.Shared.IOS.ScanQRCode.dll
Binary files differ
diff --git a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/12422688.png b/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/12422688.png
deleted file mode 100644
index b588e7a..0000000
--- a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/12422688.png
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/1792828.png b/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/1792828.png
deleted file mode 100644
index 3a7131a..0000000
--- a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/1792828.png
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/26881242.png b/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/26881242.png
deleted file mode 100644
index a713003..0000000
--- a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/26881242.png
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/8281792.png b/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/8281792.png
deleted file mode 100644
index 0e6e665..0000000
--- a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/8281792.png
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_iOS/Assets.xcassets/preview_stopplay_btn .imageset/Contents.json b/HDL-ON_iOS/Assets.xcassets/preview_stopplay_btn .imageset/Contents.json
index 1958f48..d7aabbd 100644
--- a/HDL-ON_iOS/Assets.xcassets/preview_stopplay_btn .imageset/Contents.json
+++ b/HDL-ON_iOS/Assets.xcassets/preview_stopplay_btn .imageset/Contents.json
@@ -11,7 +11,6 @@
"scale" : "2x"
},
{
- "filename" : "preview_stopplay_btn @3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 87c716b..3747f4d 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -30,6 +30,7 @@
<CodesignProvision>OnPro2307291-Dev</CodesignProvision>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchI18n>cjk</MtouchI18n>
+ <MtouchSdkVersion>17.5</MtouchSdkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
@@ -55,12 +56,13 @@
<CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<MtouchI18n>cjk</MtouchI18n>
- <MtouchLink>None</MtouchLink>
+ <MtouchLink>SdkOnly</MtouchLink>
<MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
<MtouchEnableSGenConc>false</MtouchEnableSGenConc>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-<CodesignProvision>OnPro2307291-Dev</CodesignProvision>
+<CodesignProvision>0002-OnPro-240704-1-Dev</CodesignProvision>
+<MtouchSdkVersion>17.5</MtouchSdkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
@@ -75,7 +77,8 @@
<MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
<MtouchI18n>cjk</MtouchI18n>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CodesignProvision>OnPro240130-1-Hoc</CodesignProvision>
+ <CodesignProvision>Automatic</CodesignProvision>
+ <MtouchSdkVersion>17.5</MtouchSdkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -119,6 +122,9 @@
<Reference Include="Shared.IOS">
<HintPath>..\DLL\Shared.IOS.dll</HintPath>
</Reference>
+ <Reference Include="Aliyun.Api.LogService">
+ <HintPath>..\DLL\Aliyun.Api.LogService.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json">
@@ -141,6 +147,18 @@
</PackageReference>
<PackageReference Include="Xamarin.iOS.SwiftRuntimeSupport">
<Version>0.2.1</Version>
+ </PackageReference>
+ <PackageReference Include="Google.Protobuf">
+ <Version>3.5.1</Version>
+ </PackageReference>
+ <PackageReference Include="Microsoft.AspNet.WebApi.Client">
+ <Version>5.2.4</Version>
+ </PackageReference>
+ <PackageReference Include="Iconic.Zlib.Netstandard">
+ <Version>1.0.0</Version>
+ </PackageReference>
+ <PackageReference Include="lz4net">
+ <Version>1.0.15.93</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
@@ -440,10 +458,6 @@
<ImageAsset Include="Assets.xcassets\wifi_bg.imageset\wifi_bg.png" />
<ImageAsset Include="Assets.xcassets\device_bg.imageset\Contents.json" />
<ImageAsset Include="Assets.xcassets\device_bg.imageset\device_bg.png" />
- <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\12422688.png" />
- <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\8281792.png" />
- <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\26881242.png" />
- <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\1792828.png" />
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\11252436.png" />
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\24361125.png" />
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\640960.png" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index 136f2cf..9837d4d 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -11,7 +11,7 @@
<key>CFBundleName</key>
<string>On Pro</string>
<key>CFBundleShortVersionString</key>
- <string>2.4.5</string>
+ <string>2.4.8</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
@@ -36,7 +36,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>2.4.5</string>
+ <string>2.4.8</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixinULAPI</string>
diff --git a/HDL_ON/Common/AliyunLog/AliyunLogClient.cs b/HDL_ON/Common/AliyunLog/AliyunLogClient.cs
new file mode 100644
index 0000000..02c0336
--- /dev/null
+++ b/HDL_ON/Common/AliyunLog/AliyunLogClient.cs
@@ -0,0 +1,160 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Aliyun.Api.LogService;
+using Aliyun.Api.LogService.Domain.Log;
+using Aliyun.Api.LogService.Domain.LogStore.Index;
+using Aliyun.Api.LogService.Infrastructure.Protocol;
+
+namespace HDL_ON.Common.AliyunLog
+{
+ public class AliyunLogClient
+ {
+ // 鏃ュ織鏈嶅姟鐨勬湇鍔℃帴鍏ョ偣銆傛澶勪互鏉窞涓轰緥锛屽叾瀹冨湴鍩熻鏍规嵁瀹為檯鎯呭喌濉啓銆�
+ private static string endpoint = "cn-hangzhou.log.aliyuncs.com";
+ // 鏈ず渚嬩粠鐜鍙橀噺涓幏鍙朅ccessKey ID鍜孉ccessKey Secret銆�
+ private static string accessKeyId = "LTAI5tLzDxrtsFyi3xtK3YWt";
+ private static string accessKeySecret = "eX31JZrRAvC2wZWPiZU0SYhlfAUMoT";
+ // Project鍚嶇О銆�
+ private static string project = "hdl-onpro-log";
+ // Logstore鍚嶇О銆�
+ private static string logstore = "log";
+ // 鍒涘缓鏃ュ織鏈嶅姟Client銆�
+ private static ILogServiceClient client = BuildSimpleClient();
+
+ public static ILogServiceClient BuildSimpleClient()
+ => LogServiceClientBuilders.HttpBuilder
+ .Endpoint(endpoint, project)
+ .Credential(accessKeyId, accessKeySecret)
+ .Build();
+
+
+ public AliyunLogClient()
+ {
+ }
+
+
+ //// 鏋勫缓鏈�绠�鍗曠殑`ILogServiceClient`銆�
+ //public static ILogServiceClient BuildSimpleClient()
+ // => LogServiceClientBuilders.HttpBuilder
+ // // 鏈嶅姟鍏ュ彛<endpoint>鍙婇」鐩悕<projectName>
+ // .Endpoint(endpoint, project)
+ // // 璁块棶瀵嗛挜淇℃伅
+ // .Credential(accessKeyId, accessKeySecret)
+ // .Build();
+
+
+ //static async Task Main(string[] args)
+ //{
+ // // 鍒涘缓Project銆�
+ // var proRes = await client.CreateProjectAsync(project, "des");
+ // check(proRes);
+ // Console.WriteLine("Create project success");
+ // Thread.Sleep(120 * 1000);
+
+ // // 鍒涘缓Logstore銆�
+ // var storeRes = await client.CreateLogStoreAsync(logstore, 3, 2);
+ // check(storeRes);
+ // Console.WriteLine("Create logstore success");
+ // Thread.Sleep(10 * 1000);
+
+ // // 涓篖ogstore鍒涘缓绱㈠紩銆�
+ // var indRes = await client.CreateIndexAsync(logstore, new IndexLineInfo(new[] { ' ', ',' }));
+ // check(indRes);
+ // Console.WriteLine("Create Index success");
+ // Thread.Sleep(60 * 1000);
+
+ // // 鍚慙ogstore鍐欏叆鏁版嵁銆�
+ // await PostLogs();
+ // Console.WriteLine("Post logs success");
+ // Thread.Sleep(3000);
+ // // 鏌ヨ鏃ュ織銆�
+ // await GetLogs();
+ //}
+
+ //public static async Task GetLogs()
+ //{
+ // var logsRes = await client.GetLogsAsync(logstore, DateTimeOffset.UtcNow.AddMinutes(-1),
+ // DateTimeOffset.UtcNow,
+ // "test", "", 100, 0);
+ // check(logsRes);
+ // foreach (var log in logsRes.Result.Logs)
+ // {
+ // foreach (var key in log.Keys)
+ // {
+ // log.TryGetValue(key, out var value);
+ // Console.WriteLine(key + " : " + value);
+ // }
+
+ // Console.WriteLine("======");
+ // }
+ //}
+
+
+ /// <summary>
+ /// 鏃ュ織鎺ㄩ��
+ /// </summary>
+ /// <param name="topic">鎺ㄩ�佹爣棰�</param>
+ /// <param name="msg">鎺ㄩ�佷俊鎭�</param>
+ /// <returns></returns>
+ public static async Task PostLogs(string topic, string msg)
+ {
+ if (client == null)
+ {
+ client = BuildSimpleClient();
+ }
+
+ try
+ {
+ var pushObj = new LogGroupInfo
+ {
+ Topic = topic,
+#if __ANDROID__
+ Source = "Android",
+#else
+ Source = "IOS",
+#endif
+ LogTags = new Dictionary<string, string>
+ {
+ {"tag1", DateTime.Now.ToLongTimeString()},
+
+ },
+ Logs = new List<LogInfo>
+ {
+ new LogInfo
+ {
+ Time = DateTimeOffset.Now,
+ Contents = new Dictionary<string, string>
+ {
+ {"id", DateTime.Now.Ticks.ToString()},
+ {"homeid", Entity.DB_ResidenceData.Instance.CurrentRegion.id},
+ {"userid", UserInfo.Current.ID},
+ {"userName", UserInfo.Current.userName},
+ {"server", DAL.Server.HttpUtil.GlobalRequestHttpsHost},
+ {"message", msg},
+ }
+ }
+ }
+ };
+ var response = await client.PostLogStoreLogsAsync(logstore, pushObj);
+ check(response);
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log(ex.Message);
+ }
+ }
+
+
+ public static void check(IResponse res)
+ {
+ if (!res.IsSuccess)
+ {
+ MainPage.Log("鏃ュ織鎺ㄩ�佷笉鎴愬姛.");
+ //throw new ApplicationException(res.Error.ErrorMessage);
+ }
+ }
+ }
+}
+
diff --git a/HDL_ON/Common/AliyunLog/AliyunLogInvokeAsync.cs b/HDL_ON/Common/AliyunLog/AliyunLogInvokeAsync.cs
new file mode 100644
index 0000000..717d3dc
--- /dev/null
+++ b/HDL_ON/Common/AliyunLog/AliyunLogInvokeAsync.cs
@@ -0,0 +1,173 @@
+锘縰sing System;
+using System.Linq;
+using System.Threading.Tasks;
+using Aliyun.Api.LogService;
+using Aliyun.Api.LogService.Domain;
+using Aliyun.Api.LogService.Domain.Log;
+using Aliyun.Api.LogService.Infrastructure.Protocol;
+
+namespace HDL_ON.Common.AliyunLog
+{
+ public class AliyunLogInvokeAsync
+ {
+ public AliyunLogInvokeAsync()
+ {
+ }
+
+ /// <summary>
+ /// 鎵ц璇锋眰鏂规硶銆�
+ /// </summary>
+ public static async Task<GetLogsResult> Invoke(ILogServiceClient client)
+ {
+ var response = await client.GetLogsAsync
+ (
+ // 銆屽繀濉弬鏁般�嶄細鍦� Request 鏋勯�犲櫒涓垪鍑猴紝骞朵笖涓嶅彲set锛�
+ new GetLogsRequest("example-logstore", (Int32)DateTimeOffset.UtcNow.AddDays(-1).ToUnixTimeSeconds(), (Int32)DateTimeOffset.UtcNow.ToUnixTimeSeconds())
+ {
+ // 銆屽彲閫夊弬鏁般�嶄笉浼氬湪 Request 鏋勯�犲櫒涓垪鍑猴紝鍙�氳繃setter璁剧疆銆�
+ Offset = 1,
+ Line = 100,
+ }
+ );
+
+ var result = response
+ // 姝ゆ柟娉曚細纭繚杩斿洖鐨勫搷搴斿け璐ユ椂鍊欐姏鍑篳LogServiceException`銆�
+ .EnsureSuccess()
+ // 姝ゅ鑾峰彇Result鏄畨鍏ㄧ殑銆�
+ .Result;
+
+ Console.WriteLine($"RequestId锛歿response.RequestId}");
+ Console.WriteLine($"鏃ュ織鎬绘暟锛歿result.Count}");
+ Console.WriteLine($"棣栨潯鏃ュ織锛歿result.Logs.FirstOrDefault()}");
+
+ return result;
+ }
+
+ /// <summary>
+ /// 鍦ㄨ皟鐢ㄦ椂鍙娇鐢ㄦ墿灞曟柟娉曪紝鎵╁睍鏂规硶浼氬皢绠�鍗曠殑璇锋眰瀵硅薄鐨勫睘鎬у睍寮�鍒版柟娉曞叆鍙備腑銆�
+ /// 浣跨敤鎵╁睍鏂规硶 `using Aliyun.Api.Log;` 鍗冲彲銆�
+ /// </summary>
+ public static async Task<GetLogsResult> InvokeUsingExtension(ILogServiceClient client)
+ {
+ var response = await client.GetLogsAsync
+ (
+ // 銆屽繀濉弬鏁般�嶄綔涓烘柟娉曠殑鏅�氬繀椤诲弬鏁�
+ "example-logstore",
+ DateTimeOffset.UtcNow.AddDays(-1),
+ DateTimeOffset.UtcNow,
+
+ // 銆屽彲閫夊弬鏁般�嶄綔涓烘柟娉曠殑鍙�夊弬鏁帮紝鍙�氳繃鍛藉悕鍙傛暟鏂瑰紡鎸囧畾
+ offset: 1,
+ line: 10
+ );
+
+ var result = response
+ // 姝ゆ柟娉曚細纭繚杩斿洖鐨勫搷搴斿け璐ユ椂鍊欐姏鍑篳LogServiceException`銆�
+ .EnsureSuccess()
+ // 姝ゅ鑾峰彇Result鏄畨鍏ㄧ殑銆�
+ .Result;
+
+ Console.WriteLine($"RequestId锛歿response.RequestId}");
+ Console.WriteLine($"鏃ュ織鎬绘暟锛歿result.Count}");
+ Console.WriteLine($"棣栨潯鏃ュ織锛歿result.Logs.FirstOrDefault()}");
+
+ return result;
+ }
+
+ /// <summary>
+ /// 澶勭悊鏈嶅姟鍣ㄨ繑鍥烇紙鍖呭惈鍦≧esponse涓級鐨勯敊璇��
+ /// </summary>
+ public static async Task<GetLogsResult> InvokeWithErrorHandling(ILogServiceClient client)
+ {
+ var response = await client.GetLogsAsync
+ (
+ // 銆屽繀濉弬鏁般�嶄綔涓烘柟娉曠殑鏅�氬繀椤诲弬鏁�
+ "example-logstore",
+ DateTimeOffset.UtcNow.AddDays(-1),
+ DateTimeOffset.UtcNow,
+
+ // 銆屽彲閫夊弬鏁般�嶄綔涓烘柟娉曠殑鍙�夊弬鏁帮紝鍙�氳繃鍛藉悕鍙傛暟鏂瑰紡鎸囧畾
+ offset: 1,
+ line: 10
+ );
+
+ GetLogsResult result;
+ // 灏濊瘯澶勭悊鍙鐞嗙殑閿欒銆�
+ if (!response.IsSuccess)
+ {
+ // 閿欒鐮�
+ var errorCode = response.Error.ErrorCode;
+ // 閿欒娑堟伅
+ var errorMessage = response.Error.ErrorMessage;
+
+ Console.WriteLine($"RequestId锛歿response.RequestId}");
+ Console.WriteLine($"閿欒鐮侊細{errorCode}");
+ Console.WriteLine($"閿欒淇℃伅锛歿errorMessage}");
+
+ // `ErrorCode`绫诲彲鏀寔涓庤嚜韬疄渚嬫垨瀛楃涓茶繘琛屽姣斻��
+ if (errorCode == ErrorCode.SignatureNotMatch /* SDK涓瀹氫箟鐨勯敊璇爜 */)
+ {
+ // 鍦ㄨ繖閲屽鐞嗕笟鍔″彲澶勭悊鐨勯敊璇�傘�傘�傘�傘�傘��
+ Console.WriteLine("Signature not match, {0}.", errorMessage);
+ }
+ else if (errorCode == "ParameterInvalid" /* 涓氬姟鐩稿叧鐗规畩鐨凷DK涓湭瀹氫箟鐨勯敊璇爜 */)
+ {
+ // 鍦ㄨ繖閲屽鐞嗕笟鍔″彲澶勭悊鐨勯敊璇�傘�傘�傘�傘�傘��
+ Console.WriteLine("Parameter invalid, {0}.", errorMessage);
+ }
+
+ // 浠讳綍澶勭悊涓嶅埌鐨勯敊璇鍔″繀鎶涘嚭寮傚父涓柇鍘熸祦绋嬶紝閬垮厤澶栭儴鑾峰彇鍒� null 鐨勭粨鏋滐紒
+ throw new Exception("杩欓噷鍙互鏄郴缁熺殑涓氬姟寮傚父銆�" + response.Error /* 鏈�濂藉甫涓婃湇鍔¤繑鍥炵殑閿欒淇℃伅浠ヤ究璋冭瘯 */);
+ }
+ else
+ {
+ // 姝ゅ鑾峰彇Result鏄畨鍏ㄧ殑銆�
+ result = response.Result;
+ }
+
+ Console.WriteLine($"RequestId锛歿response.RequestId}");
+ Console.WriteLine($"鏃ュ織鎬绘暟锛歿result.Count}");
+ Console.WriteLine($"棣栨潯鏃ュ織锛歿result.Logs.FirstOrDefault()}");
+
+ return result;
+ }
+
+ /// <summary>
+ /// 澶勭悊浠ュ紓甯稿舰寮忔姏鍑虹殑閿欒銆�
+ /// </summary>
+ public static async Task<GetLogsResult> InvokeWithExceptionHandling(ILogServiceClient client)
+ {
+ try
+ {
+ return await Invoke(client);
+ }
+ catch (LogServiceException e)
+ {
+ // 閿欒鐮�
+ var errorCode = e.ErrorCode;
+ // 閿欒娑堟伅
+ var errorMessage = e.ErrorMessage;
+
+ Console.WriteLine($"RequestId锛歿e.RequestId}");
+ Console.WriteLine($"閿欒鐮侊細{errorCode}");
+ Console.WriteLine($"閿欒淇℃伅锛歿errorMessage}");
+
+ // `ErrorCode`绫诲彲鏀寔涓庤嚜韬疄渚嬫垨瀛楃涓茶繘琛屽姣斻��
+ if (errorCode == ErrorCode.SignatureNotMatch /* SDK涓瀹氫箟鐨勯敊璇爜 */)
+ {
+ // 鍦ㄨ繖閲屽鐞嗕笟鍔″彲澶勭悊鐨勯敊璇�傘�傘�傘�傘�傘��
+ Console.WriteLine("Signature not match, {0}.", errorMessage);
+ }
+ else if (errorCode == "ParameterInvalid" /* 涓氬姟鐩稿叧鐗规畩鐨凷DK涓湭瀹氫箟鐨勯敊璇爜 */)
+ {
+ // 鍦ㄨ繖閲屽鐞嗕笟鍔″彲澶勭悊鐨勯敊璇�傘�傘�傘�傘�傘��
+ Console.WriteLine("Parameter invalid, {0}.", errorMessage);
+ }
+
+ // 浠讳綍澶勭悊涓嶅埌鐨勯敊璇鍔″繀鎶涘嚭寮傚父涓柇鍘熸祦绋嬶紝閬垮厤澶栭儴鑾峰彇鍒� null 鐨勭粨鏋滐紒
+ throw new Exception("杩欓噷鍙互鏄郴缁熺殑涓氬姟寮傚父銆�", e /* 鍦ㄨ嚜瀹氫箟鐨勫紓甯镐腑鏈�濂藉甫涓婃湇鍔¤繑鍥炵殑寮傚父浠ヤ究璋冭瘯 */);
+ }
+ }
+ }
+}
+
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 5195709..10b0a31 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -1617,6 +1617,17 @@
case SPK.MusicStandard:
//UI.Music.MusicMain.mMusicMain.RefreshView(updateTemp);
Console.WriteLine("闊充箰鎾斁鍣ㄦ樉绀虹姸鎬�=======" + revString);
+ foreach (var music in UI.Music.A31MusicModel.A31MusicModelList)//姣忔鏀跺埌鏁版嵁閮借鏇存柊涓�涓嬫椂闂�
+ {
+ if (music.functionMusic.sid == localFunction.sid)
+ {
+ music.LastDateTime = DateTime.Now;
+ }
+ }
+ if (UI.Music.A31MusicModel.Current != null)
+ {
+ UI.Music.A31MusicModel.Current.LastDateTime = DateTime.Now;
+ }
//wjc
break;
case SPK.Inverter:
diff --git a/HDL_ON/DAL/DriverLayer/Control_Udp.cs b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
index 421b4c4..5f3e595 100644
--- a/HDL_ON/DAL/DriverLayer/Control_Udp.cs
+++ b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -393,26 +393,26 @@
}
}
break;
- case SPK.OtherCommon://2024-02-01 15:19:28 鍒氬姞鐨勶紝涓嶅彂甯冿紝瀹㈡湇閬囧埌鐨勯棶棰�
- //foreach (var attr in f.status)
- //{
- // if (attr.key == FunctionAttributeKey.OnOff)
- // {
- // byte onOffValue = 0;
- // switch (attr.value)
- // {
- // case "on":
- // onOffValue = 0;
- // break;
- // case "off":
- // onOffValue = 255;
- // break;
- // }
- // ControlBytesSend(Command.SetCommonSwitch, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID,
- // new byte[] { f.localFunction.bus.LoopId, onOffValue });
- // break;
- // }
- //}
+ case SPK.OtherCommon://2024-02-01 15:19:28
+ foreach (var attr in f.status)
+ {
+ if (attr.key == FunctionAttributeKey.OnOff)
+ {
+ byte onOffValue = 0;
+ switch (attr.value)
+ {
+ case "on":
+ onOffValue = 0;
+ break;
+ case "off":
+ onOffValue = 255;
+ break;
+ }
+ ControlBytesSend(Command.SetCommonSwitch, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID,
+ new byte[] { f.localFunction.bus.LoopId, onOffValue });
+ break;
+ }
+ }
break;
}
}
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index cd66d30..8cadb5d 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -19,13 +19,13 @@
/// 鍏叡鍩熷悕灏辫繎瑙f瀽
/// </summary>
public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
- const string APP_KEY = "HDL-HOME-APP";
- const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
+ public const string APP_KEY = "HDL-HOME-APP";
+ public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
//public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
- //const string APP_KEY = "HDL-HOME-APP-TEST";
- //const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
+ //public const string APP_KEY = "HDL-HOME-APP-TEST";
+ //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
//public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
diff --git a/HDL_ON/Entity/Function/Sensor.cs b/HDL_ON/Entity/Function/Sensor.cs
index 51e0716..b86e111 100644
--- a/HDL_ON/Entity/Function/Sensor.cs
+++ b/HDL_ON/Entity/Function/Sensor.cs
@@ -505,6 +505,10 @@
else
level = 3;
break;
+ default:
+ level = 1;
+ break;
+
}
return level;
}
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index feb09b3..404ac05 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -541,6 +541,8 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Constant.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SceneAutomationListChoosePage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SceneTargetTypeChoosePage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Common\AliyunLog\AliyunLogClient.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Common\AliyunLog\AliyunLogInvokeAsync.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 0c6c555..a80cb79 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "2.4.5";
+ public static string VersionString = "2.4.8";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
@@ -649,6 +649,14 @@
#if DEBUG
Console.WriteLine($"{tag}-->{msg}");
#endif
+ if (tag == "error")
+ {
+ new System.Threading.Thread(async () =>
+ {
+ await Common.AliyunLog.AliyunLogClient.PostLogs("鑷畾涔塃rror鏃ュ織", msg);
+ })
+ { IsBackground = true }.Start();
+ }
}
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index 2b76d8a..890027e 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -168,7 +168,7 @@
break;
case SPK.MusicStandard:
case SPK.AvMusic:
- Music.A31MusicModel.Current = new Music.A31MusicModel { functionMusic = function };//褰撳墠鎾斁鍣�
+ Music.A31MusicModel.Current = new Music.A31MusicModel { functionMusic = function ,LastDateTime = DateTime.Now};//褰撳墠鎾斁鍣�
var a31PlayMusicPage = new Music.A31PlayMusicPage();
MainPage.BasePageView.AddChidren(a31PlayMusicPage);
a31PlayMusicPage.Show();
diff --git a/HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs b/HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs
index 6a0f24c..110980b 100644
--- a/HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs
+++ b/HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs
@@ -89,7 +89,14 @@
form.AddForm(string.Empty);
form.SetTextContent(msg);
- }, "ok");
+ }, "ok");
+
+ //涓婃姤鏃ュ織鏈嶅姟鍣�
+ new System.Threading.Thread(async () =>
+ {
+ await Common.AliyunLog.AliyunLogClient.PostLogs("App绋嬪簭閿欒", ex.Message + "\r\n" + ex.StackTrace);
+ })
+ { IsBackground = true }.Start();
}
/// <summary>
@@ -104,7 +111,13 @@
form.AddForm(string.Empty);
form.SetTextContent(msg);
- }, "ok");
+ }, "ok");
+ //涓婃姤鏃ュ織鏈嶅姟鍣�
+ new System.Threading.Thread(async () =>
+ {
+ await Common.AliyunLog.AliyunLogClient.PostLogs("App绋嬪簭閿欒", msg);
+ })
+ { IsBackground = true }.Start();
}
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index e5c6ada..272794a 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -553,6 +553,17 @@
LoadContentView();
#endregion
+
+#if DEBUG
+ btnResidenceName.MouseUpEventHandler = (envent, ee) => {
+ MainPage.Log("sss");
+ new System.Threading.Thread(async() =>
+ {
+ await Common.AliyunLog.AliyunLogClient.PostLogs("鍛婅娴嬭瘯", "娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅");
+ })
+ { IsBackground = true }.Start();
+ };
+#endif
}
catch (Exception ex)
{
diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 0d20f45..4fdd6fa 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -727,7 +727,7 @@
{
btnAddIcon.MouseUpEventHandler = (sender, e) =>
{
- if (btnSecurityTitle.IsSelected)
+ if (btnSecurityTitle != null && btnSecurityTitle.IsSelected)
{
return;
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
index f932a84..7a30610 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -465,7 +465,7 @@
if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on)
{
//闊充箰鍦ㄦ挱鏀炬椂锛屽啀璁$畻鎾斁鏃堕棿(鐜板湪鏃堕棿=鍘熸潵鏃堕棿+1绉�)
- playSecond += (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds;
+ //playSecond += (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds;
playSecond += 1;//琛ㄧず鍔犱笂绛夊緟鐨勬椂闂�1s
///姝屾洸璁板綍鏆傛椂鏃堕棿鍐欏叆缂撳瓨锛�
A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.playing_time, playSecond);
diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs
index 0dd2620..6abba29 100644
--- a/SiriIntents/Server/HttpUtil.cs
+++ b/SiriIntents/Server/HttpUtil.cs
@@ -22,8 +22,8 @@
//public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
- //const string APP_KEY = "HDL-HOME-APP-TEST";
- //const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
+ //public const string APP_KEY = "HDL-HOME-APP-TEST";
+ //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
//public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
diff --git a/SiriIntents/SiriIntents.csproj b/SiriIntents/SiriIntents.csproj
index 57075e1..bfb47a3 100644
--- a/SiriIntents/SiriIntents.csproj
+++ b/SiriIntents/SiriIntents.csproj
@@ -37,7 +37,7 @@
<DefineConstants></DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
+ <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey>
<MtouchUseLlvm>true</MtouchUseLlvm>
<MtouchFloat32>true</MtouchFloat32>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
@@ -45,7 +45,7 @@
<MtouchArch>ARM64</MtouchArch>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchVerbosity></MtouchVerbosity>
- <CodesignProvision>OnProSiri230729-1-Dev</CodesignProvision>
+ <CodesignProvision>0002-OnProSiri-240703-1-Hoc</CodesignProvision>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>pdbonly</DebugType>
diff --git a/SiriIntentsUI/SiriIntentsUI.csproj b/SiriIntentsUI/SiriIntentsUI.csproj
index 8331b8d..f1c28c4 100644
--- a/SiriIntentsUI/SiriIntentsUI.csproj
+++ b/SiriIntentsUI/SiriIntentsUI.csproj
@@ -38,7 +38,7 @@
<DefineConstants></DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
+ <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey>
<MtouchUseLlvm>true</MtouchUseLlvm>
<MtouchFloat32>true</MtouchFloat32>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
@@ -47,7 +47,7 @@
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchVerbosity></MtouchVerbosity>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CodesignProvision>OnProSiriUI230729-1-Dev</CodesignProvision>
+ <CodesignProvision>0002-OnProSiriUI-240703-1-Hoc</CodesignProvision>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>pdbonly</DebugType>
@@ -85,7 +85,7 @@
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchVerbosity></MtouchVerbosity>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CodesignProvision>OnProSiriUI230729-1-Dev</CodesignProvision>
+ <CodesignProvision>0002-OnProSiriUI-240704-1-Dev</CodesignProvision>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
--
Gitblit v1.8.0