Clarify ESP32 vs ESP8266 in docs

This commit is contained in:
Geoff Davis 2023-01-21 11:03:04 -08:00
parent 9ba5194034
commit bcba670a09

View File

@ -112,6 +112,8 @@ climate:
update_interval: 500ms update_interval: 500ms
``` ```
#### ESP8266 platforms
On ESP8266 you'll need to disable logging to serial because it conflicts with On ESP8266 you'll need to disable logging to serial because it conflicts with
the heatpump UART: the heatpump UART:
@ -120,9 +122,13 @@ logger:
baud_rate: 0 baud_rate: 0
``` ```
#### ESP32 platforms
On ESP32 you can change `hardware_uart` to `UART1` or `UART2` and keep logging On ESP32 you can change `hardware_uart` to `UART1` or `UART2` and keep logging
enabled on the main serial port. enabled on the main serial port.
#### UART Notes
*Note:* this component DOES NOT use the ESPHome `uart` component, as it *Note:* this component DOES NOT use the ESPHome `uart` component, as it
requires direct access to a hardware UART via the Arduino `HardwareSerial` requires direct access to a hardware UART via the Arduino `HardwareSerial`
class. The Mitsubishi Heatpump units use an atypical serial port setting ("even class. The Mitsubishi Heatpump units use an atypical serial port setting ("even
@ -131,13 +137,15 @@ software serial libraries, including the one in ESPHome. There's currently no
way to guarantee access to a hardware UART nor retrieve the `HardwareSerial` way to guarantee access to a hardware UART nor retrieve the `HardwareSerial`
handle from the `uart` component within the ESPHome framework. handle from the `uart` component within the ESPHome framework.
# Example configuration # Example configurations
Below is an example configuration which will include wireless strength Below is an example configuration which will include wireless strength
indicators and permit over the air updates. You'll need to create a indicators and permit over the air updates. You'll need to create a
`secrets.yaml` file inside of your `esphome` directory with entries for the `secrets.yaml` file inside of your `esphome` directory with entries for the
various items prefixed with `!secret`. various items prefixed with `!secret`.
## ESP8266 Example Configuration
```yaml ```yaml
substitutions: substitutions:
name: hptest name: hptest
@ -227,6 +235,91 @@ climate:
hardware_uart: UART0 hardware_uart: UART0
``` ```
## ESP32 Example Configuration
```yaml
substitutions:
name: hptest
friendly_name: Test Heatpump
esphome:
name: ${name}
esp32:
board: lolin_s2_mini
variant: ESP32S2
framework:
type: arduino
version: 2.0.3
platform_version: 5.0.0
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${friendly_name} Fallback Hotspot"
password: !secret fallback_password
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
# Enable Web server.
web_server:
port: 80
# Sync time with Home Assistant.
time:
- platform: homeassistant
id: homeassistant_time
# Text sensors with general information.
text_sensor:
# Expose ESPHome version as sensor.
- platform: version
name: ${name} ESPHome Version
# Expose WiFi information as sensors.
- platform: wifi_info
ip_address:
name: ${name} IP
ssid:
name: ${name} SSID
bssid:
name: ${name} BSSID
# Sensors with general information.
sensor:
# Uptime sensor.
- platform: uptime
name: ${name} Uptime
# WiFi Signal sensor.
- platform: wifi_signal
name: ${name} WiFi Signal
update_interval: 60s
external_components:
- source: github://geoffdavis/esphome-mitsubishiheatpump
climate:
- platform: mitsubishi_heatpump
name: "${friendly_name}"
# ESP32 only - change UART0 to UART1 or UART2 and remove the
# logging:baud_rate above to allow the built-in UART0 to function for
# logging.
hardware_uart: UART1
```
# Advanced configuration # Advanced configuration
Some models of heat pump require different baud rates or don't support all Some models of heat pump require different baud rates or don't support all