Repository navigation
Releases: Nebur692/mgl001_fw
Release list
v1.4.0
English
- Bluetooth controller rescue window (gateway side): new
mgl001-hassoptions for a Telink controller image that carries a rescue window: for 300 ms after reset it listens on the UART and opens a small flash session that needs nothing of HCI. An image that boots but never answers HCI can then be rewritten without opening the gateway. Xiaomi's controller image does not have the window, so this does not change anything for a controller running it.-btrescue-info: running bank, flash id and boot marks of both banks.-btrescue-read <file>: a copy of the whole 512 KB flash.-btrescue-write <image>: writes a sealed image into the bank that is not running, reads it back, writes the boot mark last and clears the old one, then checks that HCI answers. A power cut at any point leaves a bootable chip.-bthciand-btrescue-cmd: one raw HCI or rescue command, for diagnosis.
- More native in Home Assistant: the gateway pings Home Assistant after a minute of silence, as ESPHome does; every client is told before a reboot or a stop; the LED applies and reports the brightness set in Home Assistant; a full client queue drops Bluetooth advert batches instead of closing the session; the device's friendly name is fixed the first time; time is asked from Home Assistant every 15 minutes.
- Safer updates: one install at a time, downloads time out after 5 minutes, a bank that is not whole is refused, and a trial boot from Home Assistant is kept only once the Zigbee chip has answered ZHA. A failed update check is retried after 10 minutes.
- Tests: Go tests with a simulated controller and a lie for each fix; boot bench 56/56; API benches 62/62 with Home Assistant's own client; Bluetooth bench with Telink's real code.
- No new firmware build in this release: the firmware list for Home Assistant is unchanged, so no gateway is offered an update.
Español
- Ventana de rescate del chip Bluetooth (lado de la pasarela): opciones nuevas de
mgl001-hasspara una imagen del chip de Telink que lleve ventana de rescate: durante 300 ms tras el reset escucha en el UART y abre una sesión mínima de flash que no necesita nada de HCI. Una imagen que arranca pero nunca contesta a HCI se puede volver a grabar sin abrir la pasarela. La imagen del chip de Xiaomi no tiene la ventana, así que esto no cambia nada para un chip que la lleve.-btrescue-info: banco que corre, id de la flash y marcas de arranque de los dos bancos.-btrescue-read <fichero>: una copia de la flash entera de 512 KB.-btrescue-write <imagen>: escribe una imagen sellada en el banco que no corre, la relee, escribe la marca de arranque la última y baja la vieja, y comprueba que HCI contesta. Un corte de luz en cualquier punto deja un chip que arranca.-bthciy-btrescue-cmd: un comando HCI o de rescate suelto, para diagnóstico.
- Más nativa en Home Assistant: la pasarela hace ping a Home Assistant tras un minuto de silencio, como ESPHome; avisa a cada cliente antes de reiniciar o pararse; el LED aplica y devuelve el brillo puesto en Home Assistant; una cola de cliente llena tira tandas de anuncios Bluetooth en vez de cerrar la sesión; el nombre del dispositivo se fija la primera vez; la hora se pide a Home Assistant cada 15 minutos.
- Actualizaciones más seguras: una instalación a la vez, las descargas caducan a los 5 minutos, se rechaza un banco que no esté entero y el arranque de prueba desde Home Assistant solo se fija cuando el chip Zigbee ha contestado a ZHA. Una comprobación de actualizaciones fallida se repite a los 10 minutos.
- Pruebas: pruebas de Go con un chip simulado y una mentira por arreglo; banco del arranque 56/56; bancos de la API 62/62 con el propio cliente de Home Assistant; banco del Bluetooth con el código real de Telink.
- Esta release no trae compilación nueva del firmware: la lista de firmware para Home Assistant no cambia, así que a ninguna pasarela se le ofrece actualizar.
v1.3.0
English
- BurbuHub: the LAN firmware now has its own name. Home Assistant shows it as
BurbuHuband the date of the version (e.g.BurbuHub 2026.10.17.7), on the Firmware sensor, the update entity and the device card. Build names (mgl001_<base>_lan<date>) stay as the technical id. - Time zone from Home Assistant: the gateway takes Home Assistant's own time zone every time it connects, keeps it for the next boots and follows it if you change it there. Until then it uses the one Mi Home saved, or UTC. If the gateway has no time yet, it takes Home Assistant's clock.
- Host name:
BurbuHub-and the end of its MAC, editable from the new Hostname field in Home Assistant (applied at once; the router sees it from the next reboot). Home Assistant keeps knowing the gateway by its ESPHome name, which never changes: an already paired gateway keeps working without setting it up again. - New entities: CPU temperature, last reboot (power on, software or watchdog), Ethernet connected and its speed, IP address, time zone, Zigbee firmware and protocol, Bluetooth firmware and version, and host name.
- Zigbee firmware in Home Assistant: read from what ZHA already asks the chip when it connects (EmberZNet version, build and EZSP version). The bridge only reads a copy of that traffic; it never sends anything of its own to the chip.
- Fix: on the gateway's own busybox, the trial-boot check refused every update from Home Assistant (nothing was changed). A gateway on
lan20261017.2needs one install by hand with the installer; from then on, updates from Home Assistant work again. - Tests: boot bench run on the gateway itself as well; Zigbee frames for the tests made with the ASH encoder of the library ZHA uses.
- Tested on a real gateway:
.5and.7installed from Home Assistant's update entity, kept by themselves, ZHA and every Zigbee device in place, no new setup asked by Home Assistant.
Español
- BurbuHub: el firmware LAN tiene ya nombre propio. Home Assistant lo muestra como
BurbuHuby la fecha de la versión (p. ej.BurbuHub 2026.10.17.7), en el sensor Firmware, la entidad de actualización y la ficha del dispositivo. Los nombres de compilación (mgl001_<base>_lan<fecha>) siguen como id técnico. - Zona horaria de Home Assistant: la pasarela toma la zona horaria de Home Assistant cada vez que conecta, la guarda para los siguientes arranques y la sigue si la cambias allí. Hasta entonces usa la que guardó Mi Home, o UTC. Si la pasarela aún no tiene hora, toma el reloj de Home Assistant.
- Nombre de host:
BurbuHub-y el final de su MAC, editable desde el nuevo campo Hostname en Home Assistant (se aplica al momento; el router lo ve desde el siguiente reinicio). Home Assistant sigue reconociendo la pasarela por su nombre ESPHome, que no cambia nunca: una pasarela ya emparejada sigue funcionando sin volver a configurarla. - Entidades nuevas: temperatura del procesador, último reinicio (encendido, software o vigilante), red por cable conectada y su velocidad, dirección IP, zona horaria, firmware y protocolo del Zigbee, firmware y versión del Bluetooth, y nombre de host.
- Firmware del Zigbee en Home Assistant: leído de lo que ZHA ya le pregunta al chip al conectar (versión de EmberZNet, compilación y versión de EZSP). El puente solo lee una copia de ese tráfico; nunca manda nada propio al chip.
- Arreglo: con la busybox de la propia pasarela, la comprobación del arranque de prueba rechazaba toda actualización desde Home Assistant (sin cambiar nada). Una pasarela en
lan20261017.2necesita una instalación a mano con el instalador; desde ahí, las actualizaciones desde Home Assistant vuelven a funcionar. - Pruebas: el banco del arranque también se pasa en la propia pasarela; las tramas Zigbee de las pruebas, hechas con el codificador ASH de la librería que usa ZHA.
- Probado en una pasarela real:
.5y.7instaladas desde la entidad de actualización de Home Assistant, fijadas solas, ZHA y todos los dispositivos Zigbee en su sitio, sin que Home Assistant pidiera configurar nada.
v1.2.0
English
- LAN variant (
mgl001_1.0.8_0013_lan20261017.2): every Xiaomi service removed (cloud, Mi Home, Matter, Xiaomi Bluetooth, Wi‑Fi). The gateway becomes a native Home Assistant device (ESPHome API, encrypted) and a network Zigbee coordinator for ZHA, and Home Assistant discovers both by itself. Wired DHCP with the stock host name and MAC, NTP in the time zone Mi Home saved, telnet and SSH, hardware watchdog. - Built-in Zigbee bridge:
mgl001-zigbee, its own system service on TCP 6638, announced for ZHA to discover. It sets the chip's port up completely and is independent from the Home Assistant service: restarting one never cuts the other. Noopenmiio_agentneeded. - Updates from Home Assistant: the gateway's Firmware update entity installs new LAN builds from this repository into the bank not in use, as a one-time trial boot. The new firmware stays only when ZHA and Home Assistant are connected again; otherwise the gateway goes back to the previous one by itself.
- Trial boot by hand:
mgl001-boot try,keep,back,status. The installer also has a non-interactive mode,--install NAME [--trial]. - Zigbee coordinator firmware in
zigbee/: EmberZNet 7.5.1 for the EFR32MG21 (EZSP 13, up to 64 end devices) and Xiaomi's stock image, with flashing notes. - Daily check for new upstream Zigbee and Bluetooth firmware, reported as an issue.
- Entities: RGB LED, the button (press, double press, long press), Zigbee bridge connected, uptime, free memory, load, free storage, firmware, firmware bank, restart and firmware update. The Bluetooth proxy (passive, active and automatic scanning, connections, pairing) is experimental and can be turned off.
- Tested on a real gateway: installed, then updated from Home Assistant's own update entity; the trial boot kept itself once ZHA was back, with every Zigbee device in place.
To try it, run the installer, pick the line with _lan and follow the step-by-step setup in the README. The modified firmwares (mod) do not change.
Español
- Variante LAN (
mgl001_1.0.8_0013_lan20261017.2): sin ningún servicio de Xiaomi (nube, Mi Home, Matter, Bluetooth de Xiaomi, wifi). La pasarela pasa a ser un dispositivo nativo de Home Assistant (API de ESPHome, cifrada) y un coordinador Zigbee en red para ZHA, y Home Assistant encuentra los dos solo. Red por cable con DHCP, el nombre y la MAC de fábrica, NTP en la zona horaria que guardó Mi Home, telnet y SSH, vigilante de hardware. - Puente Zigbee propio:
mgl001-zigbee, un servicio del sistema en el TCP 6638, anunciado para que ZHA lo descubra. Configura entero el puerto del chip y va aparte del servicio de Home Assistant: reiniciar uno nunca corta el otro. Ya no hace faltaopenmiio_agent. - Actualizaciones desde Home Assistant: la entidad de actualización Firmware de la pasarela instala las nuevas compilaciones LAN de este repositorio en el banco libre, con un arranque de prueba de una vez. El firmware nuevo solo se queda cuando ZHA y Home Assistant vuelven a estar conectados; si no, la pasarela vuelve sola al anterior.
- Arranque de prueba a mano:
mgl001-boot try,keep,back,status. El instalador tiene además un modo sin preguntas,--install NOMBRE [--trial]. - Firmware del coordinador Zigbee en
zigbee/: EmberZNet 7.5.1 para el EFR32MG21 (EZSP 13, hasta 64 dispositivos finales) y el original de Xiaomi, con notas de flasheo. - Aviso diario de firmware Zigbee y Bluetooth nuevo, como incidencia.
- Entidades: LED RGB, el botón (pulsación, doble y larga), puente Zigbee conectado, tiempo encendida, memoria libre, carga, almacenamiento libre, firmware, banco de firmware, reinicio y actualización de firmware. El proxy Bluetooth (escaneo pasivo, activo y automático, conexiones, emparejamiento) es experimental y se puede apagar.
- Probado en una pasarela real: instalado y después actualizado desde la propia entidad de actualización de Home Assistant; el arranque de prueba se quedó solo en cuanto ZHA volvió, con todos los dispositivos Zigbee en su sitio.
Para probarlo, ejecuta el instalador, elige la línea con _lan y sigue la puesta en marcha paso a paso del README. Los firmwares modificados (mod) no cambian.
v1.1.0
English
- Block Mi Home updates when you want:
mgl001-ota lockmakes Mi Home updates fail before anything is written,mgl001-ota unlockallows them again,mgl001-ota statustells which. It survives reboots. The check sits at the only path Mi Home uses to install firmware, and the downloaded package is deleted as Xiaomi does when an update fails. - Power-cut safe installer: the boot is no longer switched after each write. Both images are written and checked first, then the kernel and rootfs switch together in a single write of the U-Boot environment. A power cut or a dropped SSH session at any point leaves the gateway on the firmware it was running. The previous installer could leave the kernel of one bank with the rootfs of the other.
- The installer also refuses to start when a boot switch is still waiting for a reboot, checks free memory before downloading, and checks the GitHub certificate. Going back with
rto an older bank warns and asks you to typeolder. - Telnet/SSH watchdog: if they stop listening, they are started again within a minute.
- Install command fixed: the stock firmware has no
curl, so the README now downloads the installer with the gateway's ownopenssl, checking the certificate. - Firmwares: 1.0.5_0016 and 1.0.8_0013, stock and modified (
20261016.2). Tested on a real gateway: installed from GitHub, rebooted into the new bank, every Zigbee and BLE device back in Home Assistant.
If you are on a modified firmware, run the installer again and pick the 20261016.2 image for your version. See the README.
Español
- Bloquea las actualizaciones de Mi Home cuando quieras:
mgl001-ota lockhace que fallen antes de escribir nada,mgl001-ota unlocklas vuelve a permitir ymgl001-ota statusdice cómo está. Aguanta los reinicios. La comprobación está en la única vía por la que Mi Home instala firmware, y el paquete descargado se borra como hace Xiaomi cuando una actualización falla. - Instalador a prueba de cortes de luz: el arranque ya no cambia tras cada grabación. Primero se graban y comprueban las dos imágenes, y después kernel y sistema cambian juntos en una única escritura del entorno de U-Boot. Un corte de luz o una sesión SSH que se cae en cualquier momento dejan la pasarela con el firmware que tenía. El instalador anterior podía dejar el kernel de una copia con el sistema de la otra.
- El instalador además no empieza si hay un cambio de arranque pendiente de reiniciar, comprueba la memoria libre antes de descargar y comprueba el certificado de GitHub. Volver con
ra una copia más antigua avisa y pide escribirolder. - Vigilante de telnet/SSH: si dejan de escuchar, se vuelven a lanzar en menos de un minuto.
- Orden de instalación arreglada: el firmware original no trae
curl, así que el README descarga ahora el instalador con elopensslde la propia pasarela, comprobando el certificado. - Firmwares: 1.0.5_0016 y 1.0.8_0013, original y modificado (
20261016.2). Probado en una pasarela real: instalado desde GitHub, arrancado en la copia nueva y con todos los aparatos Zigbee y BLE de vuelta en Home Assistant.
Si ya tienes un firmware modificado, ejecuta el instalador otra vez y elige la imagen 20261016.2 de tu versión. Consulta el README.
v1.0.0
English
First public release.
Stock and modified firmware for the Xiaomi Smart Home Hub 2 (lumi.gateway.mgl001), plus a verified A/B installer that keeps your paired devices and settings.
- Firmwares: 1.0.5_0016 and 1.0.8_0013, each stock and modified.
- The modified firmware keeps the stock firmware untouched and adds telnet and SSH always open at boot (in the background, so they can never hold up the boot), plus
curl/tcpdump/htop/nanobuilt static for the ARM CPU. - The installer flashes the bank that is not in use and switches to it, verifies model, SHA-256 and the written image, and refuses to downgrade.
- Fully reproducible from the stock firmware with the scripts under
tools/.
See the README for install and recovery.
Español
Primera versión pública.
Firmware original y modificado para la Xiaomi Smart Home Hub 2 (lumi.gateway.mgl001), más un instalador A/B verificado que conserva tus aparatos emparejados y tus ajustes.
- Firmwares: 1.0.5_0016 y 1.0.8_0013, cada uno original y modificado.
- El firmware modificado conserva el original sin tocar y añade telnet y SSH siempre abiertos en el arranque (en paralelo, para que nunca puedan frenar el arranque), más
curl/tcpdump/htop/nanocompilados estáticos para la CPU ARM. - El instalador graba la copia que no está en uso y cambia a ella, comprueba el modelo, el SHA-256 y la imagen grabada, y se niega a bajar de versión.
- Totalmente reproducible desde el firmware original con los guiones de
tools/.
Consulta el README para instalar y recuperar.