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
1.9 KiB

3 years ago
  1. # esphome-yeelight_bs2
  2. ## Installation
  3. Create a folder named `custom_components` in the folder where your
  4. device's yaml configuration file is stored. Then clone the the Github
  5. repo into a subfolder `yeelight_bs2`. For example on the command line:
  6. ```
  7. # mkdir custom_components
  8. # cd custom_components
  9. # git clone https://github.com/mmakaay/esphome-yeelight_bs2 yeelight_bs2
  10. ```
  11. Your folder structure should now look like:
  12. ```
  13. config
  14. ├── yourdevice.yaml
  15. ├── custom_components/
  16. │ ├── yeelight_bs2/
  17. │ . ├── README.md
  18. . . ├── yeelight_bs2_light_output.h
  19. . .
  20. .
  21. ```
  22. Then add the required configuration to your device's yaml configuration file.
  23. For an example file, take a look at `doc/example.yaml` in this repository.
  24. ## Issue: the device keeps losing its connection to Home Assistant
  25. This is not a problem with the device or the custom firmware, but a problem
  26. in the upstream library "AsyncTCP". I did identify the issue and have a
  27. proposed fix for it. The issue was reported at:
  28. https://github.com/me-no-dev/AsyncTCP/issues/116
  29. If you want to try out this change, then create a `libs` folder in the
  30. folder where your device's yaml configuration file is stored, and clone the
  31. following repository into that folder:
  32. https://github.com/mmakaay/AsyncTCP
  33. For example on the command line:
  34. ```
  35. # mkdir libs
  36. # cd libs
  37. # git clone://github.com/mmakaay/AsyncTCP
  38. ```
  39. Then add a pointer to this folder from within your device's yaml
  40. configuration file, using the `lib_extra_dirs` option. Provide it with the
  41. absolute path to your `libs` folder. The relevant part of the config change
  42. looks like this:
  43. ```yaml
  44. esphome:
  45. platformio_options:
  46. lib_extra_dirs: /config/libs
  47. ```
  48. This way, the repository version of the library will override the version of
  49. the library that is bundled with ESPHome. Build the device firmware and
  50. flash the device like you would normally do.