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.

70 lines
3.3 KiB

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. ## Quick start guide
  33. For those who have experience with flashing ESPHome onto devices:
  34. * Clone the [GitHub repo](https://github.com/mmakaay/esphome-xiaomi_bslamp2)
  35. into your ESPHome `config/custom_components` directory.
  36. * Copy `[doc/example.yaml](doc/example.yaml)` to `config/your_device_name.yaml`.
  37. * Modify the configuration to your needs (see the [configuration guide](doc/configuration.md)]).
  38. * Compile the `firmware.bin` file and download it to the device to which you
  39. have connected your serial to USB adapter (FTDI).
  40. * Open up the lamp and connect its `TX`, `RX`, `GND` and `GPIO0` debug pads
  41. to the serial adapter (see the [installation
  42. guide](doc/installation.md) for the debug pad locations).
  43. * Power up the lamp with `GPIO0` connected to GND to enable flashing mode.
  44. * Flash `firmware.bin` onto the device.
  45. If you experience regular disconnects between Home Assistant and the lamp,
  46. then take a look at the [known issues document](doc/known_issues.md).
  47. ## Table of contents
  48. * [Why custom firmware?](doc/why_custom_firmware.md)
  49. * [Installation guide](doc/installation.md)
  50. * [Configuration_guide](doc/configuration.md)
  51. * [Flashing guide](doc/flashing.md)
  52. * [Known issues](doc/known_issues.md)
  53. * [Sponsoring](doc/sponsoring.md)