mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-11 20:02:12 +01:00
Merge branch 'current' into next
This commit is contained in:
commit
cf21fc3ce6
@ -3,5 +3,9 @@
|
||||
<li><a href="https://discord.gg/KhAMKrd" target="_blank">Join the community</a></li>
|
||||
<li><a href="https://twitter.com/esphome_" target="_blank">Follow us on Twitter</a></li>
|
||||
<li><a href="https://github.com/esphome/esphome" target="_blank">Source Code</a></li>
|
||||
<li><a href="mailto:esphome@nabucasa.com">Contact</a> (no support!)</li>
|
||||
</ul>
|
||||
ESPHome is an open source project by <a href="https://www.nabucasa.com" target="_blank">Nabu Casa</a>
|
||||
<ul>
|
||||
<li><a href="https://www.netlify.com" target="_blank">This site is powered by Netlify</a></li>
|
||||
</ul>
|
||||
|
@ -23,7 +23,7 @@ A Python library that implements this protocol is `aioesphomeapi <https://github
|
||||
|
||||
# Example configuration entry
|
||||
api:
|
||||
password: 'MyPassword'
|
||||
password: !secret api_password
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
@ -31,7 +31,7 @@ manually in your browser.
|
||||
# ...
|
||||
ap:
|
||||
ssid: "Livingroom Fallback Hotspot"
|
||||
password: "W1PBGyrokfLz"
|
||||
password: !secret wifi_ap_password
|
||||
|
||||
captive_portal:
|
||||
|
||||
|
@ -124,9 +124,10 @@ Configuration example:
|
||||
|
||||
esphome:
|
||||
name: Shelly 2.5
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
esp8266_restore_from_flash: true
|
||||
restore_from_flash: true
|
||||
|
||||
i2c:
|
||||
sda: GPIO12
|
||||
|
@ -7,36 +7,7 @@ Tuya Cover
|
||||
The ``tuya`` cover platform creates a simple position-only cover from a
|
||||
tuya serial component.
|
||||
|
||||
There are two components, the Tuya bus and the cover that uses it. The :doc:`/components/tuya`
|
||||
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:
|
||||
This requires the :doc:`/components/tuya` component to be set up before you can use this platform.
|
||||
|
||||
Here is an example output for a Tuya M515EGWT (motor for chain roller blinds):
|
||||
|
||||
|
@ -311,18 +311,6 @@ Sample code
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: test_node
|
||||
platform: ESP8266
|
||||
board: nodemcu
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_pass
|
||||
|
||||
logger:
|
||||
level: VERBOSE
|
||||
|
||||
uart:
|
||||
tx_pin: GPIO2
|
||||
rx_pin: GPIO5
|
||||
|
@ -129,17 +129,16 @@ Wi-Fi, API, and OTA configuration.
|
||||
# Example configuration entry
|
||||
esphome:
|
||||
name: inkplate
|
||||
platform: ESP32
|
||||
|
||||
esp32:
|
||||
board: esp-wrover-kit
|
||||
|
||||
logger:
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR WIFI SSID>
|
||||
password: <YOUR WIFI PASSWORD>
|
||||
ap:
|
||||
ssid: Inkplate-AP
|
||||
password: '12345678'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
ap: {}
|
||||
|
||||
captive_portal:
|
||||
|
||||
|
@ -108,8 +108,7 @@ To bring in color images:
|
||||
Complete example
|
||||
****************
|
||||
|
||||
The following is a complete example YAML configuration that does a few things beyond the usual
|
||||
Wi-Fi, API, and OTA configuration. It defines:
|
||||
The following is an example YAML configuration that you can add to your base device configuration. It defines:
|
||||
|
||||
- three fonts (well, one font in three sizes)
|
||||
- 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
|
||||
|
||||
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:
|
||||
- id: my_red
|
||||
red: 100%
|
||||
|
@ -15,7 +15,8 @@ where you specify the **name** of the node.
|
||||
esphome:
|
||||
name: livingroom
|
||||
comment: Living room ESP32 controller
|
||||
platform: ESP32
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
|
||||
.. _esphome-configuration_variables:
|
||||
@ -50,8 +51,8 @@ Advanced options:
|
||||
- **name** (**Required**, string): Name 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
|
||||
:doc:`esp8266 </components/esp8266>` sections but are still accepted here for compatibility reasons (usage not
|
||||
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
|
||||
recommended for new projects):
|
||||
|
||||
- **platform** (**Required**, string): The platform used, either ``esp8266`` or ``esp32``.
|
||||
|
@ -39,61 +39,16 @@ If available on your reader model, it's recommended to connect 3.3VT (touch indu
|
||||
fingerprint_grow:
|
||||
sensing_pin: GPIO12
|
||||
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:
|
||||
- text_sensor.template.publish:
|
||||
id: fingerprint_state
|
||||
state: "Unauthorized finger"
|
||||
...
|
||||
on_enrollment_scan:
|
||||
- text_sensor.template.publish:
|
||||
id: fingerprint_state
|
||||
state: "Finger scanned"
|
||||
...
|
||||
on_enrollment_done:
|
||||
- text_sensor.template.publish:
|
||||
id: fingerprint_state
|
||||
state: "Enrolled fingerprint"
|
||||
...
|
||||
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:
|
||||
@ -458,17 +413,6 @@ Sample code
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: test_node
|
||||
platform: ESP8266
|
||||
board: nodemcu
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_pass
|
||||
|
||||
logger:
|
||||
|
||||
uart:
|
||||
rx_pin: GPIO13
|
||||
tx_pin: GPIO15
|
||||
|
@ -16,36 +16,7 @@ tuya serial component.
|
||||
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.
|
||||
|
||||
There are two components, the Tuya bus and the dimmer that uses it. The :doc:`/components/tuya`
|
||||
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:
|
||||
This requires the :doc:`/components/tuya` component to be set up before you can use this platform.
|
||||
|
||||
Here is an example output for a Tuya dimmer:
|
||||
|
||||
|
@ -28,13 +28,13 @@ The controller connects to the UART of the MCU. For ESP32 GPIO PIN 16 to TXD PI
|
||||
.. 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()``.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Serial logging can be disabled by setting ``baud_rate: 0``.
|
||||
|
||||
|
||||
See :doc:`logger` for more details
|
||||
|
||||
.. code-block:: yaml
|
||||
@ -67,26 +67,6 @@ Technically there is no difference between the "inline" and the standard definit
|
||||
|
||||
.. 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:
|
||||
id: mod_bus
|
||||
tx_pin: 17
|
||||
@ -324,85 +304,72 @@ Then battery charge settings are sent.
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: solarstation-test
|
||||
platform: ESP32
|
||||
board: esp32dev
|
||||
|
||||
## send config values at startup
|
||||
## configure rtc clock and battery charge settings
|
||||
on_boot:
|
||||
## configure controller settings at setup
|
||||
## make sure priority is lower than setup_priority of modbus_controller
|
||||
priority: -100
|
||||
then:
|
||||
- lambda: |-
|
||||
// get local time and sync to controller
|
||||
time_t now = ::time(nullptr);
|
||||
struct tm *time_info = ::localtime(&now);
|
||||
int seconds = time_info->tm_sec;
|
||||
int minutes = time_info->tm_min;
|
||||
int hour = time_info->tm_hour;
|
||||
int day = time_info->tm_mday;
|
||||
int month = time_info->tm_mon + 1;
|
||||
int year = time_info->tm_year % 100;
|
||||
esphome::modbus_controller::ModbusController *controller = id(epever);
|
||||
// if there is no internet connection localtime returns year 70
|
||||
if (year != 70) {
|
||||
// create the payload
|
||||
std::vector<uint16_t> rtc_data = {uint16_t((minutes << 8) | seconds), uint16_t((day << 8) | hour),
|
||||
uint16_t((year << 8) | month)};
|
||||
// Create a modbus command item with the time information as the payload
|
||||
esphome::modbus_controller::ModbusCommandItem set_rtc_command =
|
||||
esphome::modbus_controller::ModbusCommandItem::create_write_multiple_command(controller, 0x9013, 3, rtc_data);
|
||||
// Submit the command to the send queue
|
||||
epever->queue_command(set_rtc_command);
|
||||
ESP_LOGI("ModbusLambda", "EPSOLAR RTC set to %02d:%02d:%02d %02d.%02d.%04d", hour, minutes, seconds, day, month,
|
||||
year + 2000);
|
||||
}
|
||||
// Battery settings
|
||||
// Note: these values are examples only and apply my AGM Battery
|
||||
std::vector<uint16_t> battery_settings1 = {
|
||||
0, // 9000 Battery Type 0 = User
|
||||
0x0073, // 9001 Battery Cap 0x55 == 115AH
|
||||
0x012C, // 9002 Temp compensation -3V /°C/2V
|
||||
0x05DC, // 9003 0x5DC == 1500 Over Voltage Disconnect Voltage 15,0
|
||||
0x058C, // 9004 0x58C == 1480 Charging Limit Voltage 14,8
|
||||
0x058C, // 9005 Over Voltage Reconnect Voltage 14,8
|
||||
0x05BF, // 9006 Equalize Charging Voltage 14,6
|
||||
0x05BE, // 9007 Boost Charging Voltage 14,7
|
||||
0x0550, // 9008 Float Charging Voltage 13,6
|
||||
0x0528, // 9009 Boost Reconnect Charging Voltage 13,2
|
||||
0x04C4, // 900A Low Voltage Reconnect Voltage 12,2
|
||||
0x04B0, // 900B Under Voltage Warning Reconnect Voltage 12,0
|
||||
0x04BA, // 900c Under Volt. Warning Volt 12,1
|
||||
0x04BA, // 900d Low Volt. Disconnect Volt. 11.8
|
||||
0x04BA // 900E Discharging Limit Voltage 11.8
|
||||
};
|
||||
|
||||
on_boot:
|
||||
## configure controller settings at setup
|
||||
## make sure priority is lower than setup_priority of modbus_controller
|
||||
priority: -100
|
||||
then:
|
||||
- lambda: |-
|
||||
// get local time and sync to controller
|
||||
time_t now = ::time(nullptr);
|
||||
struct tm *time_info = ::localtime(&now);
|
||||
int seconds = time_info->tm_sec;
|
||||
int minutes = time_info->tm_min;
|
||||
int hour = time_info->tm_hour;
|
||||
int day = time_info->tm_mday;
|
||||
int month = time_info->tm_mon + 1;
|
||||
int year = time_info->tm_year % 100;
|
||||
esphome::modbus_controller::ModbusController *controller = id(epever);
|
||||
// if there is no internet connection localtime returns year 70
|
||||
if (year != 70) {
|
||||
// create the payload
|
||||
std::vector<uint16_t> rtc_data = {uint16_t((minutes << 8) | seconds), uint16_t((day << 8) | hour),
|
||||
uint16_t((year << 8) | month)};
|
||||
// Create a modbus command item with the time information as the payload
|
||||
esphome::modbus_controller::ModbusCommandItem set_rtc_command =
|
||||
esphome::modbus_controller::ModbusCommandItem::create_write_multiple_command(controller, 0x9013, 3, rtc_data);
|
||||
// Submit the command to the send queue
|
||||
epever->queue_command(set_rtc_command);
|
||||
ESP_LOGI("ModbusLambda", "EPSOLAR RTC set to %02d:%02d:%02d %02d.%02d.%04d", hour, minutes, seconds, day, month,
|
||||
year + 2000);
|
||||
}
|
||||
// Battery settings
|
||||
// Note: these values are examples only and apply my AGM Battery
|
||||
std::vector<uint16_t> battery_settings1 = {
|
||||
0, // 9000 Battery Type 0 = User
|
||||
0x0073, // 9001 Battery Cap 0x55 == 115AH
|
||||
0x012C, // 9002 Temp compensation -3V /°C/2V
|
||||
0x05DC, // 9003 0x5DC == 1500 Over Voltage Disconnect Voltage 15,0
|
||||
0x058C, // 9004 0x58C == 1480 Charging Limit Voltage 14,8
|
||||
0x058C, // 9005 Over Voltage Reconnect Voltage 14,8
|
||||
0x05BF, // 9006 Equalize Charging Voltage 14,6
|
||||
0x05BE, // 9007 Boost Charging Voltage 14,7
|
||||
0x0550, // 9008 Float Charging Voltage 13,6
|
||||
0x0528, // 9009 Boost Reconnect Charging Voltage 13,2
|
||||
0x04C4, // 900A Low Voltage Reconnect Voltage 12,2
|
||||
0x04B0, // 900B Under Voltage Warning Reconnect Voltage 12,0
|
||||
0x04BA, // 900c Under Volt. Warning Volt 12,1
|
||||
0x04BA, // 900d Low Volt. Disconnect Volt. 11.8
|
||||
0x04BA // 900E Discharging Limit Voltage 11.8
|
||||
};
|
||||
|
||||
// Boost and equalization periods
|
||||
std::vector<uint16_t> battery_settings2 = {
|
||||
0x0000, // 906B Equalize Duration (min.) 0
|
||||
0x0075 // 906C Boost Duration (aka absorb) 117 mins
|
||||
};
|
||||
esphome::modbus_controller::ModbusCommandItem set_battery1_command =
|
||||
esphome::modbus_controller::ModbusCommandItem::create_write_multiple_command(controller, 0x9000, battery_settings1.size() ,
|
||||
battery_settings1);
|
||||
|
||||
esphome::modbus_controller::ModbusCommandItem set_battery2_command =
|
||||
esphome::modbus_controller::ModbusCommandItem::create_write_multiple_command(controller, 0x906B, battery_settings3.size(),
|
||||
battery_settings2);
|
||||
delay(200) ;
|
||||
controller->queue_command(set_battery1_command);
|
||||
delay(200) ;
|
||||
controller->queue_command(set_battery2_command);
|
||||
ESP_LOGI("ModbusLambda", "EPSOLAR Battery set");
|
||||
|
||||
// Boost and equalization periods
|
||||
std::vector<uint16_t> battery_settings2 = {
|
||||
0x0000, // 906B Equalize Duration (min.) 0
|
||||
0x0075 // 906C Boost Duration (aka absorb) 117 mins
|
||||
};
|
||||
esphome::modbus_controller::ModbusCommandItem set_battery1_command =
|
||||
esphome::modbus_controller::ModbusCommandItem::create_write_multiple_command(controller, 0x9000, battery_settings1.size() ,
|
||||
battery_settings1);
|
||||
|
||||
esphome::modbus_controller::ModbusCommandItem set_battery2_command =
|
||||
esphome::modbus_controller::ModbusCommandItem::create_write_multiple_command(controller, 0x906B, battery_settings3.size(),
|
||||
battery_settings2);
|
||||
delay(200) ;
|
||||
controller->queue_command(set_battery1_command);
|
||||
delay(200) ;
|
||||
controller->queue_command(set_battery2_command);
|
||||
ESP_LOGI("ModbusLambda", "EPSOLAR Battery set");
|
||||
|
||||
uart:
|
||||
id: mod_bus
|
||||
|
@ -22,7 +22,7 @@ in which case this is not needed.
|
||||
mqtt:
|
||||
broker: 10.0.0.2
|
||||
username: livingroom
|
||||
password: MyMQTTPassword
|
||||
password: !secret mqtt_password
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
31
components/nspanel.rst
Normal file
31
components/nspanel.rst
Normal 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:
|
||||
------------------------
|
@ -23,7 +23,7 @@ Logging+WiFi+OTA are initialized, so that you can upload a new binary.
|
||||
# Example configuration entry
|
||||
ota:
|
||||
safe_mode: true
|
||||
password: VERYSECURE
|
||||
password: !secret ota_password
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
@ -26,7 +26,7 @@ Configuration variables:
|
||||
|
||||
.. warning::
|
||||
|
||||
This is an **output component** and will not visible from the frontend. Output components are intermediary
|
||||
This is an **output component** and will not be visible from the frontend. Output components are intermediary
|
||||
components that can be attached to for example lights. To have a GPIO pin in the Home Assistant frontend, please
|
||||
see the :doc:`/components/switch/gpio`.
|
||||
|
||||
|
@ -106,20 +106,20 @@ complete configuration for a Sonoff B1 looks like:
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
name: REPLACEME
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_WIFI_PASSPHRASE>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
logger:
|
||||
|
||||
ota:
|
||||
password: <YOUR_OTA_PASSWORD>
|
||||
|
||||
my9231:
|
||||
data_pin: GPIO12 # GPIO13 for AiLight
|
||||
@ -147,7 +147,7 @@ complete configuration for a Sonoff B1 looks like:
|
||||
|
||||
light:
|
||||
- platform: rgbww
|
||||
name: <LIGHT_NAME>
|
||||
name: REPLACEME
|
||||
red: output_red
|
||||
green: output_green
|
||||
blue: output_blue
|
||||
@ -161,20 +161,20 @@ And here is a complete configuration for the AiThinker AiLight:
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
name: REPLACEME
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_WIFI_PASSPHRASE>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
logger:
|
||||
|
||||
ota:
|
||||
password: <YOUR_OTA_PASSWORD>
|
||||
|
||||
my9231:
|
||||
data_pin: GPIO13
|
||||
@ -199,7 +199,7 @@ And here is a complete configuration for the AiThinker AiLight:
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: <LIGHT_NAME>
|
||||
name: REPLACEME
|
||||
red: output_red
|
||||
green: output_green
|
||||
blue: output_blue
|
||||
|
@ -111,20 +111,21 @@ A complete configuration for a Feit Electric A19 looks like:
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
name: REPLACEME
|
||||
friendly_name: REPLACEME
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_WIFI_PASSPHRASE>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
logger:
|
||||
|
||||
ota:
|
||||
password: <YOUR_OTA_PASSWORD>
|
||||
|
||||
sm16716:
|
||||
data_pin: GPIO14
|
||||
|
@ -129,12 +129,13 @@ Sample code
|
||||
|
||||
esphome:
|
||||
name: test_esp8266
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_pass
|
||||
password: !secret wifi_password
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
|
@ -13,7 +13,7 @@ Configuration variables:
|
||||
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **name** (**Required**, string): The name of the sensor.
|
||||
- **modbus_functioncode** (**Required**): type of the modbus register.
|
||||
- **register_type** (**Required**): type of the modbus register.
|
||||
- **address**: (**Required**, int): start address of the first register in a range
|
||||
- **offset**: (*Optional*, int): not required in most cases
|
||||
offset from start address in bytes. If more than one register is read a modbus read registers command this value is used to find the start of this datapoint relative to start address. The component calculates the size of the range based on offset and size of the value type
|
||||
@ -41,7 +41,8 @@ Configuration variables:
|
||||
Possible return values for the lambda:
|
||||
|
||||
- ``return <true / false>;`` the new value for the sensor.
|
||||
- ``return <anything>; and fill payload with data`` if the payload is added from the lambda then these bytes will be sent
|
||||
- ``return <anything>; and fill payload with data`` if the payload is added from the lambda then these bytes will be sent.
|
||||
- ``return {};`` in the case the lambda handles the sending of the value itself.
|
||||
|
||||
**Example**
|
||||
|
||||
@ -63,6 +64,7 @@ Possible return values for the lambda:
|
||||
payload.push_back(0x6); // low byte address of the coil
|
||||
payload.push_back(0xFF); // ON = 0xFF00 OFF=0000
|
||||
payload.push_back(0x00);
|
||||
return true;
|
||||
|
||||
|
||||
|
||||
|
@ -16,22 +16,10 @@ Put the ``tuya`` component in the config and it will list the possible devices f
|
||||
|
||||
.. 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:
|
||||
|
||||
uart:
|
||||
rx_pin: GPIO3
|
||||
tx_pin: GPIO1
|
||||
@ -55,7 +43,7 @@ Here is an example output for a Tuya fan controller:
|
||||
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.
|
||||
|
||||
- **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``
|
||||
***********************
|
||||
|
||||
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.
|
||||
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.
|
||||
The type of ``x`` variable is depending on ``datapoint_type`` configuration variable:
|
||||
|
||||
- *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
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGD("main", "on_datapoint_update %s", ONOFF(x));
|
||||
ESP_LOGD("main", "on_datapoint_update %s", ONOFF(x));
|
||||
- sensor_datapoint: 6
|
||||
datapoint_type: any # this is optional
|
||||
then:
|
||||
|
@ -26,6 +26,13 @@ dramatically improve connection times.
|
||||
gateway: 10.0.0.1
|
||||
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:
|
||||
|
||||
Configuration variables:
|
||||
|
@ -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>`__
|
||||
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.
|
||||
|
||||
.. code-block:: yaml
|
||||
@ -190,14 +190,15 @@ spares I/Os.
|
||||
|
||||
esphome:
|
||||
name: test_arduino
|
||||
platform: ESP8266
|
||||
board: nodemcu
|
||||
includes:
|
||||
- arduino_port_expander.h
|
||||
- arduino_port_expander.h
|
||||
|
||||
esp8266:
|
||||
board: nodemcu
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_pass
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -128,14 +128,19 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
substitutions:
|
||||
name: brilliant_smart_plug
|
||||
platform: ESP8266
|
||||
friendly_name: Brilliant Smart Plug
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
@ -151,13 +156,10 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
name: "Power Button"
|
||||
name: "${friendly_name} Power Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
- platform: status
|
||||
name: "Status"
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: red_led
|
||||
@ -166,7 +168,7 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "Brilliant Smart Plug"
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO5
|
||||
id: relay
|
||||
|
||||
@ -185,14 +187,19 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
substitutions:
|
||||
name: mirabella_genio_smart_plug
|
||||
platform: ESP8266
|
||||
friendly_name: Mirabella Genio Smart Plug
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
@ -208,11 +215,9 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
name: "Power Button"
|
||||
name: "${friendly_name} Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
- platform: status
|
||||
name: Status
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
@ -222,7 +227,7 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "Mirabella Genio Smart Plug"
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
|
||||
@ -239,14 +244,19 @@ which these adaptions created by `@cryptelli <https://community.home-assistant.i
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
name: gosund_sp1_smart_plug
|
||||
friendly_name: Gosund SP1
|
||||
|
||||
esphome:
|
||||
name: gosund_sp1_smart_plug
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
@ -306,14 +316,19 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
substitutions:
|
||||
name: topersun_smart_plug
|
||||
platform: ESP8266
|
||||
friendly_name: Topersun Smart Plug
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
@ -329,13 +344,10 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
name: "Power Button"
|
||||
name: "${friendly_name} Power Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
- platform: status
|
||||
name: "Status"
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: green_led
|
||||
@ -344,7 +356,7 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "Brilliant Smart Plug"
|
||||
name: "friendly_name Relay"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
|
||||
@ -362,20 +374,22 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
plug_name: coolcam_plug1
|
||||
name: coolcam_plug1
|
||||
friendly_name: Coolcam Smart Plug
|
||||
# Higher value gives lower watt readout
|
||||
current_res: "0.00221"
|
||||
# Lower value gives lower voltage readout
|
||||
voltage_div: "800"
|
||||
|
||||
esphome:
|
||||
name: ${plug_name}
|
||||
platform: ESP8266
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
@ -388,20 +402,20 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
|
||||
pin:
|
||||
number: GPIO0
|
||||
inverted: true
|
||||
name: "${plug_name}_button"
|
||||
name: "${friendly_name} Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "${plug_name}_LED_Red"
|
||||
name: "${friendly_name} LED Red"
|
||||
pin: GPIO13
|
||||
inverted: true
|
||||
restore_mode: ALWAYS_OFF
|
||||
id: red_led
|
||||
|
||||
- platform: gpio
|
||||
name: "${plug_name}_Relay"
|
||||
name: "${friendly_name} Relay"
|
||||
pin: GPIO14
|
||||
restore_mode: ALWAYS_ON
|
||||
id: relay
|
||||
@ -422,28 +436,26 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
|
||||
current_resistor: ${current_res}
|
||||
voltage_divider: ${voltage_div}
|
||||
current:
|
||||
name: "${plug_name}_Amperage"
|
||||
name: "${friendly_name} Amperage"
|
||||
unit_of_measurement: A
|
||||
voltage:
|
||||
name: "${plug_name}_Voltage"
|
||||
name: "${friendly_name} Voltage"
|
||||
unit_of_measurement: V
|
||||
power:
|
||||
name: "${plug_name}_Wattage"
|
||||
name: "${friendly_name} Power"
|
||||
unit_of_measurement: W
|
||||
id: "${plug_name}_Wattage"
|
||||
id: power_sensor
|
||||
change_mode_every: 8
|
||||
update_interval: 10s
|
||||
|
||||
- platform: total_daily_energy
|
||||
name: "${plug_name}_Total Daily Energy"
|
||||
power_id: "${plug_name}_Wattage"
|
||||
name: "${friendly_name} Total Daily Energy"
|
||||
power_id: power_sensor
|
||||
filters:
|
||||
# Multiplication factor from W to kW is 0.001
|
||||
- multiply: 0.001
|
||||
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
|
||||
*****************************************************************
|
||||
@ -451,20 +463,21 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
|
||||
.. code-block:: yaml
|
||||
|
||||
substitutions:
|
||||
item_name: "arlec_pc389ha_001"
|
||||
name: arlec_pc389ha_001
|
||||
friendly_name: Arlec Smart Plug
|
||||
|
||||
esphome:
|
||||
name: ${item_name}
|
||||
platform: ESP8266
|
||||
name: ${name}
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: ${item_name}
|
||||
ap: {}
|
||||
|
||||
captive_portal:
|
||||
|
||||
@ -484,13 +497,10 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
name: "${item_name}_button"
|
||||
name: "${friendly_name} Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
- platform: status
|
||||
name: "${item_name}_status"
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: blue_led
|
||||
@ -505,7 +515,7 @@ Check the following page for calibrating the measurements: :ref:`sensor-filter-c
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "${item_name}_power"
|
||||
name: "${friendly_name} Power"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
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_on: red_led
|
||||
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "${item_name}_wifi_signal"
|
||||
update_interval: 60s
|
||||
|
||||
|
||||
4. Adding to Home Assistant
|
||||
---------------------------
|
||||
|
@ -20,12 +20,13 @@ configuration file 😀
|
||||
|
||||
esphome:
|
||||
name: <NODE_NAME>
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
wifi:
|
||||
ssid: <SSID>
|
||||
password: <PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -32,12 +32,13 @@ for some motors.
|
||||
|
||||
esphome:
|
||||
name: cover
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: '***'
|
||||
password: '***'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -43,7 +43,8 @@ and calculating the current with `Ohm's law <https://en.wikipedia.org/wiki/Ohm%2
|
||||
|
||||
esphome:
|
||||
name: voltson
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
### you wifi and other settings here ###
|
||||
|
@ -17,23 +17,18 @@ and the :doc:`ESP8266 Software PWM output </components/output/esp8266_pwm>` comp
|
||||
|
||||
esphome:
|
||||
name: h801light
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
manual_ip:
|
||||
static_ip: x.x.x.x
|
||||
gateway: x.x.x.x
|
||||
subnet: 255.255.255.0
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal h801light"
|
||||
update_interval: 60s
|
||||
#RGBWarm
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
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
|
||||
|
||||
The following can be appended to the YAML file for your H801 to configure the TX pin as a motion
|
||||
sensor input.
|
||||
The following can be appended to the YAML file for your H801 to configure the TX pin as a motion
|
||||
sensor input.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -54,8 +54,6 @@ Then you need to set it up with yaml.
|
||||
|
||||
esphome:
|
||||
name: ifan02
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
includes:
|
||||
- ifan02.h
|
||||
on_boot:
|
||||
@ -64,9 +62,12 @@ Then you need to set it up with yaml.
|
||||
then:
|
||||
- light.turn_off: ifan02_light
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -20,7 +20,8 @@ managed to build a fully working esphome configuration. This assumes you have a
|
||||
|
||||
esphome:
|
||||
name: wifi_smart_fish_feeder
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
|
@ -27,16 +27,17 @@ ESPHome configuration
|
||||
.. code-block:: yaml
|
||||
|
||||
esphome:
|
||||
name: esp_infostrip
|
||||
platform: ESP8266
|
||||
board: d1_mini
|
||||
name: esp_infostrip
|
||||
|
||||
esp8266:
|
||||
board: d1_mini
|
||||
|
||||
# TODO -> add your personal wifi, logging, api, ota settings here
|
||||
|
||||
uart:
|
||||
rx_pin: 4
|
||||
tx_pin: 5
|
||||
baud_rate: 9600
|
||||
rx_pin: 4
|
||||
tx_pin: 5
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: mhz19
|
||||
@ -46,7 +47,7 @@ ESPHome configuration
|
||||
name: "MH-Z19 Temperature"
|
||||
update_interval: 30s
|
||||
|
||||
# Monitor the Wifi connection status
|
||||
# Monitor the Wifi connection status
|
||||
binary_sensor:
|
||||
- platform: status
|
||||
name: "Infostrip Status"
|
||||
@ -54,12 +55,12 @@ ESPHome configuration
|
||||
# Configure each pixel as a single light (attention memory consuming)
|
||||
light:
|
||||
- platform: fastled_clockless
|
||||
chipset: WS2812B
|
||||
chipset: WS2812B
|
||||
id: light_fastled
|
||||
pin: D4
|
||||
num_leds: 4
|
||||
rgb_order: GRB
|
||||
name: "Infostrip"
|
||||
name: "Infostrip"
|
||||
effects:
|
||||
- strobe:
|
||||
- random:
|
||||
@ -95,10 +96,10 @@ ESPHome configuration
|
||||
to: 3
|
||||
effects:
|
||||
- strobe:
|
||||
|
||||
|
||||
.. 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
|
||||
----------------------------
|
||||
|
@ -15,7 +15,7 @@ It is available from various retailers online or directly from `iwoole.com <http
|
||||
==================
|
||||
.. 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.
|
||||
|
||||
@ -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.
|
||||
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
|
||||
-------------------------
|
||||
@ -57,7 +57,8 @@ I prefer to use the :ref:`color-interlock <rgbw_color_interlock>` option along w
|
||||
esphome:
|
||||
name: "IWOOLE Table Lamp"
|
||||
#ESP type is ESP8266EX with 1MB flash
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
# 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
|
||||
===========
|
||||
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::
|
||||
|
||||
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.
|
||||
|
||||
1. Disconnect the device from mains voltage!
|
||||
@ -157,4 +139,3 @@ See Also
|
||||
- :doc:`/components/output/index`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :ghedit:`Edit`
|
||||
|
||||
|
@ -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`.
|
||||
|
||||
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
|
||||
=====================
|
||||
|
||||
@ -127,35 +110,25 @@ ESPHome configuration
|
||||
esphome:
|
||||
name: $devicename
|
||||
comment: ${device_description}
|
||||
platform: ESP32
|
||||
|
||||
esp32:
|
||||
board: m5stick-c
|
||||
platformio_options:
|
||||
upload_speed: 115200
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
domain: .lan
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Basement Leak Det. Fallback AP"
|
||||
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:
|
||||
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API & OTA Updates
|
||||
api:
|
||||
password: !secret api_password
|
||||
ota:
|
||||
password: !secret ota_password
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
|
@ -127,12 +127,13 @@ variable ``output_component1``.
|
||||
|
||||
esphome:
|
||||
name: mirabella_genio_cw_1
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
@ -154,7 +155,7 @@ variable ``output_component1``.
|
||||
id: output_component1
|
||||
# May need to use GPIO14 instead for certain globes
|
||||
pin: GPIO13
|
||||
|
||||
|
||||
|
||||
3.2 Cold + Warm White Bulbs
|
||||
***************************
|
||||
@ -163,12 +164,13 @@ variable ``output_component1``.
|
||||
|
||||
esphome:
|
||||
name: mirabella_genio_cwww_1
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
@ -203,12 +205,13 @@ variable ``output_component1``.
|
||||
|
||||
esphome:
|
||||
name: rgbw_e27_01
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
|
||||
@ -253,12 +256,13 @@ A `project by ssieb <https://github.com/ssieb/custom_components/tree/master/cwww
|
||||
|
||||
esphome:
|
||||
name: rgbw_e27_01
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: 'WIFI'
|
||||
password: 'WIFIPASS'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
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.
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
|
||||
|
||||
|
||||
4. Adding to Home Assistant
|
||||
---------------------------
|
||||
|
||||
|
@ -99,7 +99,8 @@ Now you have a pair of wires from the GPIO and 0V to your retractive switch lets
|
||||
|
||||
esphome:
|
||||
name: my_ls
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
|
@ -31,7 +31,8 @@ The R1 version of the Dual controls the relays via the UART, so the code gets a
|
||||
|
||||
esphome:
|
||||
name: dual_ls
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
@ -182,7 +183,8 @@ It's basically the same as the :doc:`T2 </cookbook/sonoff-t1-3>`
|
||||
|
||||
esphome:
|
||||
name: dual_ls
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
|
@ -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
|
||||
esphome:
|
||||
name: fishpond
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
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
|
||||
logger:
|
||||
level: DEBUG
|
||||
|
||||
ota:
|
||||
|
||||
api:
|
||||
password: !secret esplibapi_password
|
||||
|
||||
status_led:
|
||||
pin: GPIO13
|
||||
|
@ -18,13 +18,13 @@ T1
|
||||
|
||||
esphome:
|
||||
name: my_t1
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
use_address: xxx.xxx.xxx.xxx
|
||||
|
||||
logger:
|
||||
|
||||
@ -83,13 +83,13 @@ T2
|
||||
|
||||
esphome:
|
||||
name: my_t2
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
use_address: xxx.xxx.xxx.xxx
|
||||
|
||||
logger:
|
||||
|
||||
@ -158,13 +158,13 @@ T3
|
||||
|
||||
esphome:
|
||||
name: my_t3
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
use_address: xxx.xxx.xxx.xxx
|
||||
|
||||
logger:
|
||||
|
||||
|
@ -25,7 +25,8 @@ Below is the ESPHome configuration file that will get you up and running. This a
|
||||
|
||||
esphome:
|
||||
name: $devicename
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
@ -39,11 +40,9 @@ Below is the ESPHome configuration file that will get you up and running. This a
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
password: !secret api_password
|
||||
|
||||
# Setup OTA password
|
||||
# Setup OTA
|
||||
ota:
|
||||
password: !secret ota_password
|
||||
|
||||
# Define output pins
|
||||
output:
|
||||
|
@ -24,13 +24,10 @@ Below is the ESPHome configuration file that will get you up and running. This a
|
||||
|
||||
substitutions:
|
||||
updates: 30s
|
||||
unique_id: solarstation-x
|
||||
name: solarstation-x
|
||||
|
||||
esphome:
|
||||
name: ${unique_id}
|
||||
platform: ESP32
|
||||
board: pico32
|
||||
arduino_version: latest
|
||||
name: ${name}
|
||||
platformio_options:
|
||||
## larger stack size required with all registers enable_load_test
|
||||
## 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);
|
||||
ESP_LOGI("ModbusLambda", "EPSOLAR Battery set");
|
||||
|
||||
|
||||
esp32:
|
||||
board: pico32
|
||||
framework:
|
||||
type: arduino
|
||||
version: latest
|
||||
|
||||
wifi:
|
||||
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
|
||||
api:
|
||||
password: !secret api_password
|
||||
reboot_timeout: 0s
|
||||
|
||||
ota:
|
||||
password: !secret ota_password
|
||||
|
||||
uart:
|
||||
id: mod_bus
|
||||
|
@ -125,12 +125,13 @@ Depending on the type of your light you either need a config using my9231 driver
|
||||
|
||||
esphome:
|
||||
name: downlight01
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: "YOUR SSID"
|
||||
password: "YOUR WIFI PASSWORD"
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
@ -16,7 +16,8 @@ asks you for the board type.
|
||||
# Example configuration entry
|
||||
esphome:
|
||||
name: livingroom
|
||||
platform: ESP32
|
||||
|
||||
esp32:
|
||||
board: <BOARD_TYPE>
|
||||
|
||||
.. note::
|
||||
@ -43,7 +44,8 @@ Some notes about the pins on the ESP32:
|
||||
# Example configuration entry
|
||||
esphome:
|
||||
name: livingroom
|
||||
platform: ESP32
|
||||
|
||||
esp32:
|
||||
board: <BOARD_TYPE>
|
||||
|
||||
binary_sensor:
|
||||
|
@ -17,7 +17,8 @@ asks you for the board type.
|
||||
# Example configuration entry
|
||||
esphome:
|
||||
name: livingroom
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: <BOARD_TYPE>
|
||||
|
||||
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
|
||||
esphome:
|
||||
name: livingroom
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
binary_sensor:
|
||||
|
@ -16,9 +16,10 @@ the ESPHome wizard asks you for your platform and |nodemcu-32s|_ as the board ty
|
||||
|
||||
# Example configuration entry
|
||||
esphome:
|
||||
name: livingroom
|
||||
platform: ESP32
|
||||
board: nodemcu-32s
|
||||
name: livingroom
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
|
||||
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!
|
||||
@ -48,7 +49,8 @@ Note that in certain conditions you *can* use the pins marked as ``INTERNAL`` in
|
||||
# Example configuration entry
|
||||
esphome:
|
||||
name: livingroom
|
||||
platform: ESP32
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
|
||||
binary_sensor:
|
||||
|
@ -24,7 +24,8 @@ the ESPHome wizard asks you for your platform and |nodemcuv2|_ as the board type
|
||||
# Example configuration entry
|
||||
esphome:
|
||||
name: livingroom
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
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
|
||||
esphome:
|
||||
name: livingroom
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
binary_sensor:
|
||||
|
@ -13,7 +13,8 @@ and shipping from China takes a long time, I've only set up dedicated guides for
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
After that use the following list of pin to function mappings to set up your Sonoff device.
|
||||
|
@ -125,12 +125,13 @@ or alternatively, you can just take the below configuration file and modify it t
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
@ -226,12 +227,13 @@ of the basic functions.
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -53,12 +53,13 @@ exposes all of the basic functions.
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -127,13 +127,13 @@ or alternatively, you can just take the below configuration file and modify it t
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
arduino_version: 2.4.2
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
@ -147,7 +147,7 @@ pre-compile the firmware.
|
||||
.. note::
|
||||
|
||||
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.
|
||||
|
||||
Step 4: Uploading Firmware
|
||||
@ -208,12 +208,13 @@ of the basic functions.
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
arduino_version: 2.4.2
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -126,12 +126,13 @@ or alternatively, you can just take the below configuration file and modify it t
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
@ -229,12 +230,13 @@ of the basic functions.
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -1,16 +1,18 @@
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
# Automation turning on the blue status LED once T1 is booted up
|
||||
on_boot:
|
||||
priority: -10
|
||||
then:
|
||||
- light.turn_on: blue_led_light
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
@ -133,12 +133,13 @@ or alternatively, you can just take the below configuration file and modify it t
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
@ -233,12 +234,13 @@ of the basic functions.
|
||||
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
api:
|
||||
|
||||
|
@ -1,16 +1,18 @@
|
||||
esphome:
|
||||
name: <NAME_OF_NODE>
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
# Automation turning on the blue status LED once T3 is booted up
|
||||
on_boot:
|
||||
priority: -10
|
||||
then:
|
||||
- light.turn_on: blue_led_light
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: <YOUR_SSID>
|
||||
password: <YOUR_PASSWORD>
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
@ -1,11 +1,12 @@
|
||||
esphome:
|
||||
name: '<NODE_NAME>'
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: '<WIFI_SSID>'
|
||||
password: '<WIFI_PASSWORD>'
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
logger:
|
||||
# Disable UART logging (pins GPIO1/3 are used for button/led)
|
||||
|
@ -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.
|
||||
|
||||
substitutions:
|
||||
device_name: '<NODE_NAME>' # used internally.. e.g. teckin_sp20
|
||||
friendly_name: '<Node Name>' # displayed in HA.. e.g. Teckin SP20
|
||||
wifi_ssid: '<WIFI_SSID>'
|
||||
wifi_password: '<WIFI_PASSWORD>'
|
||||
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: ${wifi_ssid}
|
||||
password: ${wifi_password}
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable Logs from the device
|
||||
logger:
|
||||
@ -81,7 +80,7 @@ switch:
|
||||
pin:
|
||||
number: GPIO2
|
||||
inverted: true
|
||||
|
||||
|
||||
- platform: gpio
|
||||
pin: GPIO4
|
||||
id: relay
|
||||
|
@ -86,7 +86,7 @@ Configuration variables:
|
||||
should be treated as inverted. Defaults to ``false``.
|
||||
- **mode** (*Optional*, string or mapping): Configures the pin to behave in different
|
||||
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:
|
||||
|
||||
- **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
|
||||
wifi:
|
||||
ssid: "your_ssid"
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
domain: .yourdomain.lan
|
||||
fast_connect: true
|
||||
@ -339,7 +339,8 @@ merged with the services definitions from main config file.
|
||||
level: ${log_level}
|
||||
|
||||
api:
|
||||
password: !secret hass_api_key
|
||||
encryption:
|
||||
key: !secret api_encryption_key
|
||||
reboot_timeout: 1h
|
||||
|
||||
sensor:
|
||||
|
@ -66,9 +66,9 @@ Relevant Documentation
|
||||
- ``project`` - :ref:`esphome-creators_project`
|
||||
- ``esp32_improv`` - :doc:`/components/esp32_improv`
|
||||
- ``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
|
||||
the ``esp32_improv`` components.
|
||||
the ``esp32_improv`` / ``improv_serial`` components.
|
||||
- ``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
|
||||
create a minimal YAML using :ref:`config-git_packages`.
|
||||
|
@ -32,6 +32,7 @@ Blog Posts & Videos
|
||||
- `Count Water Bottles <https://vigonotion.com/blog/monitor-remainding-water-bottles/>`__ by `vigonotion <https://vigonotion.com>`__
|
||||
- `ESPHome Weather Station with Nextion display <https://github.com/bruxy70/Home-Assistant-ESPHome-Weather-Station>`__ by :ghuser:`bruxy70`
|
||||
- `ESPHome Wall Mount with Nextion Display <https://github.com/Andoramb/Nextion-wall-mount>`__ by :ghuser:`Andoramb` (`video <https://www.youtube.com/watch?v=TL8wZNnS4jI>`__)
|
||||
- `ESPHome 12v Fan Controller with PID Climate <https://github.com/patrickcollins12/esphome-fan-controller>`__ by :ghuser:`patrickcollins12`
|
||||
- `Sonoff 4CH Irrigation Controller with Nextion Display <https://github.com/bruxy70/Irrigation-with-display>`__ by :ghuser:`bruxy70`
|
||||
- `Automated Bathroom Ventilation <https://www.youtube.com/watch?v=weBDnmrQYOs>`__ by `Intermittent Technology <https://intermit.tech>`__
|
||||
- `ESPHome MP3 Sound Machine <https://selfhostedhome.com/esp8266-mp3-sound-machine/>`__ by `Self Hosted Home <https://selfhostedhome.com>`__
|
||||
|
@ -15,9 +15,17 @@ Installing ESPHome Dashboard
|
||||
|
||||
The ESPHome Dashboard can be installed as a Home Assistant add-on, which you can find in the add-on store in the Supervisor panel. Open it using the following button then click on INSTALL:
|
||||
|
||||
If you do not have the official ESPHome add-on repository added you can add with this button:
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<a href="https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_esphome" target="_blank"><img src="https://my.home-assistant.io/badges/supervisor_addon.svg" alt="Open your Home Assistant instance and show the dashboard of a Supervisor add-on." /></a>
|
||||
<a href="https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon" target="_blank"><img src="https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg" alt="Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled." /></a>
|
||||
|
||||
If you have the repository then you can install the addon here:
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<a href="https://my.home-assistant.io/redirect/supervisor_addon/?addon=5c53de3b_esphome" target="_blank"><img src="https://my.home-assistant.io/badges/supervisor_addon.svg" alt="Open your Home Assistant instance and show the dashboard of a Supervisor add-on." /></a>
|
||||
|
||||
After that, wait a bit until it is installed (this can take a while). Click "Start" and then click "Open Web UI". If you see "502: Bad Gateway" it is currently starting, and you can refresh the page after a couple of seconds.
|
||||
|
||||
@ -100,8 +108,7 @@ Once your configuration is installed on your ESP device and is online, it will b
|
||||
|
||||
<a href="https://my.home-assistant.io/redirect/config_flow_start/?domain=esphome" target="_blank"><img src="https://my.home-assistant.io/badges/config_flow_start.svg" alt="Open your Home Assistant instance and start setting up a new integration." /></a>
|
||||
|
||||
Alternatively, you can manually add the device by clicking "CONFIGURE" on the ESPHome integration
|
||||
and entering "<NODE_NAME>.local" as the host.
|
||||
Alternatively, you can manually add the device on the Home Assistant Integrations page. Click on the "Add Integration" button (bottom right), search for esphome, and enter the host name, eg: "<NODE_NAME>.local" as the host. Use the same process to add multiple esphome devices.
|
||||
|
||||
.. figure:: /components/switch/images/gpio-ui.png
|
||||
:align: center
|
||||
|
Loading…
Reference in New Issue
Block a user