Flash esphome into Daikin air sensor
·1540 字
目录
1.硬件配置 #
主板本体如上图所示,我买到的这台是BRY88AB151K
,支持甲醛扩展,但是由于甲醛扩展模块太贵了并没有购买。
- 主控:ESP32
- PM2.5 传感器:PM2105
- 温湿度传感器:HDC1080
- TVOC 传感器:SGP30
- 二氧化碳传感器:CM1106
2.刷机准备 #
2.1 硬件连接 #
ESP32经典串口下载方式,随便找一个 USB2TTL 模块,只需连接 GND、TX/RX ,供电由外部USB提供。
在下载前,要先通过短接 GPIO0 打断 bootloader 的正常引导,即可进入下载模式;
GPIO0短接跳线位置在上图红框中有指出。
2.2 软件准备 #
准备好 git 与 Python 环境,最好搭配合理的网络,便于快速的下载所需的编译器。
本文演示环境为 Debian 12,配合优秀的国际网络。
2.2.1 安装软件 #
root@crazy:~# apt install python3-pip git
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pip is already the newest version (23.0.1+dfsg-1).
git is already the newest version (1:2.47.1-0ppa1~ubuntu22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 65 not upgraded.
root@crazy:~# pip3 install esphome
Collecting esphome
Downloading esphome-2024.12.2-py3-none-any.whl (4.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.1/4.1 MB 57.2 MB/s eta 0:00:00
Collecting cryptography==43.0.0
Downloading cryptography-43.0.0-cp39-abi3-manylinux_2_28_x86_64.whl (4.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.0/4.0 MB 101.4 MB/s eta 0:00:00
Collecting voluptuous==0.14.2
Downloading voluptuous-0.14.2-py3-none-any.whl (31 kB)
Collecting PyYAML==6.0.2
Downloading PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (762 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 763.0/763.0 kB 55.7 MB/s eta 0:00:00
Collecting paho-mqtt==1.6.1
Downloading paho-mqtt-1.6.1.tar.gz (99 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.4/99.4 kB 14.5 MB/s eta 0:00:00
...
Successfully built esptool paho-mqtt platformio
Installing collected packages: unicodedata2, reedsolo, pyserial, puremagic, paho-mqtt, intelhex, ifaddr, esphome-dashboard, bottle, bitarray, appdirs, zeroconf, voluptuous, tzlocal, tzdata, typing_extensions, tornado, tabulate, sniffio, semantic_version, ruamel.yaml.clib, PyYAML, pycparser, protobuf, pillow, packaging, openstep-plist, kconfiglib, icmplib, h11, fs, freetype-py, FontTools, ecdsa, colorama, click, bitstring, attrs, async-interrupt, argcomplete, ajsonrpc, aiohappyeyeballs, wsproto, uvicorn, ruamel.yaml, marshmallow, gflanguages, cffi, anyio, ufoLib2, starlette, defcon, cryptography, platformio, noiseprotocol, glyphsLib, esptool, chacha20poly1305-reuseable, glyphsets, aioesphomeapi, esphome
Successfully installed FontTools-4.55.3 PyYAML-6.0.2 aioesphomeapi-24.6.2 aiohappyeyeballs-2.4.4 ajsonrpc-1.2.0 anyio-4.7.0 appdirs-1.4.4 argcomplete-3.5.2 async-interrupt-1.2.0 attrs-24.3.0 bitarray-2.9.3 bitstring-4.2.3 bottle-0.13.2 cffi-1.17.1 chacha20poly1305-reuseable-0.13.2 click-8.1.7 colorama-0.4.6 cryptography-43.0.0 defcon-0.10.3 ecdsa-0.19.0 esphome-2024.12.2 esphome-dashboard-20241217.1 esptool-4.7.0 freetype-py-2.5.1 fs-2.4.16 gflanguages-0.7.1 glyphsLib-6.9.5 glyphsets-1.0.0 h11-0.14.0 icmplib-3.0.4 ifaddr-0.2.0 intelhex-2.3.0 kconfiglib-13.7.1 marshmallow-3.23.2 noiseprotocol-0.3.1 openstep-plist-0.4.0 packaging-24.2 paho-mqtt-1.6.1 pillow-10.4.0 platformio-6.1.16 protobuf-3.20.3 puremagic-1.27 pycparser-2.22 pyserial-3.5 reedsolo-1.7.0 ruamel.yaml-0.18.6 ruamel.yaml.clib-0.2.12 semantic_version-2.10.0 sniffio-1.3.1 starlette-0.39.2 tabulate-0.9.0 tornado-6.4 typing_extensions-4.12.2 tzdata-2024.2 tzlocal-5.2 ufoLib2-0.17.0 unicodedata2-15.1.0 uvicorn-0.30.6 voluptuous-0.14.2 wsproto-1.2.0 zeroconf-0.132.2
2.2.2 拉取代码 #
root@crazy:~# git clone https://github.com/louliangsheng/daikin-air-sensor.git
Cloning into 'daikin-air-sensor'...
remote: Enumerating objects: 1522, done.
remote: Counting objects: 100% (602/602), done.
remote: Compressing objects: 100% (372/372), done.
remote: Total 1522 (delta 347), reused 409 (delta 214), pack-reused 920 (from 1)
Receiving objects: 100% (1522/1522), 26.80 MiB | 11.20 MiB/s, done.
Resolving deltas: 100% (870/870), done.
root@crazy:~# cd daikin-air-sensor/
root@crazy:~/daikin-air-sensor# ls
daikin-bry88aa151k.yaml daikin-bry88ab151k-ch2o.yaml daikin-bry88ab151k.yaml firmware header image README.md
2.2.3 刷机 #
root@crazy:~/daikin-air-sensor# esphome run ./daikin-bry88ab151k.yaml
INFO ESPHome 2024.12.2
INFO Reading configuration ./daikin-bry88ab151k.yaml...
Failed config
esphome: None
name: daikin-air-sensor
project:
name: DAIKIN.BRY88AB151K
version: PM2105
name_add_mac_suffix: True
includes:
Could not find file './cm1106.h'. Please make sure it exists (full path: /root/daikin-air-sensor/cm1106.h).
- cm1106.h
Could not find file './pm2105.h'. Please make sure it exists (full path: /root/daikin-air-sensor/pm2105.h).
- pm2105.h
min_version: 2024.12.2
build_path: build/daikin-air-sensor
缺少头文件,从./header
里面复制一下即可
root@crazy:~/daikin-air-sensor# cp header/cm1106.h header/pm2105.h .
root@crazy:~/daikin-air-sensor# esphome run ./daikin-bry88ab151k.yaml
INFO ESPHome 2024.12.2
INFO Reading configuration ./daikin-bry88ab151k.yaml...
Failed config
At least one platform must be specified for 'ota'; add 'platform: esphome' for original OTA functionality
按他说的,add 'platform: esphome' for original OTA functionality
esphome:
name: daikin-air-sensor
project:
name: "DAIKIN.BRY88AB151K"
version: "PM2105" #根据PM2.5传感器型号选择,方便后续OTA查找文件
# version: "PM2005"
name_add_mac_suffix: true
includes:
- "cm1106.h"
- "pm2105.h" #根据PM2.5传感器型号选择
# - "pm2005.h"
esp32:
board: nodemcu-32s
wifi:
# ssid: 'L' #填写自己的WiFi及密码
# password: '1234567890'
ap:
ssid: "DAIKIN Fallback Hotspot"
captive_portal:
api:
reboot_timeout: 0s
ota:
platform: esphome # 在此处添加
web_server:
port: 80
修改后,即可正常编译。第一次编译时需要下载platformio全家桶,速度比较慢。
root@crazy:~/daikin-air-sensor# esphome run ./daikin-bry88ab151k.yaml
INFO ESPHome 2024.12.2
INFO Reading configuration ./daikin-bry88ab151k.yaml...
INFO Generating C++ source...
INFO Core config, version or integrations changed, cleaning build files...
INFO Compiling app...
*********************************************************************************************************************************************************************************************
If you like PlatformIO, please:
- star it on GitHub > https://github.com/platformio/platformio-core
- follow us on LinkedIn to stay up-to-date on the latest project news > https://www.linkedin.com/company/platformio/
- try PlatformIO IDE for embedded development > https://platformio.org/platformio-ide
*********************************************************************************************************************************************************************************************
Processing daikin-air-sensor (board: nodemcu-32s; framework: arduino; platform: platformio/[email protected])
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Platform Manager: Installing platformio/espressif32 @ 5.4.0
INFO Installing platformio/espressif32 @ 5.4.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Platform Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
INFO Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: [email protected]+2021r2-patch5 has been installed!
INFO [email protected]+2021r2-patch5 has been installed!
Tool Manager: Installing platformio/framework-arduinoespressif32 @ ~3.20005.0
INFO Installing platformio/framework-arduinoespressif32 @ ~3.20005.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-esptoolpy @ ~1.40400.0
INFO Installing platformio/tool-esptoolpy @ ~1.40400.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-scons @ ~4.40801.0
INFO Installing platformio/tool-scons @ ~4.40801.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/AsyncTCP-esphome @ 2.1.4
INFO Installing esphome/AsyncTCP-esphome @ 2.1.4
Downloading [####################################] 100%
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 3.2.2
INFO Installing esphome/ESPAsyncWebServer-esphome @ 3.2.2
Downloading [####################################] 100%
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing bblanchon/ArduinoJson @ 6.18.5
INFO Installing bblanchon/ArduinoJson @ 6.18.5
Downloading [####################################] 100%
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.4
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- Wire @ 2.0.0
|-- ArduinoJson @ 6.18.5
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/api/api_frame_helper.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/api/api_pb2_service.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/api/api_server.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/api/list_entities.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/api/proto.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/api/subscribe_state.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/api/user_services.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/binary_sensor/automation.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/binary_sensor/binary_sensor.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/binary_sensor/filter.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/button/button.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/captive_portal/captive_portal.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/custom/sensor/custom_sensor.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/custom/switch/custom_switch.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/esp32/core.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/esp32/gpio.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/esp32/preferences.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/esphome/ota/ota_esphome.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/factory_reset/button/factory_reset_button.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/gpio/binary_sensor/gpio_binary_sensor.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/gpio/switch/gpio_switch.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/hdc1080/hdc1080.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/i2c/i2c.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/i2c/i2c_bus_arduino.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/i2c/i2c_bus_esp_idf.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/json/json_util.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/logger/logger.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/logger/logger_esp32.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/logger/logger_esp8266.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/logger/logger_host.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/logger/logger_libretiny.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/logger/logger_rp2040.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/md5/md5.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/mdns/mdns_component.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/mdns/mdns_esp32.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/mdns/mdns_esp8266.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/mdns/mdns_host.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/mdns/mdns_libretiny.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/mdns/mdns_rp2040.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/network/util.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/number/automation.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/number/number.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/number/number_call.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/number/number_traits.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/ota/ota_backend.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/ota/ota_backend_arduino_esp8266.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/ota/ota_backend_arduino_libretiny.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/ota/ota_backend_arduino_rp2040.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/ota/ota_backend_esp_idf.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/restart/button/restart_button.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/safe_mode/safe_mode.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/sensirion_common/i2c_sensirion.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/sensor/automation.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/sensor/filter.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/sensor/sensor.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/sgp30/sgp30.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/socket/bsd_sockets_impl.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/socket/lwip_raw_tcp_impl.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/socket/lwip_sockets_impl.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/socket/socket.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/status_led/status_led.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/switch/automation.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/switch/switch.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/template/binary_sensor/template_binary_sensor.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/template/number/template_number.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/template/switch/template_switch.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/uart/uart.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/uart/uart_component.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/uart/uart_component_esp32_arduino.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/uart/uart_component_esp8266.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/uart/uart_component_esp_idf.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/uart/uart_component_host.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/uart/uart_component_libretiny.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/uart/uart_component_rp2040.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/uart/uart_debugger.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/web_server/list_entities.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/web_server/web_server.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/web_server/web_server_v1.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/web_server_base/web_server_base.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/wifi/wifi_component.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/wifi/wifi_component_esp32_arduino.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/wifi/wifi_component_esp8266.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/wifi/wifi_component_esp_idf.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/wifi/wifi_component_libretiny.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/wifi/wifi_component_pico_w.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/components/wifi_signal/wifi_signal_sensor.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/application.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/color.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/component.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/component_iterator.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/controller.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/entity_base.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/helpers.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/log.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/ring_buffer.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/scheduler.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/string_ref.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/time.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/esphome/core/util.cpp.o
Compiling .pioenvs/daikin-air-sensor/src/main.cpp.o
Building .pioenvs/daikin-air-sensor/bootloader.bin
Creating esp32 image...
Successfully created esp32 image.
Generating partitions .pioenvs/daikin-air-sensor/partitions.bin
Compiling .pioenvs/daikin-air-sensor/lib73f/AsyncTCP-esphome/AsyncTCP.cpp.o
Archiving .pioenvs/daikin-air-sensor/lib73f/libAsyncTCP-esphome.a
Indexing .pioenvs/daikin-air-sensor/lib73f/libAsyncTCP-esphome.a
Compiling .pioenvs/daikin-air-sensor/lib789/WiFi/WiFi.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib789/WiFi/WiFiAP.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib789/WiFi/WiFiClient.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib789/WiFi/WiFiGeneric.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib789/WiFi/WiFiMulti.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib789/WiFi/WiFiSTA.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib789/WiFi/WiFiScan.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib789/WiFi/WiFiServer.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib789/WiFi/WiFiUdp.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib790/FS/FS.cpp.o
Archiving .pioenvs/daikin-air-sensor/lib789/libWiFi.a
Indexing .pioenvs/daikin-air-sensor/lib789/libWiFi.a
Compiling .pioenvs/daikin-air-sensor/lib790/FS/vfs_api.cpp.o
Compiling .pioenvs/daikin-air-sensor/liba61/Update/HttpsOTAUpdate.cpp.o
Archiving .pioenvs/daikin-air-sensor/lib790/libFS.a
Indexing .pioenvs/daikin-air-sensor/lib790/libFS.a
Compiling .pioenvs/daikin-air-sensor/liba61/Update/Updater.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib4ac/ESPAsyncWebServer-esphome/AsyncEventSource.cpp.o
Archiving .pioenvs/daikin-air-sensor/liba61/libUpdate.a
Indexing .pioenvs/daikin-air-sensor/liba61/libUpdate.a
Compiling .pioenvs/daikin-air-sensor/lib4ac/ESPAsyncWebServer-esphome/AsyncWebSocket.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib4ac/ESPAsyncWebServer-esphome/WebAuthentication.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib4ac/ESPAsyncWebServer-esphome/WebHandlers.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib4ac/ESPAsyncWebServer-esphome/WebRequest.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib4ac/ESPAsyncWebServer-esphome/WebResponses.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib4ac/ESPAsyncWebServer-esphome/WebServer.cpp.o
Compiling .pioenvs/daikin-air-sensor/lib43b/DNSServer/DNSServer.cpp.o
Archiving .pioenvs/daikin-air-sensor/lib4ac/libESPAsyncWebServer-esphome.a
Indexing .pioenvs/daikin-air-sensor/lib4ac/libESPAsyncWebServer-esphome.a
Compiling .pioenvs/daikin-air-sensor/libe94/ESPmDNS/ESPmDNS.cpp.o
Archiving .pioenvs/daikin-air-sensor/lib43b/libDNSServer.a
Indexing .pioenvs/daikin-air-sensor/lib43b/libDNSServer.a
Compiling .pioenvs/daikin-air-sensor/lib767/Wire/Wire.cpp.o
Archiving .pioenvs/daikin-air-sensor/libe94/libESPmDNS.a
Indexing .pioenvs/daikin-air-sensor/libe94/libESPmDNS.a
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/Esp.cpp.o
Archiving .pioenvs/daikin-air-sensor/lib767/libWire.a
Indexing .pioenvs/daikin-air-sensor/lib767/libWire.a
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/FirmwareMSC.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/FunctionalInterrupt.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/HWCDC.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/HardwareSerial.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/IPAddress.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/IPv6Address.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/MD5Builder.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/Print.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/Stream.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/StreamString.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/Tone.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/USB.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/USBCDC.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/USBMSC.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/WMath.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/WString.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/base64.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/cbuf.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-adc.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-bt.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-cpu.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-dac.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-gpio.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-i2c-slave.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-i2c.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-ledc.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-matrix.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-misc.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-psram.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-rgb-led.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-rmt.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-sigmadelta.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-spi.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-time.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-timer.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-tinyusb.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-touch.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/esp32-hal-uart.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/firmware_msc_fat.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/libb64/cdecode.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/libb64/cencode.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/main.cpp.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/stdlib_noniso.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/wiring_pulse.c.o
Compiling .pioenvs/daikin-air-sensor/FrameworkArduino/wiring_shift.c.o
Archiving .pioenvs/daikin-air-sensor/libFrameworkArduino.a
Indexing .pioenvs/daikin-air-sensor/libFrameworkArduino.a
Linking .pioenvs/daikin-air-sensor/firmware.elf
RAM: [= ] 12.6% (used 41332 bytes from 327680 bytes)
Flash: [===== ] 51.1% (used 937085 bytes from 1835008 bytes)
Building .pioenvs/daikin-air-sensor/firmware.bin
Creating esp32 image...
Successfully created esp32 image.
esp32_create_combined_bin([".pioenvs/daikin-air-sensor/firmware.bin"], [".pioenvs/daikin-air-sensor/firmware.elf"])
Wrote 0xf6310 bytes to file /root/daikin-air-sensor/.esphome/build/daikin-air-sensor/.pioenvs/daikin-air-sensor/firmware.factory.bin, ready to flash to offset 0x0
esp32_copy_ota_bin([".pioenvs/daikin-air-sensor/firmware.bin"], [".pioenvs/daikin-air-sensor/firmware.elf"])
======================= [SUCCESS] Took 148.48 seconds =======================
INFO Successfully compiled program.
Found multiple options for uploading, please choose one:
[1] COM3 (WCH-LINK USB2TTL (COM3))
[2] Over The Air (daikin-air-sensor.local)
(number): 1
esptool.py v4.7.0
Serial port COM3
Connecting.......
Chip is ESP32-D0WDQ6 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: e0:e2:e6:d5:2f:84
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x000f6fff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Compressed 943200 bytes to 612010...
Wrote 943200 bytes (612010 compressed) at 0x00010000 in 15.6 seconds (effective 484.9 kbit/s)...
Hash of data verified.
Compressed 17440 bytes to 12128...
Wrote 17440 bytes (12128 compressed) at 0x00001000 in 0.5 seconds (effective 258.9 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 144...
Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.1 seconds (effective 370.6 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 576.6 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from COM3 with baud rate 115200
到此即下载完毕,如果你提前在 yaml 中修改好 wifi ssid与密码,直接去路由器中找到他的 IP 即可通过浏览器访问,如果没有则需要通过手机去连接他产生的 AP 去修改,此处不再重复表述。
3. 使用 #
3.1 测试 #
从浏览器中访问 IP ,即可获取一些基本信息,或进行 OTA 更新。
3.2 添加到HA #
在设置-设备与服务-集成
中点击右下角的添加集成,选择 ESPHOME 。
输入刚才在路由器中找到的 IP ,端口保持默认,点击添加,即可正常使用。
参考资料: