Finalize parity documentation and validation guides
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Relay Wiring
|
||||||
|
|
||||||
|
Current architecture uses the onboard relay contacts
|
||||||
|
as the load switching device.
|
||||||
|
|
||||||
|
Positive-side switching:
|
||||||
|
|
||||||
|
Battery +
|
||||||
|
|
|
||||||
|
Fuse
|
||||||
|
|
|
||||||
|
Relay COM
|
||||||
|
|
|
||||||
|
Relay NO
|
||||||
|
|
|
||||||
|
Load +
|
||||||
|
|
||||||
|
Load negative returns directly to the ground bus.
|
||||||
|
|
||||||
|
Relay 1:
|
||||||
|
|
||||||
|
Starlink Mini
|
||||||
|
|
||||||
|
Relay 2:
|
||||||
|
|
||||||
|
Fridge
|
||||||
|
|
||||||
@@ -79,3 +79,31 @@ Error responses should include:
|
|||||||
error: "error_code"
|
error: "error_code"
|
||||||
|
|
||||||
Status/config responses should preserve the generic data model used by `/status`.
|
Status/config responses should preserve the generic data model used by `/status`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Project Status
|
||||||
|
|
||||||
|
API/UART/USB parity status:
|
||||||
|
|
||||||
|
COMPLETE
|
||||||
|
|
||||||
|
Covered:
|
||||||
|
|
||||||
|
Status
|
||||||
|
Configuration
|
||||||
|
Relays
|
||||||
|
WiFi
|
||||||
|
BMS
|
||||||
|
Temperature Sensors
|
||||||
|
Save Config
|
||||||
|
Factory Reset
|
||||||
|
|
||||||
|
Future additions must be implemented on:
|
||||||
|
|
||||||
|
USB Serial
|
||||||
|
UART JSON
|
||||||
|
HTTP API
|
||||||
|
|
||||||
|
before parity is considered maintained.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# Temperature API
|
||||||
|
|
||||||
|
## Scan
|
||||||
|
|
||||||
|
POST
|
||||||
|
|
||||||
|
/temps/scan
|
||||||
|
|
||||||
|
Response:
|
||||||
|
|
||||||
|
{
|
||||||
|
"type":"temp_scan_response",
|
||||||
|
"ok":true
|
||||||
|
}
|
||||||
|
|
||||||
|
## Assign
|
||||||
|
|
||||||
|
POST
|
||||||
|
|
||||||
|
/temps/assign
|
||||||
|
|
||||||
|
Body:
|
||||||
|
|
||||||
|
{
|
||||||
|
"id":"temp_1",
|
||||||
|
"index":1
|
||||||
|
}
|
||||||
|
|
||||||
|
## Clear
|
||||||
|
|
||||||
|
POST
|
||||||
|
|
||||||
|
/temps/clear
|
||||||
|
|
||||||
|
Body:
|
||||||
|
|
||||||
|
{
|
||||||
|
"id":"temp_1"
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
# DS18B20 Temperature Sensor Setup
|
||||||
|
|
||||||
|
## Wiring
|
||||||
|
|
||||||
|
All DS18B20 sensors share a single 1-Wire bus.
|
||||||
|
|
||||||
|
ESP32:
|
||||||
|
|
||||||
|
GPIO4 = DATA
|
||||||
|
3.3V = VCC
|
||||||
|
GND = GND
|
||||||
|
|
||||||
|
Required pullup:
|
||||||
|
|
||||||
|
4.7k resistor between DATA and 3.3V
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
3.3V -----+---------------- Sensor Red
|
||||||
|
|
|
||||||
|
4.7k
|
||||||
|
|
|
||||||
|
GPIO4 ----+---------------- Sensor Yellow
|
||||||
|
|
||||||
|
GND ----------------------- Sensor Black
|
||||||
|
|
||||||
|
## Multiple Sensors
|
||||||
|
|
||||||
|
All sensors share the same bus:
|
||||||
|
|
||||||
|
DATA
|
||||||
|
VCC
|
||||||
|
GND
|
||||||
|
|
||||||
|
Only one 4.7k pullup resistor is required.
|
||||||
|
|
||||||
|
## Scan
|
||||||
|
|
||||||
|
scan temps
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
DS18B20 Sensors Found:
|
||||||
|
1) 28:7D:56:25:00:00:00:34
|
||||||
|
|
||||||
|
## Assign
|
||||||
|
|
||||||
|
assign temp 1 1
|
||||||
|
save
|
||||||
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# HTTP API Validation
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
curl -s http://ESP32_IP/status | jq
|
||||||
|
|
||||||
|
## Relay On
|
||||||
|
|
||||||
|
curl -X POST http://ESP32_IP/relay/set \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"id":"relay_1","state":true}'
|
||||||
|
|
||||||
|
## Relay Off
|
||||||
|
|
||||||
|
curl -X POST http://ESP32_IP/relay/set \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"id":"relay_1","state":false}'
|
||||||
|
|
||||||
|
## Scan Temps
|
||||||
|
|
||||||
|
curl -X POST http://ESP32_IP/temps/scan
|
||||||
|
|
||||||
|
## WiFi Config
|
||||||
|
|
||||||
|
curl -X POST http://ESP32_IP/config/wifi \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"networks":[
|
||||||
|
{
|
||||||
|
"ssid":"Starlink",
|
||||||
|
"password":"PASSWORD",
|
||||||
|
"priority":1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# UART Validation
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
{"type":"status_request"}
|
||||||
|
|
||||||
|
## Relay On
|
||||||
|
|
||||||
|
{"type":"set_relay","id":"relay_1","state":true}
|
||||||
|
|
||||||
|
## Relay Off
|
||||||
|
|
||||||
|
{"type":"set_relay","id":"relay_1","state":false}
|
||||||
|
|
||||||
|
## Scan Temps
|
||||||
|
|
||||||
|
{"type":"scan_temps"}
|
||||||
|
|
||||||
|
## Assign Temp
|
||||||
|
|
||||||
|
{"type":"assign_temp","id":"temp_1","index":1}
|
||||||
|
|
||||||
|
## Clear Temp
|
||||||
|
|
||||||
|
{"type":"clear_temp","id":"temp_1"}
|
||||||
|
|
||||||
Reference in New Issue
Block a user