This is a custom firmware project for the EleksTubeHAX family of IPS nixie-tube-style desk clocks. It is an embedded C++ application targeting ESP32 microcontrollers (ESP32, ESP32-S2, S3, C3) using the PlatformIO build system. The firmware provides a full-featured digital clock with customizable clock faces (stored as BMP or CLK images in LittleFS), WiFi connectivity (WPS, static IP), NTP time sync with adaptive polling intervals, battery-backed RTC support (DS1302, DS3231, RX8025T), and RGB backlight control (WS2812 LEDs) with multiple effects (pulse, breath, rainbow). It includes an on-device menu system with button (and gesture sensor) navigation, Home Assistant MQTT auto-discovery for remote control, and IP geolocation for automatic timezone/DST detection. The architecture is a monolith with clear class separation (Backlights, Buttons, Menu, TFTs, Clock, ChipSelect, WiFi_WPS, MQTT_client, IPGeolocation). The code heavily uses conditional compilation (#ifdef HARDWARE_*) to support over a dozen physical clock variants (EleksTube, SI HAI, Xunfeng, IPSTube, MarvelTubes, etc.), which increases complexity but enables a single codebase to target many boards. The project includes forked and modified libraries (TFT_eSPI, NTPClient, RTC_RX8025T, SparkFun APDS9960) integrated into the repo, which may diverge from upstream over time.
This repository provides firmware for ESP8266/ESP32 microcontrollers to interface Mitsubishi Heat Pumps (HVAC units) with MQTT and Home Assistant. The firmware runs on the ESP board, which connects to the heat pump's serial interface using the SwiCago/HeatPump library, and exposes a web interface for configuration and control, as well as MQTT topics for integration with smart home systems. It supports Home Assistant MQTT auto-discovery, Prometheus metrics, OTA firmware updates, and multi-language web UI. The architecture is a monolithic Arduino sketch with separate header files for configuration, HTML templates, JavaScript, and language strings. Key entry points are the setup() and loop() functions in mitsubishi2mqtt.ino, which initialize WiFi, MQTT, the heat pump connection, and a web server. Data flows: the ESP reads heat pump status via serial, publishes state to MQTT, subscribes to command topics, and serves a web control panel. External dependencies include the HeatPump library, ArduinoJson, PubSubClient, and the ESP8266/ESP32 Arduino core.