Device registry (/devices + hello), static-IP fallback, WS keepalive, uncompressed fonts
Test, Build and Push / test-gateway (push) Successful in 11s
Test, Build and Push / release (push) Skipped
Test, Build and Push / build-gateway (push) Skipped

- gateway: GET /devices registry (per-IP connect count, timestamps,
  device/fw from new 'hello' protocol event); graceful utterance
  errors -> error event; uvicorn ws-ping-timeout 120s
- firmware: hello on WS connect; static 192.168.86.53 fallback after
  15s without DHCP; scan-on-boot removed (kept for diagnostics);
  ping_interval 8s; fonts regenerated --no-compress (compressed
  glyphs render blank with LV_USE_FONT_COMPRESSED off); 8MB factory
  partition; montserrat_28; LVGL lock timeout semantics fixed
- docs: sauron endpoint plan, power ladder, versioning policy

Known issue: 'Outside' AP association succeeds but no L2 traffic
flows (no DHCP, no ARP) — worked once at 22:05 then never again;
ToJ side verified clean. Investigation ongoing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 22:34:57 +02:00
co-authored by Claude Fable 5
parent ed0e8221f1
commit 3a402220b0
10 changed files with 4928 additions and 1568 deletions
+9 -1
View File
@@ -5,6 +5,7 @@
#include <string.h>
#include "cJSON.h"
#include "esp_app_desc.h"
#include "esp_log.h"
#include "esp_websocket_client.h"
@@ -61,11 +62,17 @@ static void ws_event(void *arg, esp_event_base_t base, int32_t id, void *data)
(void)base;
esp_websocket_event_data_t *ev = (esp_websocket_event_data_t *)data;
switch (id) {
case WEBSOCKET_EVENT_CONNECTED:
case WEBSOCKET_EVENT_CONNECTED: {
ESP_LOGI(TAG, "gateway connected");
s_connected = true;
char hello[128];
snprintf(hello, sizeof(hello),
"{\"type\":\"hello\",\"device\":\"desklock-p4\",\"fw\":\"%s\"}",
esp_app_get_description()->version);
gw_send_text(hello);
face_set(FACE_IDLE);
break;
}
case WEBSOCKET_EVENT_DISCONNECTED:
case WEBSOCKET_EVENT_ERROR:
if (s_connected) {
@@ -97,6 +104,7 @@ void gw_start(void)
.buffer_size = 8192,
.reconnect_timeout_ms = 5000,
.network_timeout_ms = 10000,
.ping_interval_sec = 8, /* keep the link visibly alive through long Tatlock turns */
};
s_ws = esp_websocket_client_init(&cfg);
esp_websocket_register_events(s_ws, WEBSOCKET_EVENT_ANY, ws_event, NULL);