Adds downloader bash file

This commit is contained in:
Etienne Chassaing 2025-07-17 10:33:02 +02:00
parent f5a7b3c8d7
commit 16b89bc47d
2 changed files with 12 additions and 2 deletions

10
download_recordings Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Configuration
PI_USER="pi"
PI_HOST="192.168.1.42"
REMOTE_FOLDER="/home/pi/data_logs/"
LOCAL_FOLDER="/recordings"
# Sync folder from Raspberry Pi to local
rsync -avz --progress "$PI_USER@$PI_HOST:$REMOTE_FOLDER" "$LOCAL_FOLDER"

View File

@ -67,7 +67,7 @@ async def update_latest_flow():
except Exception as e: except Exception as e:
logging.error(f"Error fetching flow: {e}") logging.error(f"Error fetching flow: {e}")
await asyncio.sleep(1) await asyncio.sleep(1.0)
def format_data(data): def format_data(data):
@ -231,7 +231,7 @@ async def update_latest_data():
current_data = latest_data[f"PU_{pu}"] current_data = latest_data[f"PU_{pu}"]
logging.debug(f"[MONITOR BUFFER] PU{pu}: {current_data}") logging.debug(f"[MONITOR BUFFER] PU{pu}: {current_data}")
# logging.info(f"[MONITOR BUFFER] latest_data: {latest_data}") # logging.info(f"[MONITOR BUFFER] latest_data: {latest_data}")
await asyncio.sleep(0.2) await asyncio.sleep(0.1)
@app.get("/monitor") @app.get("/monitor")