Some docs tidy up (#1895)

This commit is contained in:
Jesse Hills 2022-02-11 11:10:43 +13:00 committed by GitHub
parent dad1275c8a
commit 75107305c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 355 additions and 518 deletions

View File

@ -23,7 +23,7 @@ A Python library that implements this protocol is `aioesphomeapi <https://github
# Example configuration entry # Example configuration entry
api: api:
password: 'MyPassword' password: !secret api_password
Configuration variables: Configuration variables:
------------------------ ------------------------

View File

@ -31,7 +31,7 @@ manually in your browser.
# ... # ...
ap: ap:
ssid: "Livingroom Fallback Hotspot" ssid: "Livingroom Fallback Hotspot"
password: "W1PBGyrokfLz" password: !secret wifi_ap_password
captive_portal: captive_portal:

View File

@ -124,9 +124,10 @@ Configuration example:
esphome: esphome:
name: Shelly 2.5 name: Shelly 2.5
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
esp8266_restore_from_flash: true restore_from_flash: true
i2c: i2c:
sda: GPIO12 sda: GPIO12

View File

@ -7,36 +7,7 @@ Tuya Cover
The ``tuya`` cover platform creates a simple position-only cover from a The ``tuya`` cover platform creates a simple position-only cover from a
tuya serial component. tuya serial component.
There are two components, the Tuya bus and the cover that uses it. The :doc:`/components/tuya` This requires the :doc:`/components/tuya` component to be set up before you can use this platform.
component requires a :ref:`UART bus <uart>` to be configured. Put the ``tuya`` component in
the config and it will list the possible devices for you in the config log.
.. code-block:: yaml
# Example configuration entry
# Make sure your WiFi will connect
wifi:
ssid: "ssid"
password: "password"
# Make sure logging is not using the serial port
logger:
baud_rate: 0
# Enable Home Assistant API
api:
# Make sure you can upload new firmware OTA
ota:
# My cover used the hardware serial port on the alternate pins
uart:
rx_pin: GPIO13
tx_pin: GPIO15
baud_rate: 9600
# Register the Tuya MCU connection
tuya:
Here is an example output for a Tuya M515EGWT (motor for chain roller blinds): Here is an example output for a Tuya M515EGWT (motor for chain roller blinds):

View File

@ -311,18 +311,6 @@ Sample code
.. code-block:: yaml .. code-block:: yaml
esphome:
name: test_node
platform: ESP8266
board: nodemcu
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pass
logger:
level: VERBOSE
uart: uart:
tx_pin: GPIO2 tx_pin: GPIO2
rx_pin: GPIO5 rx_pin: GPIO5

View File

@ -124,17 +124,16 @@ Wi-Fi, API, and OTA configuration.
# Example configuration entry # Example configuration entry
esphome: esphome:
name: inkplate name: inkplate
platform: ESP32
esp32:
board: esp-wrover-kit board: esp-wrover-kit
logger: logger:
wifi: wifi:
ssid: <YOUR WIFI SSID> ssid: !secret wifi_ssid
password: <YOUR WIFI PASSWORD> password: !secret wifi_password
ap: ap: {}
ssid: Inkplate-AP
password: '12345678'
captive_portal: captive_portal:

View File

@ -108,8 +108,7 @@ To bring in color images:
Complete example Complete example
**************** ****************
The following is a complete example YAML configuration that does a few things beyond the usual The following is an example YAML configuration that you can add to your base device configuration. It defines:
Wi-Fi, API, and OTA configuration. It defines:
- three fonts (well, one font in three sizes) - three fonts (well, one font in three sizes)
- a ``binary_sensor`` that indicates the state of connectivity to the API - a ``binary_sensor`` that indicates the state of connectivity to the API
@ -134,32 +133,6 @@ appropriate lines of C code in the lambda to hide or show the image or text as y
.. code-block:: yaml .. code-block:: yaml
esphome:
name: esp_tdisplay
platform: ESP32
board: featheresp32
wifi:
ssid: "ssid"
password: "password"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "esp_tdisplay"
password: "some_password"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "some_api_password"
ota:
password: "some_ota_password"
color: color:
- id: my_red - id: my_red
red: 100% red: 100%

View File

@ -15,7 +15,8 @@ where you specify the **name** of the node.
esphome: esphome:
name: livingroom name: livingroom
comment: Living room ESP32 controller comment: Living room ESP32 controller
platform: ESP32
esp32:
board: nodemcu-32s board: nodemcu-32s
.. _esphome-configuration_variables: .. _esphome-configuration_variables:
@ -50,8 +51,8 @@ Advanced options:
- **name** (**Required**, string): Name of the project - **name** (**Required**, string): Name of the project
- **version** (**Required**, string): Version of the project - **version** (**Required**, string): Version of the project
Old-style platform options, which have been moved to the platform-specific :doc:`esp32 </components/esp32>` and Old-style platform options, which have been moved to the platform-specific :doc:`esp32 </components/esp32>` and
:doc:`esp8266 </components/esp8266>` sections but are still accepted here for compatibility reasons (usage not :doc:`esp8266 </components/esp8266>` sections but are still accepted here for compatibility reasons (usage not
recommended for new projects): recommended for new projects):
- **platform** (**Required**, string): The platform used, either ``esp8266`` or ``esp32``. - **platform** (**Required**, string): The platform used, either ``esp8266`` or ``esp32``.

View File

@ -39,61 +39,16 @@ If available on your reader model, it's recommended to connect 3.3VT (touch indu
fingerprint_grow: fingerprint_grow:
sensing_pin: GPIO12 sensing_pin: GPIO12
on_finger_scan_matched: on_finger_scan_matched:
- text_sensor.template.publish: ...
id: fingerprint_state
state: "Authorized finger"
- switch.turn_on: gate
- delay: 500ms
- switch.turn_off: gate
on_finger_scan_unmatched: on_finger_scan_unmatched:
- text_sensor.template.publish: ...
id: fingerprint_state
state: "Unauthorized finger"
on_enrollment_scan: on_enrollment_scan:
- text_sensor.template.publish: ...
id: fingerprint_state
state: "Finger scanned"
on_enrollment_done: on_enrollment_done:
- text_sensor.template.publish: ...
id: fingerprint_state
state: "Enrolled fingerprint"
on_enrollment_failed: on_enrollment_failed:
- text_sensor.template.publish: ...
id: fingerprint_state
state: "Failed to enroll fingerprint"
# Optional template text sensor for visual feedback
text_sensor:
- platform: template
id: fingerprint_state
name: "Fingerprint State"
# Optional component (GPIO switch, lock etc.) to control in on_finger_scan_matched trigger
switch:
- platform: gpio
pin: GPIO14
id: gate
# Optional sensors
binary_sensor:
- platform: fingerprint_grow
id: fingerprint_enrolling
name: "Fingerprint Enrolling"
sensor:
- platform: fingerprint_grow
fingerprint_count:
name: "Fingerprint Count"
last_finger_id:
name: "Fingerprint Last Finger ID"
last_confidence:
name: "Fingerprint Last Confidence"
status:
name: "Fingerprint Status"
capacity:
name: "Fingerprint Capacity"
security_level:
name: "Fingerprint Security Level"
Configuration variables: Configuration variables:
@ -458,17 +413,6 @@ Sample code
.. code-block:: yaml .. code-block:: yaml
esphome:
name: test_node
platform: ESP8266
board: nodemcu
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pass
logger:
uart: uart:
rx_pin: GPIO13 rx_pin: GPIO13
tx_pin: GPIO15 tx_pin: GPIO15

View File

@ -16,36 +16,7 @@ tuya serial component.
The dimmer switch I got would hang if the logger was configured to use the serial port The dimmer switch I got would hang if the logger was configured to use the serial port
which meant it was bricked until I cut it open. which meant it was bricked until I cut it open.
There are two components, the Tuya bus and the dimmer that uses it. The :doc:`/components/tuya` This requires the :doc:`/components/tuya` component to be set up before you can use this platform.
component requires a :ref:`UART bus <uart>` to be configured. Put the ``tuya`` component in
the config and it will list the possible devices for you in the config log.
.. code-block:: yaml
# Example configuration entry
# Make sure your WiFi will connect
wifi:
ssid: "ssid"
password: "password"
# Make sure logging is not using the serial port
logger:
baud_rate: 0
# Enable Home Assistant API
api:
# Make sure you can upload new firmware OTA
ota:
# My dimmer used the hardware serial port on the alternate pins
uart:
rx_pin: GPIO13
tx_pin: GPIO15
baud_rate: 9600
# Register the Tuya MCU connection
tuya:
Here is an example output for a Tuya dimmer: Here is an example output for a Tuya dimmer:

View File

@ -28,13 +28,13 @@ The controller connects to the UART of the MCU. For ESP32 GPIO PIN 16 to TXD PI
.. note:: .. note::
If you are using an ESP8266, serial logging may cause problems reading from UART. For best results, hardware serial is recommended. Software serial may not be able to read all received data if other components spend a lot of time in the ``loop()``. If you are using an ESP8266, serial logging may cause problems reading from UART. For best results, hardware serial is recommended. Software serial may not be able to read all received data if other components spend a lot of time in the ``loop()``.
For hardware serial only a limited set of pins can be used. Either ``tx_pin: GPIO1`` and ``rx_pin: GPIO3`` or ``tx_pin: GPIO15`` and ``rx_pin: GPIO13``. For hardware serial only a limited set of pins can be used. Either ``tx_pin: GPIO1`` and ``rx_pin: GPIO3`` or ``tx_pin: GPIO15`` and ``rx_pin: GPIO13``.
The disadvantage of using the hardware uart is that you can't use serial logging because the serial logs would be sent to the modbus device and cause errors. The disadvantage of using the hardware uart is that you can't use serial logging because the serial logs would be sent to the modbus device and cause errors.
Serial logging can be disabled by setting ``baud_rate: 0``. Serial logging can be disabled by setting ``baud_rate: 0``.
See :doc:`logger` for more details See :doc:`logger` for more details
.. code-block:: yaml .. code-block:: yaml
@ -67,26 +67,6 @@ Technically there is no difference between the "inline" and the standard definit
.. code-block:: yaml .. code-block:: yaml
esphome:
name: solarstation
platform: ESP32
board: esp32dev
substitutions:
updates: 30s
wifi:
ssid: !secret wifi_sid
password: !secret wifi_password
reboot_timeout: 2min
logger:
level: INFO
baud_rate: 0
api:
password: !secret api_password
uart: uart:
id: mod_bus id: mod_bus
tx_pin: 17 tx_pin: 17
@ -324,12 +304,6 @@ Then battery charge settings are sent.
.. code-block:: yaml .. code-block:: yaml
esphome: esphome:
name: solarstation-test
platform: ESP32
board: esp32dev
## send config values at startup
## configure rtc clock and battery charge settings
on_boot: on_boot:
## configure controller settings at setup ## configure controller settings at setup
## make sure priority is lower than setup_priority of modbus_controller ## make sure priority is lower than setup_priority of modbus_controller

View File

@ -22,7 +22,7 @@ in which case this is not needed.
mqtt: mqtt:
broker: 10.0.0.2 broker: 10.0.0.2
username: livingroom username: livingroom
password: MyMQTTPassword password: !secret mqtt_password
Configuration variables: Configuration variables:
------------------------ ------------------------

31
components/nspanel.rst Normal file
View File

@ -0,0 +1,31 @@
Sonoff NSPanel
==============
.. seo::
:description: Instructions for using ESPHome of the Sonoff NSPanel
The Sonoff NSPanel integration allows ESPHome to control features and functionality of the NSPanel's
built in display.
.. code-block:: yaml
nspanel:
time_id: REPLACEME
temperature: temperature_id
screen_power_switch: screen_power_switch_id
relays:
- relay_1_id
- relay_2_id
widgets:
- type: scene
name: Test
on_click:
- logger.log: Test Scene tapped
- type: empty
...
Configuration Variables:
------------------------

View File

@ -23,7 +23,7 @@ Logging+WiFi+OTA are initialized, so that you can upload a new binary.
# Example configuration entry # Example configuration entry
ota: ota:
safe_mode: true safe_mode: true
password: VERYSECURE password: !secret ota_password
Configuration variables: Configuration variables:
------------------------ ------------------------

View File

@ -106,20 +106,20 @@ complete configuration for a Sonoff B1 looks like:
.. code-block:: yaml .. code-block:: yaml
esphome: esphome:
name: <NAME_OF_NODE> name: REPLACEME
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_WIFI_PASSPHRASE> password: !secret wifi_password
api: api:
logger: logger:
ota: ota:
password: <YOUR_OTA_PASSWORD>
my9231: my9231:
data_pin: GPIO12 # GPIO13 for AiLight data_pin: GPIO12 # GPIO13 for AiLight
@ -147,7 +147,7 @@ complete configuration for a Sonoff B1 looks like:
light: light:
- platform: rgbww - platform: rgbww
name: <LIGHT_NAME> name: REPLACEME
red: output_red red: output_red
green: output_green green: output_green
blue: output_blue blue: output_blue
@ -161,20 +161,20 @@ And here is a complete configuration for the AiThinker AiLight:
.. code-block:: yaml .. code-block:: yaml
esphome: esphome:
name: <NAME_OF_NODE> name: REPLACEME
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_WIFI_PASSPHRASE> password: !secret wifi_password
api: api:
logger: logger:
ota: ota:
password: <YOUR_OTA_PASSWORD>
my9231: my9231:
data_pin: GPIO13 data_pin: GPIO13
@ -199,7 +199,7 @@ And here is a complete configuration for the AiThinker AiLight:
light: light:
- platform: rgbw - platform: rgbw
name: <LIGHT_NAME> name: REPLACEME
red: output_red red: output_red
green: output_green green: output_green
blue: output_blue blue: output_blue

View File

@ -111,20 +111,21 @@ A complete configuration for a Feit Electric A19 looks like:
.. code-block:: yaml .. code-block:: yaml
esphome: esphome:
name: <NAME_OF_NODE> name: REPLACEME
platform: ESP8266 friendly_name: REPLACEME
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_WIFI_PASSPHRASE> password: !secret wifi_password
api: api:
logger: logger:
ota: ota:
password: <YOUR_OTA_PASSWORD>
sm16716: sm16716:
data_pin: GPIO14 data_pin: GPIO14

View File

@ -129,12 +129,13 @@ Sample code
esphome: esphome:
name: test_esp8266 name: test_esp8266
platform: ESP8266
esp8266:
board: nodemcuv2 board: nodemcuv2
wifi: wifi:
ssid: !secret wifi_ssid ssid: !secret wifi_ssid
password: !secret wifi_pass password: !secret wifi_password
output: output:
- platform: esp8266_pwm - platform: esp8266_pwm

View File

@ -16,22 +16,10 @@ Put the ``tuya`` component in the config and it will list the possible devices f
.. code-block:: yaml .. code-block:: yaml
# Example configuration entry
# Make sure your wifi will connect
wifi:
ssid: "ssid"
password: "password"
# Make sure logging is not using the serial port # Make sure logging is not using the serial port
logger: logger:
baud_rate: 0 baud_rate: 0
# Enable Home Assistant API
api:
# Make sure you can upload new firmware OTA
ota:
uart: uart:
rx_pin: GPIO3 rx_pin: GPIO3
tx_pin: GPIO1 tx_pin: GPIO1
@ -55,7 +43,7 @@ Here is an example output for a Tuya fan controller:
Configuration variables: Configuration variables:
------------------------ ------------------------
- **time_id** (*Optional*, :ref:`config-id`): Some Tuya devices support obtaining local time from ESPHome. - **time_id** (*Optional*, :ref:`config-id`): Some Tuya devices support obtaining local time from ESPHome.
Specify the ID of the :ref:`Time Component <time>` which will be used. Specify the ID of the :ref:`Time Component <time>` which will be used.
- **ignore_mcu_update_on_datapoints** (*Optional*, list): A list of datapoints to ignore MCU updates for. Useful for certain broken/erratic hardware and debugging. - **ignore_mcu_update_on_datapoints** (*Optional*, list): A list of datapoints to ignore MCU updates for. Useful for certain broken/erratic hardware and debugging.
@ -72,8 +60,8 @@ Tuya Automation
``on_datapoint_update`` ``on_datapoint_update``
*********************** ***********************
This automation will be triggered when a a Tuya datapoint update is received. This automation will be triggered when a a Tuya datapoint update is received.
A variable ``x`` is passed to the automation for use in lambdas. A variable ``x`` is passed to the automation for use in lambdas.
The type of ``x`` variable is depending on ``datapoint_type`` configuration variable: The type of ``x`` variable is depending on ``datapoint_type`` configuration variable:
- *raw*: ``x`` is ``std::vector<uint8_t>`` - *raw*: ``x`` is ``std::vector<uint8_t>``
@ -106,7 +94,7 @@ The type of ``x`` variable is depending on ``datapoint_type`` configuration vari
datapoint_type: bool datapoint_type: bool
then: then:
- lambda: |- - lambda: |-
ESP_LOGD("main", "on_datapoint_update %s", ONOFF(x)); ESP_LOGD("main", "on_datapoint_update %s", ONOFF(x));
- sensor_datapoint: 6 - sensor_datapoint: 6
datapoint_type: any # this is optional datapoint_type: any # this is optional
then: then:

View File

@ -26,6 +26,13 @@ dramatically improve connection times.
gateway: 10.0.0.1 gateway: 10.0.0.1
subnet: 255.255.255.0 subnet: 255.255.255.0
.. code-block:: yaml
# It is highly recommended to use secrets
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
.. _wifi-configuration_variables: .. _wifi-configuration_variables:
Configuration variables: Configuration variables:

View File

@ -28,7 +28,7 @@ Currently it is supported:
The Arduino sketch can be retrieved from `here <https://gist.github.com/glmnet/49ca3d6a9742fc3649f4fbdeaa4cdf5d#file-arduino_port_expander_sketch-ino>`__ The Arduino sketch can be retrieved from `here <https://gist.github.com/glmnet/49ca3d6a9742fc3649f4fbdeaa4cdf5d#file-arduino_port_expander_sketch-ino>`__
you can rename it to ``.ino`` and use the Arduino IDE to program it. you can rename it to ``.ino`` and use the Arduino IDE to program it.
You need to download `arduino_port_expander.h <https://gist.github.com/glmnet/49ca3d6a9742fc3649f4fbdeaa4cdf5d#file-arduino_port_expander-h>`__ You need to download `arduino_port_expander.h <https://gist.github.com/glmnet/49ca3d6a9742fc3649f4fbdeaa4cdf5d#file-arduino_port_expander-h>`__
and include the arduino_port_expander.h in the ESPHome configuration. and include the arduino_port_expander.h in the ESPHome configuration.
.. code-block:: yaml .. code-block:: yaml
@ -190,14 +190,15 @@ spares I/Os.
esphome: esphome:
name: test_arduino name: test_arduino
platform: ESP8266
board: nodemcu
includes: includes:
- arduino_port_expander.h - arduino_port_expander.h
esp8266:
board: nodemcu
wifi: wifi:
ssid: !secret wifi_ssid ssid: !secret wifi_ssid
password: !secret wifi_pass password: !secret wifi_password
api: api:

View File

@ -128,14 +128,19 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
.. code-block:: yaml .. code-block:: yaml
esphome: substitutions:
name: brilliant_smart_plug name: brilliant_smart_plug
platform: ESP8266 friendly_name: Brilliant Smart Plug
esphome:
name: ${name}
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
logger: logger:
@ -151,13 +156,10 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
input: true input: true
pullup: true pullup: true
inverted: true inverted: true
name: "Power Button" name: "${friendly_name} Power Button"
on_press: on_press:
- switch.toggle: relay - switch.toggle: relay
- platform: status
name: "Status"
switch: switch:
- platform: gpio - platform: gpio
id: red_led id: red_led
@ -166,7 +168,7 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
inverted: true inverted: true
- platform: gpio - platform: gpio
name: "Brilliant Smart Plug" name: "${friendly_name}"
pin: GPIO5 pin: GPIO5
id: relay id: relay
@ -185,14 +187,19 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
.. code-block:: yaml .. code-block:: yaml
esphome: substitutions:
name: mirabella_genio_smart_plug name: mirabella_genio_smart_plug
platform: ESP8266 friendly_name: Mirabella Genio Smart Plug
esphome:
name: ${name}
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
logger: logger:
@ -208,11 +215,9 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
input: true input: true
pullup: true pullup: true
inverted: true inverted: true
name: "Power Button" name: "${friendly_name} Button"
on_press: on_press:
- switch.toggle: relay - switch.toggle: relay
- platform: status
name: Status
switch: switch:
- platform: gpio - platform: gpio
@ -222,7 +227,7 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
inverted: true inverted: true
- platform: gpio - platform: gpio
name: "Mirabella Genio Smart Plug" name: "${friendly_name}"
pin: GPIO12 pin: GPIO12
id: relay id: relay
@ -239,14 +244,19 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
.. code-block:: yaml .. code-block:: yaml
substitutions:
name: gosund_sp1_smart_plug
friendly_name: Gosund SP1
esphome: esphome:
name: gosund_sp1_smart_plug name: gosund_sp1_smart_plug
platform: ESP8266
esp8266:
board: esp8285 board: esp8285
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
logger: logger:
@ -306,14 +316,19 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
.. code-block:: yaml .. code-block:: yaml
esphome: substitutions:
name: topersun_smart_plug name: topersun_smart_plug
platform: ESP8266 friendly_name: Topersun Smart Plug
esphome:
name: ${name}
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
logger: logger:
@ -329,13 +344,10 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
input: true input: true
pullup: true pullup: true
inverted: true inverted: true
name: "Power Button" name: "${friendly_name} Power Button"
on_press: on_press:
- switch.toggle: relay - switch.toggle: relay
- platform: status
name: "Status"
switch: switch:
- platform: gpio - platform: gpio
id: green_led id: green_led
@ -344,7 +356,7 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
inverted: true inverted: true
- platform: gpio - platform: gpio
name: "Brilliant Smart Plug" name: "friendly_name Relay"
pin: GPIO12 pin: GPIO12
id: relay id: relay
@ -362,20 +374,22 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
.. code-block:: yaml .. code-block:: yaml
substitutions: substitutions:
plug_name: coolcam_plug1 name: coolcam_plug1
friendly_name: Coolcam Smart Plug
# Higher value gives lower watt readout # Higher value gives lower watt readout
current_res: "0.00221" current_res: "0.00221"
# Lower value gives lower voltage readout # Lower value gives lower voltage readout
voltage_div: "800" voltage_div: "800"
esphome: esphome:
name: ${plug_name} name: ${name}
platform: ESP8266
esp8266:
board: esp8285 board: esp8285
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
logger: logger:
@ -388,20 +402,20 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
pin: pin:
number: GPIO0 number: GPIO0
inverted: true inverted: true
name: "${plug_name}_button" name: "${friendly_name} Button"
on_press: on_press:
- switch.toggle: relay - switch.toggle: relay
switch: switch:
- platform: gpio - platform: gpio
name: "${plug_name}_LED_Red" name: "${friendly_name} LED Red"
pin: GPIO13 pin: GPIO13
inverted: true inverted: true
restore_mode: ALWAYS_OFF restore_mode: ALWAYS_OFF
id: red_led id: red_led
- platform: gpio - platform: gpio
name: "${plug_name}_Relay" name: "${friendly_name} Relay"
pin: GPIO14 pin: GPIO14
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
id: relay id: relay
@ -422,28 +436,26 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
current_resistor: ${current_res} current_resistor: ${current_res}
voltage_divider: ${voltage_div} voltage_divider: ${voltage_div}
current: current:
name: "${plug_name}_Amperage" name: "${friendly_name} Amperage"
unit_of_measurement: A unit_of_measurement: A
voltage: voltage:
name: "${plug_name}_Voltage" name: "${friendly_name} Voltage"
unit_of_measurement: V unit_of_measurement: V
power: power:
name: "${plug_name}_Wattage" name: "${friendly_name} Power"
unit_of_measurement: W unit_of_measurement: W
id: "${plug_name}_Wattage" id: power_sensor
change_mode_every: 8 change_mode_every: 8
update_interval: 10s update_interval: 10s
- platform: total_daily_energy - platform: total_daily_energy
name: "${plug_name}_Total Daily Energy" name: "${friendly_name} Total Daily Energy"
power_id: "${plug_name}_Wattage" power_id: power_sensor
filters: filters:
# Multiplication factor from W to kW is 0.001 # Multiplication factor from W to kW is 0.001
- multiply: 0.001 - multiply: 0.001
unit_of_measurement: kWh unit_of_measurement: kWh
# Extra sensor to keep track of plug uptime
- platform: uptime
name: ${plug_name}_Uptime SensorPreformatted text
3.6 Arlec Grid Connect Smart Plug In Socket With 2.1A USB Charger 3.6 Arlec Grid Connect Smart Plug In Socket With 2.1A USB Charger
***************************************************************** *****************************************************************
@ -451,20 +463,21 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
.. code-block:: yaml .. code-block:: yaml
substitutions: substitutions:
item_name: "arlec_pc389ha_001" name: arlec_pc389ha_001
friendly_name: Arlec Smart Plug
esphome: esphome:
name: ${item_name} name: ${name}
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails # Enable fallback hotspot (captive portal) in case wifi connection fails
ap: ap: {}
ssid: ${item_name}
captive_portal: captive_portal:
@ -484,13 +497,10 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
input: true input: true
pullup: true pullup: true
inverted: true inverted: true
name: "${item_name}_button" name: "${friendly_name} Button"
on_press: on_press:
- switch.toggle: relay - switch.toggle: relay
- platform: status
name: "${item_name}_status"
switch: switch:
- platform: gpio - platform: gpio
id: blue_led id: blue_led
@ -505,7 +515,7 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
inverted: true inverted: true
- platform: gpio - platform: gpio
name: "${item_name}_power" name: "${friendly_name} Power"
pin: GPIO12 pin: GPIO12
id: relay id: relay
on_turn_on: on_turn_on:
@ -517,11 +527,6 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
- switch.turn_off: blue_led - switch.turn_off: blue_led
- switch.turn_on: red_led - switch.turn_on: red_led
sensor:
- platform: wifi_signal
name: "${item_name}_wifi_signal"
update_interval: 60s
4. Adding to Home Assistant 4. Adding to Home Assistant
--------------------------- ---------------------------

View File

@ -20,12 +20,13 @@ configuration file 😀
esphome: esphome:
name: <NODE_NAME> name: <NODE_NAME>
platform: ESP8266
esp8266:
board: nodemcuv2 board: nodemcuv2
wifi: wifi:
ssid: <SSID> ssid: !secret wifi_ssid
password: <PASSWORD> password: !secret wifi_password
api: api:

View File

@ -32,12 +32,13 @@ for some motors.
esphome: esphome:
name: cover name: cover
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: '***' ssid: !secret wifi_ssid
password: '***' password: !secret wifi_password
api: api:

View File

@ -43,7 +43,8 @@ and calculating the current with `Ohm's law <https://en.wikipedia.org/wiki/Ohm%2
esphome: esphome:
name: voltson name: voltson
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
### you wifi and other settings here ### ### you wifi and other settings here ###

View File

@ -17,23 +17,18 @@ and the :doc:`ESP8266 Software PWM output </components/output/esp8266_pwm>` comp
esphome: esphome:
name: h801light name: h801light
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
manual_ip:
static_ip: x.x.x.x
gateway: x.x.x.x
subnet: 255.255.255.0
logger: logger:
api: api:
ota: ota:
sensor:
- platform: wifi_signal
name: "WiFi Signal h801light"
update_interval: 60s
#RGBWarm
output: output:
- platform: esp8266_pwm - platform: esp8266_pwm
pin: 12 pin: 12
@ -107,8 +102,8 @@ The example below uses the TX pin as a PIR motion sensor input:
H801 shown with PIR connected to header pins H801 shown with PIR connected to header pins
The following can be appended to the YAML file for your H801 to configure the TX pin as a motion The following can be appended to the YAML file for your H801 to configure the TX pin as a motion
sensor input. sensor input.
.. code-block:: yaml .. code-block:: yaml

View File

@ -54,8 +54,6 @@ Then you need to set it up with yaml.
esphome: esphome:
name: ifan02 name: ifan02
platform: ESP8266
board: esp8285
includes: includes:
- ifan02.h - ifan02.h
on_boot: on_boot:
@ -64,9 +62,12 @@ Then you need to set it up with yaml.
then: then:
- light.turn_off: ifan02_light - light.turn_off: ifan02_light
esp8266:
board: esp8285
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:

View File

@ -20,7 +20,8 @@ managed to build a fully working esphome configuration. This assumes you have a
esphome: esphome:
name: wifi_smart_fish_feeder name: wifi_smart_fish_feeder
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:

View File

@ -27,16 +27,17 @@ ESPHome configuration
.. code-block:: yaml .. code-block:: yaml
esphome: esphome:
name: esp_infostrip name: esp_infostrip
platform: ESP8266
board: d1_mini esp8266:
board: d1_mini
# TODO -> add your personal wifi, logging, api, ota settings here # TODO -> add your personal wifi, logging, api, ota settings here
uart: uart:
rx_pin: 4 rx_pin: 4
tx_pin: 5 tx_pin: 5
baud_rate: 9600 baud_rate: 9600
sensor: sensor:
- platform: mhz19 - platform: mhz19
@ -46,7 +47,7 @@ ESPHome configuration
name: "MH-Z19 Temperature" name: "MH-Z19 Temperature"
update_interval: 30s update_interval: 30s
# Monitor the Wifi connection status # Monitor the Wifi connection status
binary_sensor: binary_sensor:
- platform: status - platform: status
name: "Infostrip Status" name: "Infostrip Status"
@ -54,12 +55,12 @@ ESPHome configuration
# Configure each pixel as a single light (attention memory consuming) # Configure each pixel as a single light (attention memory consuming)
light: light:
- platform: fastled_clockless - platform: fastled_clockless
chipset: WS2812B chipset: WS2812B
id: light_fastled id: light_fastled
pin: D4 pin: D4
num_leds: 4 num_leds: 4
rgb_order: GRB rgb_order: GRB
name: "Infostrip" name: "Infostrip"
effects: effects:
- strobe: - strobe:
- random: - random:
@ -95,10 +96,10 @@ ESPHome configuration
to: 3 to: 3
effects: effects:
- strobe: - strobe:
.. warning:: .. warning::
Consider the warning in :doc:`/components/light/partition` regarging the increased memory usage. Consider the warning in :doc:`/components/light/partition` regarging the increased memory usage.
Home Assistant configuration Home Assistant configuration
---------------------------- ----------------------------

View File

@ -15,7 +15,7 @@ It is available from various retailers online or directly from `iwoole.com <http
================== ==================
.. note:: .. note::
The following information relates to the desk model depicted above. A free-standing version and a desk version with a longer arm are available. They are likely to share the same internals and configuration, but I can not be certain. The following information relates to the desk model depicted above. A free-standing version and a desk version with a longer arm are available. They are likely to share the same internals and configuration, but I can not be certain.
My device had no external markings at all. My device had no external markings at all.
@ -48,7 +48,7 @@ The MOSFETs for the different color channels are connected as follows:
======================== ========================
Since there is only one RGBW light to configure the .yaml file is fairly straightforward. Since there is only one RGBW light to configure the .yaml file is fairly straightforward.
Alternatively, you could configure each channel as a separate light if desired. Alternatively, you could configure each channel as a separate light if desired.
I prefer to use the :ref:`color-interlock <rgbw_color_interlock>` option along with the configuration below. I prefer to use the :ref:`color-interlock <rgbw_color_interlock>` option along with the configuration below.
2.1 Example configuration 2.1 Example configuration
------------------------- -------------------------
@ -57,7 +57,8 @@ I prefer to use the :ref:`color-interlock <rgbw_color_interlock>` option along w
esphome: esphome:
name: "IWOOLE Table Lamp" name: "IWOOLE Table Lamp"
#ESP type is ESP8266EX with 1MB flash #ESP type is ESP8266EX with 1MB flash
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
# Insert wifi and api configuration here # Insert wifi and api configuration here
@ -87,29 +88,10 @@ I prefer to use the :ref:`color-interlock <rgbw_color_interlock>` option along w
3. Flashing 3. Flashing
=========== ===========
There are two ways to get ESPHome onto this device.
For both ways you will need to get the binary file with ESPHome's software by compiling your configuration and then downloading the binary.
3.1 Tuya-convert
----------------
.. note::
According to `blakadder.com <https://templates.blakadder.com/iwoole_table_lamp.html>`__ recent versions of this device can't be flashed via this method anymore.
The first device I bought could be flashed using Tuya-convert. However, I still wanted to try and flash it via serial to see if it was possible. I messed this up and had to buy a new unit. This new unit could not be flashed using Tuya-convert.
Unfortunately it looks like new devices are being shipped with new firmware preloaded.
If the device has older firmware but is connected to the Tuya Smart app, it might upgrade and lose it's ability to be flashed.
For instructions on how to actually flash using `Tuya-convert <https://github.com/ct-Open-Source/tuya-convert>`__ please see the linked GitHub page.
To get this device into flashing mode, from off, switch it on-off-on-off-on.
Load the Tasmota binary when prompted, and you can upload the ESPHome firmware from there.
3.2 Serial connection
---------------------
.. warning:: .. warning::
The circuit inside will be exposed to mains voltage. Do not connect your device to the mains when flashing. Flashing this device via a serial connection will involve precarious soldering and cutting through insulating heat-shrink tubing which will have to be replaced. The circuit inside will be exposed to mains voltage. Do not connect your device to the mains when flashing. Flashing this device via a serial connection will involve precarious soldering and cutting through insulating heat-shrink tubing which will have to be replaced.
If you are uncomfortable with this, or are not confident around mains voltage, do not attempt to do this! Using the Tuya-convert method is preferred. If you are uncomfortable with this, or are not confident around mains voltage, do not attempt to do this! Using the Tuya-convert method is preferred.
1. Disconnect the device from mains voltage! 1. Disconnect the device from mains voltage!
@ -157,4 +139,3 @@ See Also
- :doc:`/components/output/index` - :doc:`/components/output/index`
- :doc:`/components/output/esp8266_pwm` - :doc:`/components/output/esp8266_pwm`
- :ghedit:`Edit` - :ghedit:`Edit`

View File

@ -68,23 +68,6 @@ Display Font
You'll need to place the `OpenSans-Regular <https://fonts.google.com/specimen/Open+Sans>`__ font (or another of your choosing) alongside your ESPHome yaml file. See - :doc:`/components/display/index`. You'll need to place the `OpenSans-Regular <https://fonts.google.com/specimen/Open+Sans>`__ font (or another of your choosing) alongside your ESPHome yaml file. See - :doc:`/components/display/index`.
Flashing
========
I initially had trouble flashing the M5StickC; this is the procedure that I've found to work well with these devices.
You must provide the ESP32 bootloader during the initial flash over USB. Compile your ESPHome binary, and flash it along with the required bootloader (bootloader_dio_80m.bin), `available here <https://github.com/espressif/arduino-esp32/tree/master/tools/sdk/esp32/bin>`__, from the commandline (example under macos):
``cd /Applications/ESPHome-Flasher-1.2.0-macOS.app/Contents/MacOS``
``./ESPHome-Flasher ~/Desktop/basement_leak_detector.bin --bootloader ~/Desktop/bootloader_dio_80m.bin --upload-baud-rate=115200``
I also needed this procedure to flash M5Stack ATOM Lite and ATOM Matrix modules, which you also might consider using for this project. Both are smaller and more cost-effective than the M5stickC, and a generation newer -- though they lack the TFT display.
.. figure:: images/leak-detector-m5stickC_atom_matrix.jpg
.. figure:: images/leak-detector-m5stickC_atom_lite.jpg
Calibration & Testing Calibration & Testing
===================== =====================
@ -127,35 +110,25 @@ ESPHome configuration
esphome: esphome:
name: $devicename name: $devicename
comment: ${device_description} comment: ${device_description}
platform: ESP32
esp32:
board: m5stick-c board: m5stick-c
platformio_options:
upload_speed: 115200
wifi: wifi:
ssid: !secret wifi_ssid ssid: !secret wifi_ssid
password: !secret wifi_password password: !secret wifi_password
domain: .lan
# Enable fallback hotspot (captive portal) in case wifi connection fails # Enable fallback hotspot (captive portal) in case wifi connection fails
ap: ap:
ssid: "Basement Leak Det. Fallback AP"
password: !secret fallback_ap_password password: !secret fallback_ap_password
manual_ip:
static_ip: x.x.x.x
gateway: x.x.x.x
subnet: x.x.x.x
captive_portal: captive_portal:
logger: logger:
# Enable Home Assistant API & OTA Updates # Enable Home Assistant API & OTA Updates
api: api:
password: !secret api_password
ota: ota:
password: !secret ota_password
status_led: status_led:
pin: pin:

View File

@ -127,12 +127,13 @@ variable ``output_component1``.
esphome: esphome:
name: mirabella_genio_cw_1 name: mirabella_genio_cw_1
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
logger: logger:
@ -154,7 +155,7 @@ variable ``output_component1``.
id: output_component1 id: output_component1
# May need to use GPIO14 instead for certain globes # May need to use GPIO14 instead for certain globes
pin: GPIO13 pin: GPIO13
3.2 Cold + Warm White Bulbs 3.2 Cold + Warm White Bulbs
*************************** ***************************
@ -163,12 +164,13 @@ variable ``output_component1``.
esphome: esphome:
name: mirabella_genio_cwww_1 name: mirabella_genio_cwww_1
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
logger: logger:
@ -203,12 +205,13 @@ variable ``output_component1``.
esphome: esphome:
name: rgbw_e27_01 name: rgbw_e27_01
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
logger: logger:
@ -253,12 +256,13 @@ A `project by ssieb <https://github.com/ssieb/custom_components/tree/master/cwww
esphome: esphome:
name: rgbw_e27_01 name: rgbw_e27_01
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: 'WIFI' ssid: !secret wifi_ssid
password: 'WIFIPASS' password: !secret wifi_password
logger: logger:
@ -285,8 +289,8 @@ A `project by ssieb <https://github.com/ssieb/custom_components/tree/master/cwww
# Ensure the light turns on by default if the physical switch is actuated. # Ensure the light turns on by default if the physical switch is actuated.
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
4. Adding to Home Assistant 4. Adding to Home Assistant
--------------------------- ---------------------------

View File

@ -99,7 +99,8 @@ Now you have a pair of wires from the GPIO and 0V to your retractive switch lets
esphome: esphome:
name: my_ls name: my_ls
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:

View File

@ -31,7 +31,8 @@ The R1 version of the Dual controls the relays via the UART, so the code gets a
esphome: esphome:
name: dual_ls name: dual_ls
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
@ -182,7 +183,8 @@ It's basically the same as the :doc:`T2 </cookbook/sonoff-t1-3>`
esphome: esphome:
name: dual_ls name: dual_ls
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:

View File

@ -55,23 +55,20 @@ Here is the configuration with the basic operations outlined above.
# Cron'd to run every hour, on the hour for 10 minutes # Cron'd to run every hour, on the hour for 10 minutes
esphome: esphome:
name: fishpond name: fishpond
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: !secret wifi_ssid ssid: !secret wifi_ssid
password: !secret wifi_password password: !secret wifi_password
## use fast_connect of you are connecting to a hidden WiFi network, else comment it out
fast_connect: true
# Enable logging # Enable logging
logger: logger:
level: DEBUG
ota: ota:
api: api:
password: !secret esplibapi_password
status_led: status_led:
pin: GPIO13 pin: GPIO13

View File

@ -18,13 +18,13 @@ T1
esphome: esphome:
name: my_t1 name: my_t1
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: !secret wifi_ssid ssid: !secret wifi_ssid
password: !secret wifi_password password: !secret wifi_password
use_address: xxx.xxx.xxx.xxx
logger: logger:
@ -83,13 +83,13 @@ T2
esphome: esphome:
name: my_t2 name: my_t2
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: !secret wifi_ssid ssid: !secret wifi_ssid
password: !secret wifi_password password: !secret wifi_password
use_address: xxx.xxx.xxx.xxx
logger: logger:
@ -158,13 +158,13 @@ T3
esphome: esphome:
name: my_t3 name: my_t3
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: !secret wifi_ssid ssid: !secret wifi_ssid
password: !secret wifi_password password: !secret wifi_password
use_address: xxx.xxx.xxx.xxx
logger: logger:

View File

@ -25,7 +25,8 @@ Below is the ESPHome configuration file that will get you up and running. This a
esphome: esphome:
name: $devicename name: $devicename
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
@ -39,11 +40,9 @@ Below is the ESPHome configuration file that will get you up and running. This a
# Enable Home Assistant API # Enable Home Assistant API
api: api:
password: !secret api_password
# Setup OTA password # Setup OTA
ota: ota:
password: !secret ota_password
# Define output pins # Define output pins
output: output:

View File

@ -24,13 +24,10 @@ Below is the ESPHome configuration file that will get you up and running. This a
substitutions: substitutions:
updates: 30s updates: 30s
unique_id: solarstation-x name: solarstation-x
esphome: esphome:
name: ${unique_id} name: ${name}
platform: ESP32
board: pico32
arduino_version: latest
platformio_options: platformio_options:
## larger stack size required with all registers enable_load_test ## larger stack size required with all registers enable_load_test
## reduce registers or wait for integration of 2.0.0 arduinoespressif32 ## reduce registers or wait for integration of 2.0.0 arduinoespressif32
@ -110,7 +107,11 @@ Below is the ESPHome configuration file that will get you up and running. This a
controller->queue_command(set_battery3_command); controller->queue_command(set_battery3_command);
ESP_LOGI("ModbusLambda", "EPSOLAR Battery set"); ESP_LOGI("ModbusLambda", "EPSOLAR Battery set");
esp32:
board: pico32
framework:
type: arduino
version: latest
wifi: wifi:
ssid: !secret wifi_sid ssid: !secret wifi_sid
@ -128,11 +129,9 @@ Below is the ESPHome configuration file that will get you up and running. This a
# Enable Home Assistant API # Enable Home Assistant API
api: api:
password: !secret api_password
reboot_timeout: 0s reboot_timeout: 0s
ota: ota:
password: !secret ota_password
uart: uart:
id: mod_bus id: mod_bus

View File

@ -125,12 +125,13 @@ Depending on the type of your light you either need a config using my9231 driver
esphome: esphome:
name: downlight01 name: downlight01
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: "YOUR SSID" ssid: !secret wifi_ssid
password: "YOUR WIFI PASSWORD" password: !secret wifi_password
# Enable logging # Enable logging
logger: logger:

View File

@ -16,7 +16,8 @@ asks you for the board type.
# Example configuration entry # Example configuration entry
esphome: esphome:
name: livingroom name: livingroom
platform: ESP32
esp32:
board: <BOARD_TYPE> board: <BOARD_TYPE>
.. note:: .. note::
@ -43,7 +44,8 @@ Some notes about the pins on the ESP32:
# Example configuration entry # Example configuration entry
esphome: esphome:
name: livingroom name: livingroom
platform: ESP32
esp32:
board: <BOARD_TYPE> board: <BOARD_TYPE>
binary_sensor: binary_sensor:

View File

@ -17,7 +17,8 @@ asks you for the board type.
# Example configuration entry # Example configuration entry
esphome: esphome:
name: livingroom name: livingroom
platform: ESP8266
esp8266:
board: <BOARD_TYPE> board: <BOARD_TYPE>
Many boards have a pin numbering for the exposed pins that is different from the internally used Many boards have a pin numbering for the exposed pins that is different from the internally used
@ -39,7 +40,8 @@ Some notes on the pins:
# Example configuration entry # Example configuration entry
esphome: esphome:
name: livingroom name: livingroom
platform: ESP8266
esp8266:
board: nodemcuv2 board: nodemcuv2
binary_sensor: binary_sensor:

View File

@ -16,9 +16,10 @@ the ESPHome wizard asks you for your platform and |nodemcu-32s|_ as the board ty
# Example configuration entry # Example configuration entry
esphome: esphome:
name: livingroom name: livingroom
platform: ESP32
board: nodemcu-32s esp32:
board: nodemcu-32s
The ESP32 boards often use the internal GPIO pin numbering on the board, this means that The ESP32 boards often use the internal GPIO pin numbering on the board, this means that
you don't have to worry about other kinds of pin numberings, yay! you don't have to worry about other kinds of pin numberings, yay!
@ -48,7 +49,8 @@ Note that in certain conditions you *can* use the pins marked as ``INTERNAL`` in
# Example configuration entry # Example configuration entry
esphome: esphome:
name: livingroom name: livingroom
platform: ESP32
esp32:
board: nodemcu-32s board: nodemcu-32s
binary_sensor: binary_sensor:

View File

@ -24,7 +24,8 @@ the ESPHome wizard asks you for your platform and |nodemcuv2|_ as the board type
# Example configuration entry # Example configuration entry
esphome: esphome:
name: livingroom name: livingroom
platform: ESP8266
esp8266:
board: nodemcuv2 board: nodemcuv2
The NodeMCU's pin numbering as seen on the board (the ``D0`` etc pins) is different from The NodeMCU's pin numbering as seen on the board (the ``D0`` etc pins) is different from
@ -60,7 +61,8 @@ Note that in certain conditions you *can* use the pins marked as ``INTERNAL`` in
# Example configuration entry # Example configuration entry
esphome: esphome:
name: livingroom name: livingroom
platform: ESP8266
esp8266:
board: nodemcuv2 board: nodemcuv2
binary_sensor: binary_sensor:

View File

@ -13,7 +13,8 @@ and shipping from China takes a long time, I've only set up dedicated guides for
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
esp8266:
board: esp8285 board: esp8285
After that use the following list of pin to function mappings to set up your Sonoff device. After that use the following list of pin to function mappings to set up your Sonoff device.

View File

@ -125,12 +125,13 @@ or alternatively, you can just take the below configuration file and modify it t
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
board: esp01_1m esp8266:
board: esp8285
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:
@ -226,12 +227,13 @@ of the basic functions.
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
board: esp01_1m esp8266:
board: esp8285
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:

View File

@ -1,11 +1,12 @@
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:

View File

@ -53,12 +53,13 @@ exposes all of the basic functions.
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
esp8266:
board: esp8285 board: esp8285
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:

View File

@ -127,13 +127,13 @@ or alternatively, you can just take the below configuration file and modify it t
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
esp8266:
board: esp8285 board: esp8285
arduino_version: 2.4.2
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:
@ -147,7 +147,7 @@ pre-compile the firmware.
.. note:: .. note::
After this step, you will be able to find the compiled binary under After this step, you will be able to find the compiled binary under
``<NAME_OF_NODE>/.pioenvs/<NAME_OF_NODE>/firmware.bin``. If you're having trouble with ``.esphome/builds/<NAME_OF_NODE>/.pioenvs/<NAME_OF_NODE>/firmware.bin``. If you're having trouble with
uploading, you can also try uploading this file directly with other tools. uploading, you can also try uploading this file directly with other tools.
Step 4: Uploading Firmware Step 4: Uploading Firmware
@ -208,12 +208,13 @@ of the basic functions.
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:

View File

@ -1,12 +1,12 @@
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
esp8266:
board: esp8285 board: esp8285
arduino_version: 2.4.2
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:

View File

@ -126,12 +126,13 @@ or alternatively, you can just take the below configuration file and modify it t
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
board: esp01_1m esp8266:
board: esp8285
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:
@ -229,12 +230,13 @@ of the basic functions.
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:

View File

@ -1,16 +1,18 @@
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
board: esp01_1m
# Automation turning on the blue status LED once T1 is booted up # Automation turning on the blue status LED once T1 is booted up
on_boot: on_boot:
priority: -10 priority: -10
then: then:
- light.turn_on: blue_led_light - light.turn_on: blue_led_light
esp8266:
board: esp01_1m
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
# Enable logging # Enable logging
logger: logger:

View File

@ -133,12 +133,13 @@ or alternatively, you can just take the below configuration file and modify it t
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
board: esp01_1m esp8266:
board: esp8285
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:
@ -233,12 +234,13 @@ of the basic functions.
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
api: api:

View File

@ -1,16 +1,18 @@
esphome: esphome:
name: <NAME_OF_NODE> name: <NAME_OF_NODE>
platform: ESP8266
board: esp01_1m
# Automation turning on the blue status LED once T3 is booted up # Automation turning on the blue status LED once T3 is booted up
on_boot: on_boot:
priority: -10 priority: -10
then: then:
- light.turn_on: blue_led_light - light.turn_on: blue_led_light
esp8266:
board: esp01_1m
wifi: wifi:
ssid: <YOUR_SSID> ssid: !secret wifi_ssid
password: <YOUR_PASSWORD> password: !secret wifi_password
# Enable logging # Enable logging
logger: logger:

View File

@ -1,11 +1,12 @@
esphome: esphome:
name: '<NODE_NAME>' name: '<NODE_NAME>'
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: '<WIFI_SSID>' ssid: !secret wifi_ssid
password: '<WIFI_PASSWORD>' password: !secret wifi_password
logger: logger:
# Disable UART logging (pins GPIO1/3 are used for button/led) # Disable UART logging (pins GPIO1/3 are used for button/led)

View File

@ -1,20 +1,19 @@
# Example ESPHome code to emulate stock firmware functionality while maintaining 100% # Example ESPHome code to emulate stock firmware functionality while maintaining 100%
# local control through Home Assistant. # local control through Home Assistant.
substitutions: substitutions:
device_name: '<NODE_NAME>' # used internally.. e.g. teckin_sp20 device_name: '<NODE_NAME>' # used internally.. e.g. teckin_sp20
friendly_name: '<Node Name>' # displayed in HA.. e.g. Teckin SP20 friendly_name: '<Node Name>' # displayed in HA.. e.g. Teckin SP20
wifi_ssid: '<WIFI_SSID>'
wifi_password: '<WIFI_PASSWORD>'
esphome: esphome:
name: ${device_name} name: ${device_name}
platform: ESP8266
esp8266:
board: esp01_1m board: esp01_1m
wifi: wifi:
ssid: ${wifi_ssid} ssid: !secret wifi_ssid
password: ${wifi_password} password: !secret wifi_password
# Enable Logs from the device # Enable Logs from the device
logger: logger:
@ -81,7 +80,7 @@ switch:
pin: pin:
number: GPIO2 number: GPIO2
inverted: true inverted: true
- platform: gpio - platform: gpio
pin: GPIO4 pin: GPIO4
id: relay id: relay

View File

@ -86,7 +86,7 @@ Configuration variables:
should be treated as inverted. Defaults to ``false``. should be treated as inverted. Defaults to ``false``.
- **mode** (*Optional*, string or mapping): Configures the pin to behave in different - **mode** (*Optional*, string or mapping): Configures the pin to behave in different
modes like input or output. The default value depends on the context. modes like input or output. The default value depends on the context.
Accepts either a shorthand string or a mapping where each feature can be individually Accepts either a shorthand string or a mapping where each feature can be individually
enabled/disabled: enabled/disabled:
- **input** (*Optional*, boolean): If true, configure the pin as an input. - **input** (*Optional*, boolean): If true, configure the pin as an input.
@ -313,7 +313,7 @@ merged with the services definitions from main config file.
# In wifi.yaml # In wifi.yaml
wifi: wifi:
ssid: "your_ssid" ssid: !secret wifi_ssid
password: !secret wifi_password password: !secret wifi_password
domain: .yourdomain.lan domain: .yourdomain.lan
fast_connect: true fast_connect: true
@ -339,7 +339,8 @@ merged with the services definitions from main config file.
level: ${log_level} level: ${log_level}
api: api:
password: !secret hass_api_key encryption:
key: !secret api_encryption_key
reboot_timeout: 1h reboot_timeout: 1h
sensor: sensor:

View File

@ -66,9 +66,9 @@ Relevant Documentation
- ``project`` - :ref:`esphome-creators_project` - ``project`` - :ref:`esphome-creators_project`
- ``esp32_improv`` - :doc:`/components/esp32_improv` - ``esp32_improv`` - :doc:`/components/esp32_improv`
- ``captive_portal`` - :doc:`/components/captive_portal` - ``captive_portal`` - :doc:`/components/captive_portal`
- ``wifi`` -> ``networks: []`` allows you to flash a device that will not contain any - ``wifi`` -> ``ap`` allows you to flash a device that will not contain any
credentials and they must be set by the user via either the ``ap`` + ``captive_portal`` or credentials and they must be set by the user via either the ``ap`` + ``captive_portal`` or
the ``esp32_improv`` components. the ``esp32_improv`` / ``improv_serial`` components.
- ``dashboard_import`` -> ``package_import_url`` - This should point to the public repository containing - ``dashboard_import`` -> ``package_import_url`` - This should point to the public repository containing
the configuration for the device so that the user's ESPHome dashboard can autodetect this device and the configuration for the device so that the user's ESPHome dashboard can autodetect this device and
create a minimal YAML using :ref:`config-git_packages`. create a minimal YAML using :ref:`config-git_packages`.

View File

@ -40,7 +40,7 @@ ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configu
<pre class="guide-code"> <pre class="guide-code">
esphome: esphome:
&nbsp;&nbsp;name: awesome &nbsp;&nbsp;name: awesome
&nbsp;&nbsp;platform: ESP32 esp32:
&nbsp;&nbsp;board: nodemcu-32s &nbsp;&nbsp;board: nodemcu-32s
</pre> </pre>
</div> </div>