Files

30 lines
589 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
BASE_URL="${1:-http://192.168.4.1}"
echo "Testing ESP32 at: $BASE_URL"
echo
echo "1. Status:"
curl -s "$BASE_URL/status" | python3 -m json.tool
echo
echo "2. Starlink ON:"
curl -s "$BASE_URL/relay/starlink/on" | python3 -m json.tool
echo
echo "3. Starlink OFF:"
curl -s "$BASE_URL/relay/starlink/off" | python3 -m json.tool
echo
echo "4. Fridge ON:"
curl -s "$BASE_URL/relay/fridge/on" | python3 -m json.tool
echo
echo "5. Fridge OFF:"
curl -s "$BASE_URL/relay/fridge/off" | python3 -m json.tool
echo
echo "ESP32 HTTP bring-up test complete."