🌡️ 溫度監控與警報系統

📌 功能簡介

此專案透過 Flask 網站 + SQLite 資料庫,定時從 210.62.179.209/Data.txt 抓取冷凍冷藏室的即時溫度,並具備 超標警報與 Gmail API 通知功能
同時支援歷史查詢、Excel 匯出與排程紀錄。


🔧 系統架構


📑 功能說明

1. 定時紀錄與警報

2. 設定檔 (config.json)

{
  "notifications": {
    "enabled": true,
    "sender": "zfuntw@gmail.com",
    "recipients": ["example@mail.com"],
    "alert_cooldown_hours": 3
  },
  "temperature_settings": {
    "1F前室": {"enabled": true, "threshold": 10, "defrost_hours": [3, 15]},
    "魚翅保存庫": {"enabled": true, "threshold": -5, "defrost_hours": []}
  }
}


3. 前端介面

4. Gmail API 通知

5. 簡易版資料採集程式

另附加 get_temperature_data 腳本:


📂 資料表結構

temperatures

欄位 說明
id 主鍵
timestamp 紀錄時間
temp_front_room 1F前室
temp_shark_fin 魚翅保存庫
temp_raw_material 原物料保存庫
temp_finished_product 成品保存庫
temp_blast_freezer 急速冷凍室
temp_precooling_room 製成品預冷室
temp_2f 2F冷藏室
temp_3f 3F冷藏室

▶️ 啟動方式

python app.py

網站預設服務於
👉 https://temp.zfun.com.tw/login


⚠️ 注意事項

 

 

 


Revision #1
Created 4 August 2025 01:35:01 by Wayne
Updated 4 August 2025 01:37:35 by Wayne