소스 검색

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