无法接入sgp30传感器,具体表现为:
1.运行后log内报错:[22:45:12][W][sgp30:237]: Unknown setup error!
2.无法扫描到这个i2c设备:[22:45:12][I][i2c.arduino:068]: Results from i2c bus scan: [22:45:12][I][i2c.arduino:070]: Found no i2c devices!
ota升级后的log
INFO Reading configuration /config/esphome/esp32.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esp32 (board: esp32doit-devkit-v1; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
| |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
| |-- libsodium @ 1.10018.1
|-- Wire @ 2.0.0
RAM: [= ] 12.5% (used 40948 bytes from 327680 bytes)
Flash: [===== ] 50.9% (used 933749 bytes from 1835008 bytes)
========================= [SUCCESS] Took 29.81 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of esp32.local
INFO -> 192.168.1.64
INFO Uploading /data/esp32/.pioenvs/esp32/firmware.bin (939520 bytes)
Uploading: [============================================================] 100% Done...
INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from esp32.local using esphome API
INFO Successfully connected to esp32.local
[22:52:50][I][app:102]: ESPHome version 2023.2.4 compiled on Mar 16 2023, 22:41:50
[22:52:50][C][wifi:504]: WiFi:
[22:52:50][C][wifi:362]: Local MAC: E0:5A:1B:A1:93:78
[22:52:50][C][wifi:363]: SSID: [redacted]
[22:52:50][C][wifi:364]: IP Address: 192.168.1.64
[22:52:50][C][wifi:366]: BSSID: [redacted]
[22:52:50][C][wifi:367]: Hostname: 'esp32'
[22:52:50][C][wifi:369]: Signal strength: -46 dB ▂▄▆█
[22:52:50][C][wifi:373]: Channel: 13
[22:52:50][C][wifi:374]: Subnet: 255.255.255.0
[22:52:50][C][wifi:375]: Gateway: 192.168.1.1
[22:52:50][C][wifi:376]: DNS1: 192.168.10.2
[22:52:50][C][wifi:377]: DNS2: 192.168.1.1
[22:52:50][C][logger:293]: Logger:
[22:52:50][C][logger:294]: Level: DEBUG
[22:52:50][C][logger:295]: Log Baud Rate: 115200
[22:52:50][C][logger:296]: Hardware UART: UART0
[22:52:50][C][i2c.arduino:052]: I2C Bus:
[22:52:50][C][i2c.arduino:053]: SDA Pin: GPIO21
[22:52:50][C][i2c.arduino:054]: SCL Pin: GPIO22
[22:52:50][C][i2c.arduino:055]: Frequency: 50000 Hz
[22:52:50][C][i2c.arduino:058]: Recovery: bus successfully recovered
[22:52:50][I][i2c.arduino:068]: Results from i2c bus scan:
[22:52:50][I][i2c.arduino:070]: Found no i2c devices!
[22:52:50][C][sgp30:220]: SGP30:
[22:52:50][C][sgp30:221]: Address: 0x58
[22:52:50][W][sgp30:237]: Unknown setup error!
[22:52:50][C][sgp30:251]: Update Interval: 1.0s
[22:52:50][C][sgp30:252]: eCO2 sensor 'Workshop eCO2'
[22:52:50][C][sgp30:252]: Device Class: 'carbon_dioxide'
[22:52:50][C][sgp30:252]: State Class: 'measurement'
[22:52:50][C][sgp30:252]: Unit of Measurement: 'ppm'
[22:52:50][C][sgp30:252]: Accuracy Decimals: 1
[22:52:50][C][sgp30:252]: Icon: 'mdi:molecule-co2'
[22:52:50][C][sgp30:253]: TVOC sensor 'Workshop TVOC'
[22:52:50][C][sgp30:253]: Device Class: 'volatile_organic_compounds'
[22:52:50][C][sgp30:253]: State Class: 'measurement'
[22:52:50][C][sgp30:253]: Unit of Measurement: 'ppb'
[22:52:50][C][sgp30:253]: Accuracy Decimals: 1
[22:52:50][C][sgp30:253]: Icon: 'mdi:radiator'
[22:52:50][C][sgp30:256]: Store baseline: YES
[22:52:50][C][sgp30:262]: Compensation: No source configured
[22:52:50][C][captive_portal:088]: Captive Portal:
[22:52:50][C][mdns:108]: mDNS:
[22:52:51][C][mdns:109]: Hostname: esp32
[22:52:51][C][ota:093]: Over-The-Air Updates:
[22:52:51][C][ota:094]: Address: esp32.local:3232
[22:52:51][C][ota:097]: Using Password.
[22:52:51][C][api:138]: API Server:
[22:52:51][C][api:139]: Address: esp32.local:6053
[22:52:51][C][api:141]: Using noise encryption: YES