Browse Source

Added some documentation.

pull/1/head
Maurice Makaay 3 years ago
parent
commit
a9d1ccdac6
2 changed files with 66 additions and 3 deletions
  1. +39
    -2
      README.md
  2. +27
    -1
      doc/example.yaml

+ 39
- 2
README.md View File

@ -8,7 +8,7 @@ repo into that folder. For example on the command line:
``` ```
# mkdir custom_components # mkdir custom_components
# cd custom_compnents
# cd custom_components
# git clone https://github.com/mmakaay/esphome-yeelight_bs2 # git clone https://github.com/mmakaay/esphome-yeelight_bs2
``` ```
@ -25,5 +25,42 @@ config
``` ```
Then add the required configuration to your device's yaml configuration file. Then add the required configuration to your device's yaml configuration file.
For an example file, taks a look at `doc/example.yaml` in this repository.
For an example file, take a look at `doc/example.yaml` in this repository.
## Issue: the device keeps losing its connection to Home Assistant
This is not a problem with the device or the custom firmware, but a problem
in the upstream library "AsyncTCP". I did identify the issue and have a
proposed fix for it. The issue was reported at:
https://github.com/me-no-dev/AsyncTCP/issues/116
If you want to try out this change, then create a `libs` folder in the
folder where your device's yaml configuration file is stored, and clone the
following repository into that folder:
https://github.com/mmakaay/AsyncTCP
For example on the command line:
```
# mkdir libs
# cd libs
# git clone://github.com/mmakaay/AsyncTCP
```
Then add a pointer to this folder from within your device's yaml
configuration file, using the `lib_extra_dirs` option. Provide it with the
absolute path to your `libs` folder. The relevant part of the config change
looks like this:
```yaml
esphome:
platformio_options:
lib_extra_dirs: /config/libs
```
This way, the repository version of the library will override the version of
the library that is bundled with ESPHome. Build the device firmware and
flash the device like you would normally do.

+ 27
- 1
doc/example.yaml View File

@ -1,3 +1,28 @@
substitutions:
name: bedside_lamp
friendly_name: Bedside Lamp
transition_length: 1s
# Use your own preferences for these components.
wifi:
captive_portal:
api:
ota:
logger:
# Special platform + package are used for enabling unicore and disabling the
# efuse mac crc check. These two changes are required for the
# ESP32-WROOM-32D that is used in the Yeelight bedside lamp 2.
esphome:
name: $name
platform: ESP32
board: esp32doit-devkit-v1
platformio_options:
platform: espressif32@1.11.0
platform_packages: |-4
framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.4
# The device uses two I2C busses.
i2c: i2c:
- id: eeprom_i2c - id: eeprom_i2c
sda: 17 sda: 17
@ -8,6 +33,7 @@ i2c:
scl: 19 scl: 19
scan: True scan: True
# The device uses six GPIO pins for driving the LED circuitry.
output: output:
- platform: gpio - platform: gpio
id: master1 id: master1
@ -41,7 +67,7 @@ light:
white: led_w white: led_w
master1: master1 master1: master1
master2: master2 master2: master2
default_transition_length: 1s
default_transition_length: ${transition_length}
effects: effects:
- random: - random:
name: "Slow Random" name: "Slow Random"


Loading…
Cancel
Save