『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 3366|回复: 4

[已解决] ESP01编译upload出错,小白求教

[复制链接]

9

主题

60

帖子

430

积分

中级会员

Rank: 3Rank: 3

积分
430
金钱
370
HASS币
0
发表于 2020-12-10 17:55:04 | 显示全部楼层 |阅读模式
本帖最后由 koymeha 于 2020-12-10 17:59 编辑
esphome:
  name: bg01
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "SJZN"
  password: "1335588"
  
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Bg01 Fallback Hotspot"
    password: "OMfezwCoy6Pd"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "1"

ota:
  password: "1"
上面是esphome后台自己生成的,是否还需要改呢?
upload出现如下错误
INFO Reading configuration /config/esphome/bg01.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/bg01
Processing bg01 (board: esp01_1m; framework: arduino; platform: [email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES: 
 - framework-arduinoespressif8266 3.20704.0 (2.7.4) 
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.20800.0 (2.8.0) 
 - toolchain-xtensa 2.40802.200502 (4.8.2)
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.7
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling /data/bg01/.pioenvs/bg01/src/main.cpp.o
Linking /data/bg01/.pioenvs/bg01/firmware.elf
Retrieving maximum program size /data/bg01/.pioenvs/bg01/firmware.elf
Building /data/bg01/.pioenvs/bg01/firmware.bin
Checking size /data/bg01/.pioenvs/bg01/firmware.elf
RAM:   [====      ]  44.4% (used 36348 bytes from 81920 bytes)
Flash: [====      ]  38.0% (used 388740 bytes from 1023984 bytes)
Creating BIN file "/data/bg01/.pioenvs/bg01/firmware.bin" using "/root/.platformio/packages/framework-arduinoespressif8266/bootloaders/eboot/eboot.elf" and "/data/bg01/.pioenvs/bg01/firmware.elf"
========================= [SUCCESS] Took 33.32 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of bg01.local
ERROR Error resolving IP address of bg01.local. Is it connected to WiFi?
ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname


回复

使用道具 举报

9

主题

60

帖子

430

积分

中级会员

Rank: 3Rank: 3

积分
430
金钱
370
HASS币
0
 楼主| 发表于 2020-12-10 17:57:44 | 显示全部楼层
要设置静态地址? 模块还要先联网吗?新手迷糊~~~
回复

使用道具 举报

9

主题

60

帖子

430

积分

中级会员

Rank: 3Rank: 3

积分
430
金钱
370
HASS币
0
 楼主| 发表于 2020-12-10 17:59:23 | 显示全部楼层
INFO Reading configuration /config/esphome/bg01.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/bg01
Processing bg01 (board: esp01_1m; framework: arduino; platform: [email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES: 
 - framework-arduinoespressif8266 3.20704.0 (2.7.4) 
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.20800.0 (2.8.0) 
 - toolchain-xtensa 2.40802.200502 (4.8.2)
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.7
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Retrieving maximum program size /data/bg01/.pioenvs/bg01/firmware.elf
Checking size /data/bg01/.pioenvs/bg01/firmware.elf
RAM:   [====      ]  44.4% (used 36348 bytes from 81920 bytes)
Flash: [====      ]  38.0% (used 388740 bytes from 1023984 bytes)
========================= [SUCCESS] Took 14.13 seconds =========================
INFO Successfully compiled program.


明白了,不能点upload,要先Compiling
回复

使用道具 举报

27

主题

2124

帖子

8662

积分

论坛元老

Rank: 8Rank: 8

积分
8662
金钱
6533
HASS币
30

论坛元老

发表于 2020-12-10 18:52:03 | 显示全部楼层
需要mDNS,不支持的要指定ip就可以了
回复

使用道具 举报

34

主题

698

帖子

4504

积分

论坛元老

Rank: 8Rank: 8

积分
4504
金钱
3796
HASS币
50
发表于 2020-12-10 23:01:09 | 显示全部楼层
把你的wifi那一行填对再试试
你这一看就不对,,,wifi密码就没有7位数,,必须8位数以上
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-6-16 04:50 , Processed in 0.053111 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表