浏览代码

Added on boot iot scan logic

TC pushbot 5 2 年之前
父节点
当前提交
e5f5b7f48c
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      iot.go

+ 5 - 0
iot.go

@@ -96,6 +96,11 @@ func IoTHubInit() {
 		iotManager.RegisterHandler(tasmotaSonoffS2x)
 
 		//Add more here if needed
+		//Start the initial scanning
+		go func() {
+			iotManager.ScanDevices()
+			systemWideLogger.PrintAndLog("IoT", "Initial IoT device scanning completed", nil)
+		}()
 
 		//Finally, inject the gateway into the AGI interface
 		AGIGateway.Option.IotManager = iotManager