marek 1 месяц назад
Родитель
Сommit
1208915d34
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      apps/getData.py

+ 4 - 1
apps/getData.py

@@ -56,12 +56,13 @@ async def ble_task():
             outdoorConnected = 0
 
             print("no device found, wait then scan again")
-            await asyncio.sleep(30)
+            await asyncio.sleep(10)
             continue
 
         try:
             async with BleakClient(device, disconnected_callback=lambda c: disconnect_event.set()) as client:
                 outdoorConnected = 1
+                print(f"connected to {outdoorName}")
 
                 await client.start_notify(TEMP_UUID, notification_handler)
                 await client.start_notify(PRESSURE_UUID, notification_handler)
@@ -129,6 +130,8 @@ async def write_task():
 
         conn.commit()
 
+        print(f"indoor: {indoorValues["Temperature"] / 100}°C, outdoor: {outdoorConnected} - {outdoorValues["Temperature"]}°C")
+
         await asyncio.sleep(10)
 
 async def main():