forked from ariska/karung-web-admin
8bbe5950ea0b27a9a69bfebb5bd1c6db326ec372
karung-web-admin
Admin dashboard that aggregates KTC (tuang) and KPC (masuk) counter data and exposes a single combined API.
Sources
| Role | Project | Default URL | Cameras |
|---|---|---|---|
| Tuang | zenai-ktc-python |
http://192.168.192.15:9000 |
K1-L1-left, K1-L1-right |
| Masuk | zenai-kpc-python |
http://192.168.192.15:7000 |
K1-L1-in, K1-L1-out |
Install path
Deploy code to /opt/karung-web-admin (matches the systemd units below).
Puller (systemd service)
sudo cp karung-web-admin-pull-sources.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now karung-web-admin-pull-sources.service
It runs pull_sources.py --loop and refreshes every SOURCE_PULL_INTERVAL_SECONDS (default 30).
Writes:
- Live JSON:
karung_tuang.json,karung_masuk.json - History SQLite:
karung_tuang.db,karung_masuk.db - Status:
.pull_status.json
One-shot (optional / debugging):
python pull_sources.py
Web app
python app.py
Or enable the dashboard service:
sudo cp karung-web-admin.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now karung-web-admin.service
If you previously used frigate-counter_karung-web-admin.service, disable/remove it:
sudo systemctl disable --now frigate-counter_karung-web-admin.service
sudo rm /etc/systemd/system/frigate-counter_karung-web-admin.service
sudo systemctl daemon-reload
Dashboard: http://0.0.0.0:8090/
Combined API: GET /api/k1/combined?history_days=30
Environment
| Variable | Default |
|---|---|
KTC_BASE_URL |
http://192.168.192.15:9000 |
KPC_BASE_URL |
http://192.168.192.15:7000 |
SOURCE_HISTORY_DAYS |
30 |
SOURCE_PULL_INTERVAL_SECONDS |
30 |
KARUNG_TUANG_JSON |
karung_tuang.json |
KARUNG_MASUK_JSON |
karung_masuk.json |
KARUNG_TUANG_DB |
karung_tuang.db |
KARUNG_MASUK_DB |
karung_masuk.db |
Languages
Python
57.4%
HTML
42.6%