步骤一:利用pip3 安装 esphome依赖包

pip3 install esphome

步骤二: 配置ESPHOME编译链接环境

esphome esp32Node.yaml wizard

输出:

Hi there!
I'm the wizard of ESPHome :)
And I'm here to help you get started with ESPHome.
In 4 steps I'm going to guide you through creating a basic configuration file for your custom ESP8266/ESP32 firmware. Yay!



============= STEP 1 =============
    _____ ____  _____  ______
   / ____/ __ \|  __ \|  ____|
  | |   | |  | | |__) | |__
  | |   | |  | |  _  /|  __|
  | |___| |__| | | \ \| |____
   \_____\____/|_|  \_\______|

===================================
First up, please choose a name for your node.
It should be a unique name that can be used to identify the device later.
For example, I like calling the node in my living room livingroom.

(name): esp32Node
Oh noes, "esp32Node" isn't a valid name. Names can only include numbers, lower-case letters, underscores and hyphens.
Shall I use "esp32node" as the name instead?
//给接下来需要刷写的ESP32开发板命名
Press ENTER for default (esp32node)
(name [esp32node]): 
Great! Your node is now called "esp32node".


============= STEP 2 =============
      ______  _____ _____
     |  ____|/ ____|  __ \\
     | |__  | (___ | |__) |
     |  __|  \___ \|  ___/
     | |____ ____) | |
     |______|_____/|_|

===================================
Now I'd like to know what microcontroller you're using so that I can compile firmwares for it.
Are you using an ESP32 or ESP8266 platform? (Choose ESP8266 for Sonoff devices)

Please enter either ESP32 or ESP8266.
(ESP32/ESP8266): ESP32
Thanks! You've chosen ESP32 as your platform.

Next, I need to know what board you're using.
Please go to http://docs.platformio.org/en/latest/platforms/espressif32.html#boards and choose a board.
(Type esp01_1m for Sonoff devices)
//选择ESP32目标板的型号,这里我选的是在德亚花80kr买的 “esp32doit-devkit-v1”
For example "nodemcu-32s".
Options: alksesp32, bpi-bit, d-duino-32, esp-wrover-kit, esp32-devkitlipo, esp32-evb, esp32-gateway, esp32-poe, esp32-poe-iso, esp32-pro, esp320, esp32cam, esp32dev, esp32doit-devkit-v1, esp32thing, esp32vn-iot-uno, espea32, espectro32, espino32, featheresp32, firebeetle32, fm-devkit, frogboard, heltec_wifi_kit_32, heltec_wifi_lora_32, heltec_wifi_lora_32_V2, heltec_wireless_stick, hornbill32dev, hornbill32minima, intorobot, iotaap_magnolia, iotbusio, iotbusproteus, lolin32, lolin_d32, lolin_d32_pro, lopy, lopy4, m5stack-core-esp32, m5stack-fire, m5stack-grey, m5stick-c, magicbit, mhetesp32devkit, mhetesp32minikit, microduino-core-esp32, nano32, nina_w10, node32s, nodemcu-32s, odroid_esp32, onehorse32dev, oroca_edubot, pico32, pocket_32, pycom_gpy, quantum, sparkfun_lora_gateway_1-channel, tinypico, ttgo-lora32-v1, ttgo-t-beam, ttgo-t-watch, ttgo-t1, turta_iot_node, vintlabs-devkit-v1, wemos_d1_mini32, wemosbat, wesp32, widora-air, xinabox_cw02
(board): esp32doit-devkit-v1
Way to go! You've chosen esp32doit-devkit-v1 as your board.



============= STEP 3 =============
   __          ___ ______ _
   \ \        / (_)  ____(_)
    \ \  /\  / / _| |__   _
     \ \/  \/ / | |  __| | |
      \  /\  /  | | |    | |
       \/  \/   |_|_|    |_|

===================================
In this step, I'm going to create the configuration for WiFi.
//输入wifi的SSID
First, what's the SSID (the name) of the WiFi network esp32node I should connect to?
For example "Abraham Linksys".
(ssid): ASUS_MESH
Thank you very much! You've just chosen "ASUS_MESH" as your SSID.

Now please state the password of the WiFi network so that I can connect to it (Leave empty for no password)
//输入wifi的密码
For example "PASSWORD42"
(PSK): **********
Perfect! WiFi is now set up (you can create static IPs and so on later).


============= STEP 4 =============
       ____ _______
      / __ \__   __|/\\
     | |  | | | |  /  \\
     | |  | | | | / /\ \\
     | |__| | | |/ ____ \\
      \____/  |_/_/    \_\\

===================================
Almost there! ESPHome can automatically upload custom firmwares over WiFi (over the air) and integrates into Home Assistant with a native API.
This can be insecure if you do not trust the WiFi network. Do you want to set a password for connecting to this ESP?
//为开发版OTA刷写建立密码。
Press ENTER for no password
(password): 
//大功告成,下面就可以编辑esp32Node.yaml来生成自己需要的ESP32的ROM来了
DONE! I've now written a new configuration file to esp32Node.yaml

Next steps:
  > Check your Home Assistant "integrations" screen. If all goes well, you should see your ESP being discovered automatically.
  > Then follow the rest of the getting started guide:
  > https://esphome.io/guides/getting_started_command_line.html
最后修改:2021 年 03 月 14 日
如果觉得我的文章对你有用,请随意赞赏