From cec0a2d5982df9c5bb77a23733bcc8a81e2c79a7 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Tue, 24 Sep 2019 11:31:20 +0800
Subject: [PATCH] rc.4
Former-commit-id: cb3988b49c99e3d7831de2692fdbb0adc5fe8317
---
projects/IoT/IdGen/Program.cs | 2 +-
.../DeviceServices/FBee/FBeeService.cs | 2 +-
.../DeviceServices/Onvif/OnvifService.cs | 1 +
.../Infrastructure/BaseClientService.cs | 5 ++
.../Infrastructure/ClientService.cs | 3 +-
.../IoT/IoTNode/Controllers/HomeController.cs | 2 +-
projects/IoT/IoTNode/Views/Home/Index.cshtml | 5 ++
projects/IoT/IoTNode/appsettings.json | 2 +-
projects/IoTCenter/IoTCenter.csproj | 8 ---
projects/IoTCenter/appsettings.json | 2 +-
projects/IoTCenter/wwwroot/node.default.html | 8 +--
projects/UserCenter/appsettings.json | 2 +-
publish/build.cmd | 3 +-
publish/src/linux-arm64/publish/install.sh | 65 +++++++++----------
.../publish/supervisor/apservice.conf | 6 --
.../publish/supervisor/iotnode.conf | 2 +-
.../publish/supervisor/lichuang.conf | 6 --
.../{njwlservice.conf => njwlservice.conf1} | 0
.../publish/supervisor/onvifservice.conf | 8 ---
.../publish/supervisor/spservice.conf | 6 --
.../linux-arm64/publish/supervisor/srs.conf | 6 --
.../linux-x64/publish/apps/srs/conf/srs.conf | 14 +++-
tools/nginx-1.16.0/conf/nginx.conf | 3 +-
23 files changed, 69 insertions(+), 92 deletions(-)
create mode 100644 projects/IoT/IoTNode/Views/Home/Index.cshtml
delete mode 100644 publish/src/linux-arm64/publish/supervisor/apservice.conf
delete mode 100644 publish/src/linux-arm64/publish/supervisor/lichuang.conf
rename publish/src/linux-arm64/publish/supervisor/{njwlservice.conf => njwlservice.conf1} (100%)
delete mode 100644 publish/src/linux-arm64/publish/supervisor/onvifservice.conf
delete mode 100644 publish/src/linux-arm64/publish/supervisor/spservice.conf
delete mode 100644 publish/src/linux-arm64/publish/supervisor/srs.conf
diff --git a/projects/IoT/IdGen/Program.cs b/projects/IoT/IdGen/Program.cs
index 6a1a110a..b6ae298d 100644
--- a/projects/IoT/IdGen/Program.cs
+++ b/projects/IoT/IdGen/Program.cs
@@ -23,7 +23,7 @@ namespace IdGen
var values = input.Split(' ');
var sn = values[0];
var days = Convert.ToInt32(values[1]);
- var endTime = days == 0 ? 0 : new DateTimeOffset(DateTime.UtcNow.Date.AddDays(days + 1).AddSeconds(-1)).ToUnixTimeMilliseconds();
+ var endTime = days == 0 ? 0 : new DateTimeOffset(DateTime.UtcNow.Date.AddDays(days + 1).AddSeconds(-1)).ToUnixTimeSeconds();
Console.WriteLine($"{sn}-{endTime}".DESEncrypt(sn));
}
catch (Exception ex)
diff --git a/projects/IoT/IoT.Shared/DeviceServices/FBee/FBeeService.cs b/projects/IoT/IoT.Shared/DeviceServices/FBee/FBeeService.cs
index 893687ca..0286c581 100644
--- a/projects/IoT/IoT.Shared/DeviceServices/FBee/FBeeService.cs
+++ b/projects/IoT/IoT.Shared/DeviceServices/FBee/FBeeService.cs
@@ -443,7 +443,7 @@ namespace IoT.Shared.DeviceServices.FBee
{
deviceName = "烟雾传感器";
}
- else if (zoneType == 0x000d)
+ else if (zoneType == 0x000d || zoneType == 0x00ff)
{
deviceName = "红外感应器";
}
diff --git a/projects/IoT/IoT.Shared/DeviceServices/Onvif/OnvifService.cs b/projects/IoT/IoT.Shared/DeviceServices/Onvif/OnvifService.cs
index 5d023522..cc98c0d6 100644
--- a/projects/IoT/IoT.Shared/DeviceServices/Onvif/OnvifService.cs
+++ b/projects/IoT/IoT.Shared/DeviceServices/Onvif/OnvifService.cs
@@ -381,6 +381,7 @@ namespace IoT.Shared.DeviceServices.Onvif
private Process SetProcess(string file, string arguments)
{
Console.WriteLine(file);
+ Console.WriteLine(arguments);
var process = new Process
{
StartInfo = new ProcessStartInfo
diff --git a/projects/IoT/IoT.Shared/Infrastructure/BaseClientService.cs b/projects/IoT/IoT.Shared/Infrastructure/BaseClientService.cs
index d4ce2b2f..26613be6 100644
--- a/projects/IoT/IoT.Shared/Infrastructure/BaseClientService.cs
+++ b/projects/IoT/IoT.Shared/Infrastructure/BaseClientService.cs
@@ -115,6 +115,7 @@ namespace IoT.Shared.Infrastructure
{
this._notifyHost = this._cfg["notify:host"];
var url = $"http://{this._notifyHost}/hub?group={this._cfg["sn"]}";
+ Console.WriteLine($"init connection for {url}");
if (this.Connection != null)
{
this.Connection.DisposeAsync();
@@ -144,6 +145,10 @@ namespace IoT.Shared.Infrastructure
{
this.Connection.SendAsync(Methods.ClientToServer, method, message, fromConnectionId);
}
+ else
+ {
+ Console.WriteLine($"{_notifyHost} not connected");
+ }
}
catch (Exception ex)
{
diff --git a/projects/IoT/IoT.Shared/Infrastructure/ClientService.cs b/projects/IoT/IoT.Shared/Infrastructure/ClientService.cs
index 7cfd6f1c..751bf6cf 100644
--- a/projects/IoT/IoT.Shared/Infrastructure/ClientService.cs
+++ b/projects/IoT/IoT.Shared/Infrastructure/ClientService.cs
@@ -22,6 +22,7 @@ namespace IoT.Shared.Infrastructure
public override void OnConnected()
{
+ Console.WriteLine($"{_notifyHost} OnConnected");
using (var scope = this.applicationServices.CreateScope())
{
//同步Node
@@ -271,7 +272,7 @@ namespace IoT.Shared.Infrastructure
{
try
{
- Console.WriteLine("send node to server");
+ Console.WriteLine($"send node to server {_notifyHost}");
this.ClientToServer(method, data.ToJson());
}
catch (Exception ex)
diff --git a/projects/IoT/IoTNode/Controllers/HomeController.cs b/projects/IoT/IoTNode/Controllers/HomeController.cs
index 03315864..b56302d7 100644
--- a/projects/IoT/IoTNode/Controllers/HomeController.cs
+++ b/projects/IoT/IoTNode/Controllers/HomeController.cs
@@ -27,7 +27,7 @@ namespace IoTNode.Controllers
public IActionResult Index()
{
var model = this._nodeRepo.ReadOnlyTable().FirstOrDefault();
- return View("Views/Home/Node.cshtml", model);
+ return View();
}
public IActionResult GetNode(Guid id)
diff --git a/projects/IoT/IoTNode/Views/Home/Index.cshtml b/projects/IoT/IoTNode/Views/Home/Index.cshtml
new file mode 100644
index 00000000..e1dd794f
--- /dev/null
+++ b/projects/IoT/IoTNode/Views/Home/Index.cshtml
@@ -0,0 +1,5 @@
+@*
+ For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
+*@
+@{
+}
diff --git a/projects/IoT/IoTNode/appsettings.json b/projects/IoT/IoTNode/appsettings.json
index a1bbc856..de00bab4 100644
--- a/projects/IoT/IoTNode/appsettings.json
+++ b/projects/IoT/IoTNode/appsettings.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.0-rc.2",
+ "version": "1.0.0-rc.4",
"Logging": {
"LogLevel": {
"Default": "Warning",
diff --git a/projects/IoTCenter/IoTCenter.csproj b/projects/IoTCenter/IoTCenter.csproj
index 531ada5d..145ead94 100644
--- a/projects/IoTCenter/IoTCenter.csproj
+++ b/projects/IoTCenter/IoTCenter.csproj
@@ -3,14 +3,6 @@
netcoreapp2.2
true
-
-
-
-
-
-
-
-
diff --git a/projects/IoTCenter/appsettings.json b/projects/IoTCenter/appsettings.json
index 089a3e5b..26abb9fa 100644
--- a/projects/IoTCenter/appsettings.json
+++ b/projects/IoTCenter/appsettings.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.0-rc.2",
+ "version": "1.0.0-rc.4",
"Logging": {
"LogLevel": {
"Default": "Warning",
diff --git a/projects/IoTCenter/wwwroot/node.default.html b/projects/IoTCenter/wwwroot/node.default.html
index 7fb02383..86563967 100644
--- a/projects/IoTCenter/wwwroot/node.default.html
+++ b/projects/IoTCenter/wwwroot/node.default.html
@@ -196,7 +196,7 @@
-