LightHub is a flexible open-source smart-home controller firmware for Arduino Mega 2560, Arduino Due, ESP8266, ESP32 / ESP32-C3, STM32, NRF52840 and M5Stack.
Links:
A microcontroller-based smart-home hub that exposes every physical channel as an MQTT-addressable “item” (virtual channel):
myhome/in/<device>/<item>[/subitem]/<suffix> <- commands
myhome/s_out/<device>/<item>[/subitem]/<suffix> <- status
CH_*, 0..23): DMX dimmers, PWM, relays, groups, thermostats,
PID, Modbus (dimmer + universal master), Haier AC, NeoPixel strips, motorized gates,
UART bridges, relay-PWM, multizone ventilation (VENTS), elevator, counters,
humidifier, Mercury energy meters, sprinkler controller.map transformations, rotary encoders with profiles, DHT22, CCS811, HDC1080, 1-Wire.The complete API reference for the firmware source is published under doxygen/.
Highlights:
item.h — items (virtual channels), channel types, suffixesitemCmd.h — command set and command codesinputs.h — input types (buttons, sensors, rotary encoder)candriver.h — CAN protocol (datagram format, payload types)config.h — config load/save, ETag, MACmodules/out_*.h — one driver class per channel type
(JSON config format, handled commands, published status topics)git clone https://github.com/anklimov/lighthub
cd lighthub
pio run -e <target> # due | mega2560 | esp32-wifi | esp32c3-wifi |
# lighthub21 | nrf52840 | stm32 | ... (16 targets)
Precompiled binaries for all targets are attached to the GitHub releases.