Adds downloader bash file
This commit is contained in:
parent
f5a7b3c8d7
commit
16b89bc47d
10
download_recordings
Normal file
10
download_recordings
Normal 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"
|
||||||
4
main.py
4
main.py
|
|
@ -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")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user