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.

75 lines
3.7 KiB

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