Code Monkey home page Code Monkey logo

open-desk-lamp-firmware's Introduction

open-desk-lamp-firmware

The Xiaomi desk lamp is a modern IoT device, that uses the ESP8266 microcontroller. This project provides an open source firmware replacement this lamp. It provides basic functionality:

  • Toggle on/off (press and release button)
  • Dimming (rotate button while on)
  • Change color temperature (press and rotate button while on)

Doesn't provide any IoT features at the moment. But who needs IoT features of a desk lamp?!

Hardware

You can open the lamp by unscrewing the three screws at the bottom of the lamp (under the rubber feets). Then you can see this. The main pcb should look like this:

The Hardware basically consists of an ESP8266 Module, some regulators and a rotary encoder. The ESP8266 controls two switching regulators via PWM to set the brightness of the cold and warm LEDs. For some reason the esptool.py detects the ESP8266 as ESP8285, even trough there is an external flash chip.

Enter Flashing Mode

  1. Solder Connections to U0RX, U0TX, GPIO0 and GND on main pcb.
  2. Connect U0RX, U0TX and GND to USB serial adapter, pull GPIO0 to GND.
  3. Toggle Power

Backup

Before starting you might want to backup the original firmware. Be carefull, this backup contains settings like your wifi credentials! Make sure to check the flash size (just in case there are other variants).

esptool.py --port /dev/ttyUSB0 read_flash 0x00000 0x200000 image.bin

You can write the backup back with:

esptool.py --port /dev/ttyUSB0 write_flash 0x00000 image.bin

Build and Install

Install esp-open-sdk, setup PATH enviroment variable (e.g. export PATH=/opt/esp-open-sdk/xtensa-lx106-elf/bin:$PATH)

Build the firmware:

mkdir bin
cd bin
cmake ../src/
make

Flash the firmware:

make flash

FAQ

Q: Why do you buy an IoT desk lamp?
A: I like the design of the lamp, but not the communication with third party internet servers.

Q: Can you please add IoT features to your firmware?
A: I'm not personally intrested in theses features. Feel free to open a pull request.

open-desk-lamp-firmware's People

Contributors

akshayak603 avatar fvollmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-desk-lamp-firmware's Issues

how to use the bin files in latest release?when my flash chip is broken

my flash chip is broken, I want to write a bin file into a new flash chip.
so I need a 2M bin file
will this work?
dd if=/dev/zero of=xiaomilamp.bin bs=1M count=2
dd if=file1.bin of=xiaomilamp0x000001.bin bs=1 conv=notrunc
dd if=file2.bin of=xiaomilamp0x100001.bin bs=1 seek=$((0x100000)) conv=notrunc

Is the WiFi turned off completely?

When this (or a similar) firmware is applied, does it meant the WiFi module is turned off and there will be no RF emissions? Or is it just not successfully establishing a connection, but still being "on"?

I have no knowledge whatsoever in this field. But I am curious about the potential behaviour.

An image of the original lamp firmware

Hello!
I want to recreate the yeelight LXV1.7 board for use as a ceiling light control box.
An esp8266 board should come to me soon, but I do not have such a lamp and therefore I would be very happy if you upload the yeelight firmware image.

Looking for the original 2.0.6_0007 (or "similar") firmware binary

Hi there. I did the firmware upgrade as instructed by the Xiaomi Home app from 2.0.6_0007 to 2.1.7_0020 and this new firmware bricked my device! :( Here's the link to the forum with my case - I'm pretty sure no one could help me there.

I'm asking you guys, could someone make a backup of the old (2.0.6_0007?) firmware with this command esptool.py --port /dev/ttyUSB0 read_flash 0x00000 0x200000 image.bin and post it here / send it to me?

I really liked my lamp :c

I can offer some kind of "gift" to someone who can do the firmware backup and send it here 🙏

Does this fw disable the Wifi radio?

Thank you for the work on firmware.

I just want to disable Wifi radio permanently b/c I am concerned staying with wifi on all night long near my bed.

It isn't clear to me what this firmware does?

Does this firmware disable the wifi radio, or just do not communicate with xiaomi servers?

Is there something that can be desoldered on the PCB to disable wifi permanently?

Also can you put a link to the cable that you used to connect to the lamp, USB to serial.

Thank you again !

Pre-built Binary

sorry i'm being very lazy and dont have a ready build environment on hand, is it possible to have a pre-built binary that I can flash from windows?

BTW, the adjust function is the same as the original firmware? the lamp will remember the last set brightness and colour temperature?

thx.
createhub123

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.