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.

66 lines
3.5 KiB

3 years ago
3 years ago
  1. # ESPHome components for Xiaomi Mijia Bedside Lamp 2
  2. [ [Changelog](CHANGELOG.md) | [License](LICENSE.md) | [Code of conduct](CODE_OF_CONDUCT.md) ]
  3. The Bedside Lamp 2 is a smart RGBWW LED lamp, produced by Yeelight for the Xiaomi Mijia brand. It
  4. can be controlled via the WiFi network and from a touch panel on the front of the device. The touch
  5. panel contains a power button, a button that changes the color of the light and a slider that can be
  6. used to change the brightness of the light.
  7. This project provides custom components for ESPHome, which make it possible to fully control every
  8. aspect of the lamp and to integrate the lamp in your Home Assistant setup.
  9. ## Features
  10. * The lamp **integrates easily with Home Assistant** using the ESPHome integration.
  11. * **The lamp no longer phones home to the Mijia Cloud.** Using this firmware, you can rest assured
  12. that the network traffic is limited to your own network. This matches the ideas behind Home
  13. Assistant, of providing a local home automation platform, that puts privacy first.
  14. * **No more need for the LAN control option** to integrate the lamp with Home Assistant. Especially
  15. important, because Xiaomi decided in all their wisdom to remove LAN control from the device,
  16. breaking existing integrations.
  17. * **The night light supports multiple colors**. The original firmware only supports a single warm
  18. white night light color.
  19. * **Smooth light color transitions**, unlike the current version of the Yeelight integration. The
  20. Homekit integration does provide good transitions, but on my system, the color temperature white
  21. light mode is missing in the Home Assistant GUI.
  22. * **Since the components of the lamp are exposed as ESPHome components, you don't have to stick with
  23. the lamp's original behavior**. You can hook up the lamp in your home automation as you see fit.
  24. Use the slider to control the volume of your audio set? Long press the power button to put your
  25. house in night mode? Use the illumination behind the slider bar to represent the progress of your
  26. sour dough bread bulk fermentation? Go ahead, make it so! :-)
  27. * **Possibilities to extend the device's functionality through hardware mods.** There are [GPIO pins
  28. that are not in use](doc/technical_details.md#esp32-pinout). If "tinkerer" is your middle name,
  29. you can use those pins to come up with your own hardware hacks to extend the device's
  30. functionality.
  31. ## Quick start guide
  32. For those who have experience with flashing ESPHome onto devices:
  33. * Make sure you are using ESPHome v1.18.0 or newer.
  34. * Copy [`example.yaml`](example.yaml) to `<CONFIG_DIR>/<NODE_NAME>.yaml`.
  35. * Modify the configuration to your needs (see the [configuration guide](doc/configuration.md)).
  36. * Compile the `firmware.bin` file and download it to the device to which you have connected your
  37. serial to USB adapter.
  38. * [Open up the lamp](doc/flashing.md#opening-the-lamp-to-expose-the-pcb) and connect its `TX`, `RX`,
  39. `GND` and `GPIO0` debug pads to the serial adapter. Check this [image for the debug pad
  40. locations](doc/images/09_debug_pads_for_soldering.jpg).
  41. * Power up the lamp with `GPIO0` connected to GND to enable flashing mode.
  42. * Flash `firmware.bin` onto the device, for example using
  43. [esphome-flasher](https://github.com/esphome/esphome-flasher)..
  44. ## Table of contents
  45. * [Why custom firmware?](doc/why_custom_firmware.md)
  46. * [Installation guide](doc/installation.md)
  47. * [Configuration_guide](doc/configuration.md)
  48. * [Flashing guide](doc/flashing.md)
  49. * [Technical details](doc/technical_details.md)
  50. * [Sponsoring](doc/sponsoring.md)