This page documents the local HTTPS API exposed by EastMesh *_repeater_mqtt builds that support the web panel.
It is intended for:
This is not a cloud API and not a separate backend service. The repeater firmware serves it directly.
The API is available only when:
*_repeater_mqtt firmware buildThe API is intended for trusted local-network administration. Do not expose it directly to the public internet.
Use the repeater's local HTTPS address:
https://<repeater-ip>/
Example:
https://192.168.1.123/
The API uses the same admin password as the repeater CLI and web panel.
POST the password to /loginX-Auth-Token header on later requestsExample:
TOKEN=$(curl -sk -X POST https://<repeater-ip>/login --data '<admin-password>')
Use the token:
curl -sk https://<repeater-ip>/api/stats -H "X-Auth-Token: $TOKEN"
Notes:
-k or equivalent401 UnauthorizedThe API runs on the repeater itself, so polling frequency matters.
If the repeater is also running two MQTT connections, avoid frequent API polling. The current EastMesh usage pattern is:
60 second polling for statsThat is the recommended baseline if you want to avoid overloading the board. Keep the request rate low, avoid bursty polling, and prefer manual refresh or event-triggered reads for heavier operations.
Recommended practice:
/api/stats no more than once per minutePOST /loginAuthenticate with the repeater admin password.
Request body:
<admin-password>
Response:
401 on bad passwordExample:
curl -sk -X POST https://<repeater-ip>/login --data '<admin-password>'
POST /api/commandRun a repeater CLI command remotely.
Headers:
X-Auth-Token: <token>
Request body:
get wifi.status
Response:
OK if a command succeeds without returning textExample:
curl -sk https://<repeater-ip>/api/command \
-H "X-Auth-Token: $TOKEN" \
--data 'get wifi.status'
GET /api/statsFetch the current summary payload used by the dedicated /stats page.
Headers:
X-Auth-Token: <token>
Example:
curl -sk https://<repeater-ip>/api/stats \
-H "X-Auth-Token: $TOKEN"
Notes:
web.stats is disabled, the endpoint returns 503 Service Unavailablesensors object in the summary payload for current GPS and environmental telemetrycore object includes raw battery_mv, board-reported battery_pct when available, a UI-ready battery_display_pct, and board-specific battery_min_mv / battery_max_mv range hints used by /stats when the board does not expose its own battery percentageGET /api/stats?series=<name>Fetch one trend series.
Supported series:
batterymemorysignalnoise_floorpacketsvoltagesensor_temphumiditypressurepressure_altitudemcu_tempgps_altitudegps_satellitesExample:
curl -sk "https://<repeater-ip>/api/stats?series=memory" \
-H "X-Auth-Token: $TOKEN"
Notes:
?series=battery, not just ?seriespoints array and current:nullGET /api/stats?view=legacyFetch the older bundle-style stats payload.
Example:
curl -sk "https://<repeater-ip>/api/stats?view=legacy" \
-H "X-Auth-Token: $TOKEN"
This exists for compatibility and troubleshooting. For new integrations, prefer the summary endpoint plus specific series requests.
/api/command is the most flexible endpoint. It lets you run the same CLI commands accepted by the repeater.
Examples:
get wifi.statusget mqtt.statusget web.statusget web.stats.statusget repeatget radioThis is useful for:
Example:
curl -sk https://<repeater-ip>/api/command \
-H "X-Auth-Token: $TOKEN" \
--data 'get mqtt.status'
Use /api/stats for summary information and one series call at a time for trend lines.
Recommended pattern:
/api/stats60 second intervals, or slower if the repeater is busyThis is the same basic pattern used by the built-in /stats page.
Because /api/command returns CLI output directly, it works well for small operational checks in scripts or home-lab monitoring.
Examples:
Example:
curl -sk https://<repeater-ip>/api/command \
-H "X-Auth-Token: $TOKEN" \
--data 'get web.status'
The web panel also uses /api/command for operator actions, not just read-only queries.
Examples:
advertrebootstart otatime <epoch>time.force <epoch>These are powerful commands. Treat them the same way you would treat direct serial CLI access.
Example:
curl -sk https://<repeater-ip>/api/command \
-H "X-Auth-Token: $TOKEN" \
--data 'advert'
The web panel saves settings by generating CLI commands and sending them through /api/command.
That means your own tools can do the same for EastMesh-specific settings such as:
This is a practical way to automate setup while preserving existing CLI semantics.
This shell example logs in, fetches summary stats, fetches one trend series, and runs a CLI command:
#!/usr/bin/env bash
set -euo pipefail
BASE_URL="https://192.168.1.123"
PASSWORD="your-admin-password"
TOKEN=$(curl -sk -X POST "$BASE_URL/login" --data "$PASSWORD")
echo "Summary:"
curl -sk "$BASE_URL/api/stats" \
-H "X-Auth-Token: $TOKEN"
echo
echo "Memory trend:"
curl -sk "$BASE_URL/api/stats?series=memory" \
-H "X-Auth-Token: $TOKEN"
echo
echo "MQTT status:"
curl -sk "$BASE_URL/api/command" \
-H "X-Auth-Token: $TOKEN" \
--data 'get mqtt.status'
Common responses:
401 Unauthorized: missing or expired token503 Service Unavailable: stats are disabled404 No stats data: requested stats payload could not be built400 Bad request: malformed login or command request bodyIf stats requests fail:
web.stats is enabled/api/command when you need exact CLI parity/api/stats for dashboards and trend viewsset web off to maximize heap headroom on constrained boards