Move AP credentials to config and clarify STA UI access
This commit is contained in:
@@ -249,13 +249,14 @@ inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = { 0xF19C };
|
||||
- Uses deep sleep between cycles (`SENDER_WAKE_INTERVAL_SEC`).
|
||||
|
||||
## Web UI
|
||||
- AP SSID: `DD3-Bridge-<short_id>`
|
||||
- AP password: `changeme123`
|
||||
- AP SSID: `DD3-Bridge-<short_id>` (prefix configurable)
|
||||
- AP password: `changeme123` (configurable)
|
||||
- Endpoints:
|
||||
- `/`: status overview
|
||||
- `/wifi`: WiFi/MQTT/NTP config (AP and STA)
|
||||
- `/sender/<device_id>`: per-sender details
|
||||
- Sender IDs on `/` are clickable (open sender page in a new tab).
|
||||
- In STA mode, the UI is also available via the board’s IP/hostname on your WiFi network.
|
||||
|
||||
## MQTT
|
||||
- Topic: `smartmeter/<deviceId>/state`
|
||||
|
||||
@@ -78,6 +78,8 @@ constexpr bool SERIAL_DEBUG_DUMP_JSON = false;
|
||||
constexpr bool LORA_SEND_BYPASS = false;
|
||||
constexpr bool ENABLE_SD_LOGGING = false;
|
||||
constexpr uint8_t PIN_SD_CS = 25;
|
||||
constexpr const char *AP_SSID_PREFIX = "DD3-Bridge-";
|
||||
constexpr const char *AP_PASSWORD = "changeme123";
|
||||
|
||||
constexpr uint8_t NUM_SENDERS = 1;
|
||||
inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = {
|
||||
|
||||
@@ -642,8 +642,8 @@ void setup() {
|
||||
} else {
|
||||
g_ap_mode = true;
|
||||
char ap_ssid[32];
|
||||
snprintf(ap_ssid, sizeof(ap_ssid), "DD3-Bridge-%04X", g_short_id);
|
||||
wifi_start_ap(ap_ssid, "changeme123");
|
||||
snprintf(ap_ssid, sizeof(ap_ssid), "%s%04X", AP_SSID_PREFIX, g_short_id);
|
||||
wifi_start_ap(ap_ssid, AP_PASSWORD);
|
||||
if (g_cfg.ntp_server_1.isEmpty()) {
|
||||
g_cfg.ntp_server_1 = "pool.ntp.org";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user