$ account SignalK
SensESP is an embedded firmware framework for ESP32 microcontrollers that enables building custom marine sensors that communicate via the Signal K protocol. It provides a complete pipeline from physical sensor reading (via Arduino libraries or built-in ADC/digital inputs) through data transformation (30+ composable transforms like linear scaling, moving average, hysteresis, curve interpolation) to publishing over WebSocket to a Signal K server. The framework includes a full web-based configuration UI (Preact/Bootstrap) served directly from the device, WiFi/Ethernet provisioning with captive portal, OTA updates, and a REST API for device management. Architecture follows a reactive dataflow pattern: sensors produce typed values that flow through transform chains to consumers (Signal K output, UI, logging). The core is built on ReactESP event loop, with observable/value producer/consumer abstractions enabling type-safe connections. Notable components include a TOFU certificate pinning system for secure Signal K connections, a circular log buffer with snapshot cursor for the web UI, and a smart switch controller supporting local and remote actuation with double-click sync. The codebase is well-structured with unit tests for transforms, metadata, and networking components, though some deprecated APIs and a large god object (SensESPApp) indicate areas for refactoring.