Valetudo is a production-grade, self-contained control web interface for robot vacuums. It replaces vendor cloud services by running directly on the vacuum's embedded Linux hardware and communicating with the robot over reverse-engineered local protocols (MiIO/MIoT for Dreame and Roborock, MSmart for Midea, and 3irobotix for Viomi). The backend is a Node.js/Express application that exposes a REST API with OpenAPI schemas, server-sent events for live state/map/log updates, MQTT integration for Home Assistant and Homie discovery, an updater for over-the-air firmware-style binary updates, timers, consumables, and map management. The frontend is a React/TypeScript SPA with a canvas-based interactive map renderer, manual control, provisioning, timers, updater UI, and configuration pages.
This repository provides ESPHome components for integrating the Xiaomi Mijia Bedside Lamp 2 with Home Assistant. It enables full control of the lamp's RGBWW LEDs, front panel touch interface (buttons and slider), and illumination through custom ESPHome components. The firmware replaces the original Xiaomi firmware to eliminate cloud dependencies and enable local-only control. The architecture follows ESPHome's component model with hardware abstraction layers (HAL) for light control and front panel I2C communication. Key features include individually controllable front panel LEDs, light presets with group support, disco mode for immediate updates, night light calibration, and smooth color transitions with hardware-aware handling of low-brightness limitations. The design emphasizes separation of concerns, with distinct modules for color handling, state management, and event processing. Notable technical implementations include a Chain of Responsibility pattern for handling different light modes (off, night, RGB, white), a flexible preset system with group-based activation, and specialized transition handling that avoids attempting smooth color changes at very low brightness levels where the hardware cannot perform them reliably. The firmware maintains compatibility with modern ESPHome versions through active maintenance and timely adaptation to API changes.
HyperCeiler is an Xposed/LSPosed module for Xiaomi HyperOS devices that hooks into system applications (SystemUI, Launcher, Settings, Camera, etc.) to unlock hidden features, disable ads/telemetry, and customize UI elements. The project is a multi-module Android application with a settings UI for toggling hundreds of individual hook rules. It uses a dual-layer architecture: Java/Kotlin hooks via EzHookTool and DexKit for dynamic method interception, and native C++ code for low-level inline patching of ARM64 binaries in system libraries. The codebase includes extensive mutation testing and regression harnesses that compile production source against frozen ROM snapshots and verify behavior via QEMU emulation. While highly specialized for Xiaomi's proprietary stack, the project demonstrates advanced reverse engineering skills and a robust testing methodology.
This repository implements a custom Lovelace card for Home Assistant that displays an interactive map of a robot vacuum's environment. It allows users to select zones, rooms, points, or paths for cleaning and sends corresponding service calls to the vacuum. The card supports multiple vacuum platforms (Xiaomi Miio, Roborock, Valetudo, Neato, Dreame, Roomba, etc.) via platform-specific templates that define map modes, tiles, and icons. It includes a visual editor, localization in 28 languages, pinch-zoom functionality, and a configurable tile/icon system. The architecture is a single-page web component built with LitElement, with modular internal components for map objects, map modes, generators, and UI elements. It relies on Home Assistant frontend internals and custom-card-helpers. The codebase is well-structured with reusable patterns like dependency injection (Context), coordinate transformation (CoordinatesConverter), and template-based service call generation (ServiceCallSchema). However, it has some technical drift due to deprecated rollup plugins, polyfills for legacy browsers, and tight coupling to HA APIs that may break with updates.
This repository is a Home Assistant custom component that integrates a wide range of Xiaomi Mi smart home devices, including air purifiers, humidifiers, air fresh systems, and pedestal fans. It communicates with devices over the local network using the python-miio library, which implements the Xiaomi MiIO protocol. The component exposes devices as fan or climate entities within Home Assistant, providing controls for power, preset modes, child lock, buzzer, LED, target humidity, oscillation, and other device-specific features. It supports over 50 device models, each with tailored attribute mappings and feature flags. The architecture follows the Home Assistant platform pattern: configuration is provided via YAML, and the async_setup_platform function in fan.py (and climate.py for dehumidifiers) initializes the appropriate device class based on the model. Each device class extends a generic base (XiaomiGenericDevice) that handles common operations like on/off, buzzer, and child lock, while subclasses add model-specific capabilities. The component registers custom services for fine-grained control, such as setting favorite level, LED brightness, or PTC heating. State updates are performed via polling, with retry logic for transient network issues. Primary data flows are unidirectional from device to Home Assistant: the component periodically calls the miio device's status method, extracts relevant attributes, and updates the entity state. Commands from the user are translated into miio method calls via an async executor. External dependencies are limited to Home Assistant core, the python-miio library (>=0.5.12), and the construct library (>=2.10.68). The component does not rely on cloud services; all communication is local. The codebase is actively maintained, with recent commits, CI workflows for linting and validation, and support for the latest Home Assistant versions. It demonstrates solid engineering practices for a custom component: clear separation of device models, feature flag bitmasks to conditionally enable services, and consistent error handling. While tightly coupled to Home Assistant's entity model and the miio library, it is well-organized and serves as a reliable integration for Xiaomi devices.
This repository is a Home Assistant custom component for integrating Xiaomi Smart Pedestal Fans (and several other fan models) into the Home Assistant ecosystem. The code in `fan.py` defines a hierarchy of Python classes, starting from a generic `XiaomiGenericDevice` base and specializing through `XiaomiFan`, `XiaomiFanP5`, `XiaomiFanMiot`, and many model-specific subclasses (e.g., `XiaomiFanZA5`, `XiaomiFanP76`). Each subclass maps the device-specific miIO/MIoT properties to Home Assistant's `FanEntity` interface, providing controls for power, speed percentage, preset modes, oscillation angles, LED brightness, buzzers, child locks, and timer delays. The integration also includes custom service definitions (e.g., `fan_set_oscillation_angle`, `fan_set_buzzer_on`) declared in `services.yaml` and `strings.json`. The architecture cleanly separates device communication logic (MiotDevice subclasses with property mappings) from Home Assistant entity logic (FanEntity subclasses). The code is well-structured, uses type hints, follows Home Assistant best practices, and includes CI workflows (HACS validation, hassfest, mypy, pre-commit, yamllint). It targets Python 3.13 and modern HA versions (2024.8+). There are no data research or analytics elements; it is strictly an application integration.
Mi-Create is a desktop GUI application for creating and editing watchfaces for Xiaomi smartwatches. Built with PyQt6, it provides a tabbed interface for managing multiple watchface projects, with dockable panels for project exploration, property editing, and resource management. Users can design watchfaces using widgets (images, text, analog displays, etc.), preview designs, and compile them to binary .face files for device deployment. The application features a plugin system for extensibility, theme management with light/dark modes, internationalization support, and an auto-update mechanism. It handles multiple project formats (Fprj, GMF) and includes tools for format conversion and binary manipulation. The architecture follows a modular design with clear separation of concerns: the main window (WatchfaceEditor) coordinates UI components, while utilities handle plugins, themes, history (undo/redo), and project management. The canvas uses custom QGraphicsView items for rendering watchface elements, and the properties editor dynamically generates input fields based on schema definitions. Platform-specific window effects are implemented for Windows, macOS, and Linux to provide frameless window behavior. The application relies on external dependencies including PyQt6, platform-specific packages (pywin32, pyobjc), and build tools like Wine and a custom compiler for generating watchface binaries. While the codebase demonstrates solid engineering practices with reusable components like the plugin system and theme engine, it shows signs of technical debt including platform-specific conditionals, tight coupling in the main window class (exceeding 2000 lines), and reliance on external tools that may introduce compatibility issues. The presence of TODO comments, commented-out code, and hardcoded values suggests areas for refinement. However, the active maintenance status and structured approach to extensibility indicate a viable project with opportunities for improvement in modularity and dependency management.
Firemote is a Home Assistant custom dashboard card that emulates physical remote controls for a wide range of media devices including Amazon Fire TV, Apple TV, Chromecast, NVIDIA Shield, Roku, Xiaomi, and more. The card provides realistic visual remotes with extensive customization: over 330 app launcher shortcuts, button overrides via Home Assistant scripts or actions, multiple remote styles, and support for device-specific compatibility modes. It integrates with Home Assistant's Android Debug Bridge, Android TV Remote, Apple TV, and Roku integrations. The repository contains the compiled JavaScript card and supporting data files for device definitions and translations, but the source is distributed as a single minified bundle. It is actively maintained with a large community and frequent updates.
MiCode/Xiaomi_Kernel_OpenSource is Xiaomi's official GPL compliance release mechanism for Linux kernel sources powering its Android devices. The default branch (named 'README') contains no application or library code whatsoever -- only a single Markdown file that serves as a structured index mapping ~200 device codenames (e.g., dada-v-oss for Xiaomi 15, alioth-r-oss for Mi 10S) to git branches. Each branch holds the actual Linux kernel source tree for a specific device/Android-version combination, based on Qualcomm CodeAurora (LA.UM/LA.VENDOR) or MediaTek (alps-*) vendor base tags identified in the table. There are no APIs, executables, build scripts, or tests in this branch; the repository's real product is the branch-per-device collection of GPL-required kernel sources. Architecturally this is a source distribution index rather than software. Its value is as reference data: developers building custom ROMs, security researchers auditing device kernels, and compliance tooling all use the README to locate the correct branch for a given device. The catalog is actively maintained -- entries for Android W devices (Xiaomi 17 series, Redmi K90, Xiaomi Pad 8) and a recent commit dated 2026-10-12 indicate ongoing releases -- and the table format is consistent enough to be machine-parsed. However, it exhibits manual-maintenance defects: several links point to differently-named branches (diting-s-oss -> bsp-diting-s-oss, corot-s-oss -> corot-t-oss, goku-u-oss -> goku-u-oss-test), some rows contain stray whitespace, and a few devices appear with overlapping/duplicated entries. The repository is not reusable as a software component, but it is a uniquely comprehensive authoritative mapping of Xiaomi devices to their kernel sources.
This repository provides a GitHub Actions-based continuous integration pipeline for building custom OpenWrt firmware specifically for the Xiaomi AX3000T router. It contains a pre-configured build configuration (`.config`), custom feed scripts (`diy-part1.sh`, `diy-part2.sh`), and a comprehensive workflow file that orchestrates the entire build process: cloning the LEDE source tree, applying customizations (including passwall2, ddns-go, Argon theme, and UA3F), and compiling the firmware. The repository also includes detailed documentation for unlocking SSH on the stock firmware, flashing the custom build, and reverting to the official Xiaomi firmware. While the repo is not a traditional software application, it serves as a build configuration and automation project for embedded Linux firmware development. The codebase is tightly coupled to the specific hardware and build process, offering no reusable software components outside of the OpenWrt build context.