You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
3.2 KiB

  1. # Flahsing Bedlight
  2. ## Tools needed
  3. * imbus or torx screw driver (3mm?)
  4. * Soldering Iron
  5. * pehabs some Sticky tape
  6. * a serial to USB adapter with 3,3 Volt output
  7. * Some wires
  8. ## Warning
  9. We have writen this instructions with care, but we will gave absoultly no warnenty. Perhabs you will destroy your device and your computer.
  10. ## Opening the yeelight
  11. Remove the rubber on the botton of the bottom of the light.
  12. Unbolt the 4 Screws which was hidden by the rubber.
  13. ![Photo of the screws](Yeelight_screws.jpg "You will need an imbus or torx screw driver to remove the screws.")
  14. Remove the plastic.
  15. ## Solder the wires
  16. Solder the wires to the points of this picture.
  17. ![Soldering points of a yeelight](https://community-assets.home-assistant.io/optimized/3X/1/3/1340a2367e5894281ac6d042f328d9db80ae7da4_2_790x750.jpeg)
  18. You can use stick tape to fix the cables before soldering.
  19. ## Connect to your flashing device
  20. Make sure that your that your flashing device is given 3.3 Volt between GND and VCC. If not you can use the regular power adapter instead.
  21. | Soldering point| Serial USB Adapter name |
  22. | -------------- |:------------------------:|
  23. | Gnd | Gnd |
  24. | TX | RX |
  25. | RX | TX |
  26. | GPIO0 | Gnd |
  27. | 3.3 V | VCC or regular power adapter|
  28. Connect all wires execpt VCC or Power Adapter, then plugin the power in the last step.
  29. ## Download and install esptool
  30. See: https://github.com/espressif/esptool/blob/master/README.md#installation--dependencies
  31. ## Make a backup of the current firmware
  32. ```
  33. python esptool.py -p /dev/ttyUSB0 read_flash 0x 0x400000 original-yeelight-firmware.bin
  34. ```
  35. /dev/ttyUSB0 is the port of the usb adaper on linux you will see it with `dmesg`. On Windows this is often `COM1`, `COM2` or `COM3`
  36. Caution: You will find WLAN SSID and Password of the lasted used Wifi in this file
  37. **After each step with esptool, you have to unplug you power line and connect it again.**
  38. ## Flash new firmware
  39. Setup a ESPHome Project, see [README.md](../README.md)
  40. Now you can flash the device directly with esphome or by esptool.
  41. If you want to flash with esptool, compile with esphome and download it.
  42. ```
  43. python.exe .\esptool.py --chip esp32 --port COM3 --baud 115200 write_flash 0x1000 <yourfile.bin>
  44. ```
  45. One your firmware is flashed, you can flash more OTA via ESPHOME.
  46. ## Troubleshooting flash
  47. If you have **A fatal error occurred: MD5 of file does not match data in flash!**
  48. you can try to use the regular power adapter instead of the vcc line.
  49. After this error, user @tabacha successfully flashed esp with tasmota bootloader with the regular power adapter and the following command:
  50. ```
  51. python esptool.py --chip esp32 -p /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dout --flash_freq 40m --flash_size detect 0x1000 bootloader_dout_40m.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 ~/Downloads/schlafzimmerbedlight.bin
  52. ```
  53. You will find the missing tasmota boot files here: https://github.com/arendst/Tasmota/tree/firmware/firmware/tasmota32/ESP32_needed_files
  54. User @tabacha was not able to use tasmota with the beedlight.