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.

63 lines
2.2 KiB

  1. < [Why custom firmware?](why_custom_firmware.md) | [Index](../README.md) | [Configuration guide](configuration.md) >
  2. # Installation guide
  3. The code must be compiled using ESPHome. Therefore, a prerequisite is that
  4. you have ESPHome up and running in some form (command line, docker container,
  5. web dashboard, possibly from within Home Assistant).
  6. For information on this, please refer to the documentation on the
  7. [ESPHome website](https://esphome.io).
  8. Create a folder named `custom_components` in the folder where your device's
  9. yaml configuration file is stored. Then clone the the Github repo into a
  10. subfolder `xiaomi_bslamp2`. For example on the command line:
  11. ```
  12. # cd /your/path/to/config
  13. # mkdir custom_components
  14. # cd custom_components
  15. # git clone https://github.com/mmakaay/esphome-xiaomi_bslamp2 xiaomi_bslamp2
  16. ```
  17. Your folder structure should now look like:
  18. ```
  19. config
  20. ├── yourdevice.yaml
  21. ├── custom_components/
  22. │ ├── xiaomi_bslamp2/
  23. │ . ├── README.md
  24. . . ├── LICENSE.md
  25. . . .
  26. ```
  27. On a Rapsbery Pi with HomeAssistant and ESPHome as a plugin, the directory
  28. should be: `/config/esphome/custom_components/xiaomi_bslamp2/`
  29. ```
  30. config
  31. ├── esphome
  32. │ ├── yourdevice.yaml
  33. │ ├── custom_components/
  34. | . ├── xiaomi_bslamp2/
  35. │ . . ├── README.md
  36. . . . ├── LICENSE.md
  37. . . . .
  38. ```
  39. Then create the required configuration in your device's yaml configuration
  40. file. For an example file, take a look at the example file
  41. [doc/example.yaml](doc/example.yaml) in this repository.
  42. Detailed configuration instructions can be found in the
  43. [Configuration guide](doc/configuration.md).
  44. After these steps you can compile your firmware `firmware.bin` file.
  45. This firmware can then be flashed onto the device.
  46. Like normal with ESPHome, the first time you will have to flash the
  47. device using a serial interface. After this initial flashing operation, you
  48. can flash new versions of the firmware using the OTA (Over The Air) method.
  49. See [doc/flashing.md](the flashing guide) for hints on opening up the
  50. device and flashing its firmware using its serial interface.
  51. < [Why custom firmware?](why_custom_firmware.md) | [Index](../README.md) | [Configuration guide](configuration.md) >