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 @@
-