lsh-core is the deterministic firmware engine for the Labo Smart Home stack. It runs on the controller-side MCU, owns the physical topology, and executes the local logic for buttons, actuators, indicators, fallback behavior and the serial protocol spoken with lsh-bridge.
If you are new to the public LSH stack, start with the top-level repository before diving into the firmware API surface:
This hosted API site is published from the latest tagged release so it stays aligned with released artifacts. The repository main branch may move ahead between releases.
This Doxygen site combines three complementary sources:
include/ and src/README.mdvendor/lsh-protocol/shared/lsh_protocol.mdUse the API reference when you need class- and method-level details, and use the README and protocol pages when you need the system contract around the library.
The firmware is intentionally strict about a few invariants:
LSH_STATIC_CONFIG_* values define the exact runtime cardinality for actuators, buttons, indicators, network-click slots and auto-off entries. The C++ API still calls physical inputs Clickable objects because the same finite-state machine can model any button-like input.Configurator::configure() is generated from TOML and directly assigns dense object indexes and manager-array slots. The generated path replaces hand-written registration code.uint8_t values and must stay unique within their domain.BOOT is the re-synchronization trigger used to invalidate cached models in the bridge and force a fresh details + state cycle.README.md for the first-use path and project shape.DOCS.md as the repository documentation map.docs/static-toml-config.md for the schema v2 reference.docs/cookbook.md for copyable configuration recipes.docs/feature-flags.md for compile-time tuning knobs.src/util/constants/config.hpp for resource limits derived from the active user profile.src/communication/constants/protocol.hpp and src/communication/constants/static_payloads.hpp.vendor/lsh-protocol/shared/lsh_protocol.md for the canonical key map, command IDs and golden payload examples.The codebase is optimized for embedded determinism:
For AVR static profiles, the project defaults assume runtime speed first, SRAM second and flash third. That is why the reference TOML profiles prefer framed MsgPack and direct-port I/O even when they cost more flash than the equivalent JSON or Arduino helper path.
That optimization target matters when reviewing or extending the code. Prefer changes that preserve RAM predictability, keep performance-sensitive paths branch-light, and do not relax the boot/resync contract between lsh-core and lsh-bridge.