Star on GitHubStar2.4k stars

Case study

open-desk-lamp-firmware: replacement firmware for the Xiaomi desk lamp

Replaces the ESP8266-based Xiaomi desk lamp firmware with an open implementation of the lamp's local power, dimming and colour-temperature controls, based on the documented board wiring.

Targets
Firmware
Category
Independent reconstruction cases
Relationship
Independent reconstruction project
Sources reviewed
Stars
113
Last commit
2019-03-19
Language
C
License (GitHub)
MIT

GitHub data as of 2026-11-09

Copy as MarkdownView JSONCite

Requirements & limits

  • The firmware covers the lamp's local knob controls: power, dimming and colour temperature; the author's hardware variant is the documented target.
  • Installation requires opening the lamp, wiring U0RX, U0TX, GPIO0 and GND to a USB serial adapter, and overwriting stock firmware. Back up the original flash; the backup contains Wi-Fi credentials. Check flash size for other variants.
  • Build with CMake 2.8+, xtensa-lx106-elf from esp-open-sdk and Espressif's ESP8266 NONOS SDK. CI compiles the firmware but runs no tests.
  • The project uses MIT; Espressif's SDK libraries have their own modified MIT license. Stock firmware and the Xiaomi app retain their own terms.

Cite

BibTeX

@misc{xiaomi-desk-lamp-open-firmware-case,
  title = {{open-desk-lamp-firmware: replacement firmware for the Xiaomi desk lamp}},
  howpublished = {\url{https://github.com/fvollmer/open-desk-lamp-firmware}},
  url = {https://github.com/fvollmer/open-desk-lamp-firmware},
  urldate = {2026-10-27},
  note = {Awesome REA entry: \url{https://awesomerea.org/resources/xiaomi-desk-lamp-open-firmware-case/}}
}

Plain text

open-desk-lamp-firmware: replacement firmware for the Xiaomi desk lamp. https://github.com/fvollmer/open-desk-lamp-firmware (accessed 2026-10-27). Awesome REA entry: https://awesomerea.org/resources/xiaomi-desk-lamp-open-firmware-case/

Useful? Star Awesome REA on GitHub2.4k

About this entry

The description was reviewed against primary sources.

Report an outdated entry Suggest a translation fix

Primary sources

  1. README.md GitHub · fvollmer/open-desk-lamp-firmware · Revision 043aeb9
  2. src/CMakeLists.txt GitHub · fvollmer/open-desk-lamp-firmware · Revision 043aeb9
  3. src/main.c GitHub · fvollmer/open-desk-lamp-firmware · Revision 043aeb9
  4. src/leds.c GitHub · fvollmer/open-desk-lamp-firmware · Revision 043aeb9
  5. .travis.yml GitHub · fvollmer/open-desk-lamp-firmware · Revision 043aeb9
  6. LICENSE GitHub · fvollmer/open-desk-lamp-firmware · Revision 043aeb9
  7. https://github.com/fvollmer/open-desk-lamp-firmware/releases/tag/v0.0.1
  8. README.md GitHub · pfalcon/esp-open-sdk · Revision c70543e
  9. Makefile GitHub · pfalcon/esp-open-sdk · Revision c70543e

More in Firmware and hardware

All 260 entries in Firmware and hardwareFirmware and hardware case studies (175)

↑↓ move↵ open⌘↵ new tab