Troubleshooting¶
Resolve common issues and manage alerts.
Alerts Overview¶
BuckPow automatically generates alerts when measurements exceed configured thresholds or devices go offline. The Alerts page lets you view, filter, and resolve these alerts.
Navigate to Alerts in the sidebar.
Alert Levels¶
| Level | Color | Description |
|---|---|---|
| Info | Blue | Informational messages (e.g., device came back online) |
| Warning | Yellow/Orange | Threshold warnings (e.g., low voltage, device offline) |
| Critical | Red | Critical issues requiring attention (e.g., high power, high current) |
Automatic Alerts¶
BuckPow generates alerts automatically based on device thresholds:
High Power Alert¶
Triggered when power exceeds the threshold:
- Default threshold: 2.5 W
- Level: Critical
- Message:
High power on <device_id>: <value>W (threshold: <threshold>W)
High Current Alert¶
Triggered when current exceeds the threshold:
- Default threshold: 0.5 A
- Level: Critical
- Message:
High current on <device_id>: <value>A (threshold: <threshold>A)
Low Voltage Alert¶
Triggered when voltage drops below the threshold:
- Default threshold: 4.5 V
- Level: Warning
- Message:
Low voltage on <device_id>: <value>V (threshold: <threshold>V)
Device Offline Alert¶
Triggered when no measurement received within the timeout:
- Default timeout: 30 seconds
- Level: Warning
- Message:
Device offline (<device_id>) — no data received for >30s
Device Back Online¶
Generated when a device comes back online after being offline:
- Level: Info
- Message:
Device back online (<device_id>)
Threshold Configuration¶
Thresholds can be set at two levels:
Device-Level Thresholds¶
Set per-node thresholds on the node edit page:
- Navigate to Nodes
- Click Edit on the node
- Set threshold values:
| Field | Unit | Default | Description |
|---|---|---|---|
| High Power Threshold | W | 2.5 | Alert when power exceeds this value |
| High Current Threshold | A | 0.5 | Alert when current exceeds this value |
| Low Voltage Threshold | V | 4.5 | Alert when voltage drops below this value |
- Click Save
Global Thresholds (Settings)¶
Set default thresholds for all devices in Settings:
- Navigate to Settings
- Set default threshold values
- Click Save
Device-level thresholds override global defaults.
Managing Alerts¶
Viewing Alerts¶
The Alerts page shows all alerts with:
| Column | Description |
|---|---|
| Level | Info, Warning, or Critical |
| Message | Alert description |
| Device | Device name or ID |
| Created | When the alert was generated |
| Resolved | When the alert was resolved (empty if unresolved) |
Filtering Alerts¶
Use the filters to narrow down alerts:
| Filter | Options |
|---|---|
| Device | All devices or specific device |
| Level | All, Info, Warning, Critical |
| Status | All, Unresolved, Resolved |
Resolving a Single Alert¶
- Find the alert in the list
- Click the Resolve button (checkmark icon)
- The alert is marked as resolved with a timestamp
Resolving All Alerts¶
- Click Resolve All button
- All unresolved alerts are marked as resolved
Resolve by device
You can also resolve all alerts for a specific device using the API:
API Reference¶
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/alerts |
List alerts (paginated, filterable) |
POST |
/api/v1/alerts |
Create alert manually |
PATCH |
/api/v1/alerts/{id}/resolve |
Resolve a single alert |
POST |
/api/v1/alerts/resolve-all |
Resolve all unresolved alerts |
List Alerts¶
curl "http://localhost:8000/api/v1/alerts?resolved=false&level=critical" \
-H 'Authorization: Bearer <jwt-token>'
Parameters:
| Parameter | Type | Description |
|---|---|---|
page |
integer | Page number (default: 1) |
per_page |
integer | Items per page (default: 10) |
device_id |
integer | Filter by device ID |
level |
string | Filter by level: info, warning, critical |
resolved |
string | Filter: true or false |
Create Alert¶
curl -X POST http://localhost:8000/api/v1/alerts \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <jwt-token>' \
-d '{
"device_id": 1,
"level": "warning",
"message": "Custom alert message"
}'
Common Issues¶
Device Not Appearing in Dashboard¶
Symptoms:
- Node doesn't appear in the Nodes list
- No measurements are being recorded
Solutions:
- Check WiFi connection — Verify the device is connected to WiFi (check Serial Monitor)
- Verify server URL — Ensure
API_BASEin the firmware points to the correct server - Check API key — Verify the API key matches the device in BuckPow
-
Test connectivity — From a computer on the same network:
-
Check firewall — Ensure port 8000 is open on the server
Device Shows Offline¶
Symptoms:
- Device appears in the dashboard but status is offline
- No recent measurements
Solutions:
- Check device power — Ensure the ESP32/ESP8266 is powered
- Check WiFi signal — Move the device closer to the router
- Review Serial Monitor — Look for connection errors
-
Check server — Verify BuckPow is running:
-
Increase timeout — If the device is slow, increase
DEVICE_ONLINE_TIMEOUT:
Measurements Not Recording¶
Symptoms:
- Device is online but no measurements appear
- Dashboard shows no chart data
Solutions:
- Start a session — Measurements are assigned to running sessions
- Check device enabled — Ensure the device is not disabled in the dashboard
- Verify INA219 — Check wiring and I2C connection
- Check Serial Monitor — Look for HTTP errors (400, 401, 403)
High Power / Current Alerts¶
Symptoms:
- Constant critical alerts for high power or current
Solutions:
-
Adjust thresholds — Increase the threshold if the value is expected:
- Edit the device and set a higher threshold
- Or update global defaults in Settings
-
Investigate the load — High power may indicate:
- A short circuit
- An overloaded circuit
- A malfunctioning device
-
Check wiring — Incorrect wiring can cause false readings
Low Voltage Alerts¶
Symptoms:
- Warning alerts for low voltage
Solutions:
- Check power supply — Ensure the power source is adequate
- Check connections — Loose connections cause voltage drops
-
Adjust threshold — If low voltage is expected, increase the threshold:
Export Not Working¶
Symptoms:
- CSV or XLSX download fails or returns empty file
Solutions:
- Check filters — Ensure date range or filters are not too restrictive
- Verify data exists — Check the Measurements page for data
- Check rate limit — Export is limited to 10 requests/minute
-
Try API directly — Test the export endpoint:
Dashboard Not Loading¶
Symptoms:
- Blank page or loading spinner
- JavaScript errors in browser console
Solutions:
- Clear browser cache — Hard refresh with Ctrl+Shift+R
- Check console — Open browser developer tools (F12)
- Verify JavaScript — Ensure
static/js/files are accessible - Check HTMX — Look for HTMX errors in the console
-
Restart server — Restart BuckPow:
Login Fails¶
Symptoms:
- Cannot log in with admin credentials
- Redirected back to login page
Solutions:
- Verify credentials — Check
ADMIN_EMAILandADMIN_PASSWORDin.env - Check JWT_SECRET — Ensure
JWT_SECRETis set (required in production) - Clear cookies — Clear browser cookies for the BuckPow domain
- Check JWT expiry — Tokens expire after 7 days by default
Database Errors¶
Symptoms:
- Server won't start
- Error messages about database connection
Solutions:
-
SQLite — Delete the database and restart:
-
PostgreSQL — Check connection string in
.env: -
Run migrations — For PostgreSQL/MySQL:
-
Check database server — Ensure the database is running:
Firmware Outdated Warning¶
Symptoms:
- API returns
X-Firmware-Outdated: trueheader
Solutions:
- Update firmware — Download the latest version from the repository
- Re-upload — Upload the new firmware to your ESP32/ESP8266
- Check compatibility — The minimum firmware version is
1.0.0
Getting Help¶
If you can't resolve an issue:
-
Check the logs — View server logs for error messages:
-
Search issues — Check GitHub Issues for similar problems
- Open an issue — Create a new issue with:
- BuckPow version
- Steps to reproduce
- Error messages
- Server logs