Move AP credentials to config and clarify STA UI access

This commit is contained in:
2026-02-02 00:23:52 +01:00
parent f3af5b3f1c
commit d32ae30014
3 changed files with 7 additions and 4 deletions

View File

@@ -249,13 +249,14 @@ inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = { 0xF19C };
- Uses deep sleep between cycles (`SENDER_WAKE_INTERVAL_SEC`). - Uses deep sleep between cycles (`SENDER_WAKE_INTERVAL_SEC`).
## Web UI ## Web UI
- AP SSID: `DD3-Bridge-<short_id>` - AP SSID: `DD3-Bridge-<short_id>` (prefix configurable)
- AP password: `changeme123` - AP password: `changeme123` (configurable)
- Endpoints: - Endpoints:
- `/`: status overview - `/`: status overview
- `/wifi`: WiFi/MQTT/NTP config (AP and STA) - `/wifi`: WiFi/MQTT/NTP config (AP and STA)
- `/sender/<device_id>`: per-sender details - `/sender/<device_id>`: per-sender details
- Sender IDs on `/` are clickable (open sender page in a new tab). - Sender IDs on `/` are clickable (open sender page in a new tab).
- In STA mode, the UI is also available via the boards IP/hostname on your WiFi network.
## MQTT ## MQTT
- Topic: `smartmeter/<deviceId>/state` - Topic: `smartmeter/<deviceId>/state`

View File

@@ -78,6 +78,8 @@ constexpr bool SERIAL_DEBUG_DUMP_JSON = false;
constexpr bool LORA_SEND_BYPASS = false; constexpr bool LORA_SEND_BYPASS = false;
constexpr bool ENABLE_SD_LOGGING = false; constexpr bool ENABLE_SD_LOGGING = false;
constexpr uint8_t PIN_SD_CS = 25; 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; constexpr uint8_t NUM_SENDERS = 1;
inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = { inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = {

View File

@@ -642,8 +642,8 @@ void setup() {
} else { } else {
g_ap_mode = true; g_ap_mode = true;
char ap_ssid[32]; char ap_ssid[32];
snprintf(ap_ssid, sizeof(ap_ssid), "DD3-Bridge-%04X", g_short_id); snprintf(ap_ssid, sizeof(ap_ssid), "%s%04X", AP_SSID_PREFIX, g_short_id);
wifi_start_ap(ap_ssid, "changeme123"); wifi_start_ap(ap_ssid, AP_PASSWORD);
if (g_cfg.ntp_server_1.isEmpty()) { if (g_cfg.ntp_server_1.isEmpty()) {
g_cfg.ntp_server_1 = "pool.ntp.org"; g_cfg.ntp_server_1 = "pool.ntp.org";
} }