Modifying IKEA Vindfriktning - works only when powered via ESP board

For the first time I am trying to actually define a sensor on an ESP board so please pardon my rookie questions.

I am trying to hook up the IKEA Vindriktning air quality sensor, which measures the concentration of PM2.5 particles, to an AZDelivery ESP32 D1 Mini NodeMCU board so I can have the readings available in Home Assistant via ESPHome.

When I power it via the USB-C port on the IKEA board, the ESP board wouldn’t come online, which I can confirm by attempting to ping it on the network and by seeing its status to be offline in the ESPHome Builder. The ESP board LED is red, however. If I power it via the micro USB port on the ESP board, it connects, comes online just fine and provides the sensor readings.

This is my ESPHome configuration for the board:

esphome:
  name: vindriktning-at-office
  friendly_name: Vindriktning u radnoj
  min_version: 2024.11.0
  name_add_mac_suffix: false
packages:
  esphome.bluetooth-proxy: github://esphome/firmware/bluetooth-proxy/esp32-generic.yaml@main
bluetooth_proxy:

esp32:
  board: wemos_d1_mini32

# Enable logging
logger:

# Enable Home Assistant API
api:

# Allow Over-The-Air updates
ota:
- platform: esphome

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Ikea Vindriktning PM2.5 sensor
uart:
  rx_pin: GPIO21
  baud_rate: 9600

sensor:
  - platform: pm1006
    pm_2_5:
      name: "Ikea Vindriktning PM25 u radnoj"
      filters:
        - sliding_window_moving_average:
            window_size: 10
            send_every: 10      

I am attaching a photo of the wiring.

These are the logs that I can get when the device is online:


INFO ESPHome 2024.12.2
INFO Reading configuration /config/esphome/esphome-web-67aa14.yaml...
WARNING Found and merged multiple configurations for ota platform esphome port(s) [3232]
INFO Starting log output from vindriktning-at-office.local using esphome API
WARNING Can't connect to ESPHome API for vindriktning-at-office.local: Error resolving IP address: [Errno -5] No address associated with hostname (APIConnectionError)
INFO Trying to connect to vindriktning-at-office.local in the background
INFO Successfully connected to vindriktning-at-office @ 192.168.1.67 in 0.020s
INFO Successful handshake with vindriktning-at-office @ 192.168.1.67 in 0.087s
[15:17:47][I][app:100]: ESPHome version 2024.12.2 compiled on Jan 14 2025, 08:33:04
[15:17:47][C][wifi:600]: WiFi:
[15:17:47][C][wifi:428]:   Local MAC: 48:E7:29:67:AA:14
[15:17:47][C][wifi:433]:   SSID: 'office-wifi'[redacted]
[15:17:47][C][wifi:436]:   IP Address: 192.168.1.67
[15:17:47][C][wifi:439]:   BSSID: 12:34:56:78:9A:BC[redacted]
[15:17:47][C][wifi:441]:   Hostname: 'vindriktning-at-office'
[15:17:47][C][wifi:443]:   Signal strength: -44 dB ▂▄▆█
[15:17:47][C][wifi:447]:   Channel: 1
[15:17:47][C][wifi:448]:   Subnet: 255.255.255.0
[15:17:47][C][wifi:449]:   Gateway: 192.168.1.1
[15:17:47][C][wifi:450]:   DNS1: 192.168.1.1
[15:17:47][C][wifi:451]:   DNS2: 0.0.0.0
[15:17:47][C][logger:185]: Logger:
[15:17:47][C][logger:186]:   Level: DEBUG
[15:17:47][C][logger:188]:   Log Baud Rate: 115200
[15:17:47][C][logger:189]:   Hardware UART: UART0
[15:17:47][C][uart.idf:159]: UART Bus 1:
[15:17:47][C][uart.idf:161]:   RX Pin: GPIO21
[15:17:47][C][uart.idf:163]:   RX Buffer Size: 256
[15:17:47][C][uart.idf:165]:   Baud Rate: 9600 baud
[15:17:47][C][bluetooth_proxy:091]: Bluetooth Proxy:
[15:17:47][C][bluetooth_proxy:092]:   Active: YES
[15:17:47][C][bluetooth_proxy:093]:   Connections: 3
[15:17:47][C][factory_reset.button:011]: Factory Reset Button 'Factory reset'
[15:17:47][C][factory_reset.button:011]:   Icon: 'mdi:restart-alert'
[15:17:47][C][pm1006:017]: PM1006:
[15:17:47][C][pm1006:018]:   PM2.5 'Ikea Vindriktning PM25 u radnoj'
[15:17:47][C][pm1006:018]:     Device Class: 'pm25'
[15:17:47][C][pm1006:018]:     State Class: 'measurement'
[15:17:47][C][pm1006:018]:     Unit of Measurement: 'µg/m³'
[15:17:47][C][pm1006:018]:     Accuracy Decimals: 0
[15:17:47][C][pm1006:018]:     Icon: 'mdi:blur'
[15:17:47][C][pm1006:019]:   Update Interval: never
[15:17:47][C][mdns:116]: mDNS:
[15:17:47][C][mdns:117]:   Hostname: vindriktning-at-office
[15:17:47][C][esphome.ota:073]: Over-The-Air updates:
[15:17:47][C][esphome.ota:074]:   Address: vindriktning-at-office.local:3232
[15:17:47][C][esphome.ota:075]:   Version: 2
[15:17:47][C][safe_mode:018]: Safe Mode:
[15:17:47][C][safe_mode:019]:   Boot considered successful after 60 seconds
[15:17:47][C][safe_mode:021]:   Invoke after 10 boot attempts
[15:17:47][C][safe_mode:022]:   Remain in safe mode for 300 seconds
[15:17:47][C][api:140]: API Server:
[15:17:47][C][api:141]:   Address: vindriktning-at-office.local:6053
[15:17:47][C][api:145]:   Using noise encryption: NO
[15:17:47][D][pm1006:091]: Got PM2.5 Concentration: 306 µg/m³
[15:17:49][D][pm1006:091]: Got PM2.5 Concentration: 305 µg/m³
[15:17:51][D][pm1006:091]: Got PM2.5 Concentration: 304 µg/m³
[15:17:53][D][pm1006:091]: Got PM2.5 Concentration: 303 µg/m³
[15:17:55][D][pm1006:091]: Got PM2.5 Concentration: 302 µg/m³
[15:17:57][D][pm1006:091]: Got PM2.5 Concentration: 301 µg/m³
[15:17:57][D][sensor:093]: 'Ikea Vindriktning PM25 u radnoj': Sending state 304.79999 µg/m³ with 0 decimals of accuracy
[15:17:59][D][pm1006:091]: Got PM2.5 Concentration: 301 µg/m³
[15:18:01][D][pm1006:091]: Got PM2.5 Concentration: 301 µg/m³
[15:18:03][D][pm1006:091]: Got PM2.5 Concentration: 300 µg/m³
[15:18:05][D][pm1006:091]: Got PM2.5 Concentration: 299 µg/m³
[15:18:07][D][pm1006:091]: Got PM2.5 Concentration: 298 µg/m³
[15:18:09][D][pm1006:091]: Got PM2.5 Concentration: 296 µg/m³
[15:18:19][D][pm1006:091]: Got PM2.5 Concentration: 291 µg/m³
[15:18:20][D][pm1006:091]: Got PM2.5 Concentration: 291 µg/m³
[15:18:22][D][pm1006:091]: Got PM2.5 Concentration: 290 µg/m³
[15:18:24][D][pm1006:091]: Got PM2.5 Concentration: 290 µg/m³
[15:18:24][D][sensor:093]: 'Ikea Vindriktning PM25 u radnoj': Sending state 295.70001 µg/m³ with 0 decimals of accuracy
[15:18:26][D][pm1006:091]: Got PM2.5 Concentration: 289 µg/m³
[15:18:28][D][pm1006:091]: Got PM2.5 Concentration: 288 µg/m³
[15:18:30][D][pm1006:091]: Got PM2.5 Concentration: 287 µg/m³
[15:18:34][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[15:18:34][D][esp32.preferences:114]: Saving 1 preferences to flash...
[15:18:34][D][esp32.preferences:142]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[15:18:49][D][pm1006:091]: Got PM2.5 Concentration: 284 µg/m³
[15:18:50][D][pm1006:091]: Got PM2.5 Concentration: 283 µg/m³
[15:18:52][D][pm1006:091]: Got PM2.5 Concentration: 283 µg/m³
[15:18:54][D][pm1006:091]: Got PM2.5 Concentration: 283 µg/m³
[15:18:56][D][pm1006:091]: Got PM2.5 Concentration: 283 µg/m³
[15:18:58][D][pm1006:091]: Got PM2.5 Concentration: 283 µg/m³
[15:19:00][D][pm1006:091]: Got PM2.5 Concentration: 283 µg/m³
[15:19:00][D][sensor:093]: 'Ikea Vindriktning PM25 u radnoj': Sending state 284.60001 µg/m³ with 0 decimals of accuracy
[15:19:19][D][pm1006:091]: Got PM2.5 Concentration: 283 µg/m³
[15:19:20][D][pm1006:091]: Got PM2.5 Concentration: 282 µg/m³
[15:19:22][D][pm1006:091]: Got PM2.5 Concentration: 282 µg/m³
[15:19:24][D][pm1006:091]: Got PM2.5 Concentration: 281 µg/m³
[15:19:26][D][pm1006:091]: Got PM2.5 Concentration: 281 µg/m³
[15:19:28][D][pm1006:091]: Got PM2.5 Concentration: 280 µg/m³
[15:19:30][D][pm1006:091]: Got PM2.5 Concentration: 280 µg/m³
[15:19:49][D][pm1006:091]: Got PM2.5 Concentration: 279 µg/m³
[15:19:50][D][pm1006:091]: Got PM2.5 Concentration: 279 µg/m³
[15:19:52][D][pm1006:091]: Got PM2.5 Concentration: 279 µg/m³
[15:19:52][D][sensor:093]: 'Ikea Vindriktning PM25 u radnoj': Sending state 280.60001 µg/m³ with 0 decimals of accuracy
[15:19:54][D][pm1006:091]: Got PM2.5 Concentration: 279 µg/m³
[15:19:56][D][pm1006:091]: Got PM2.5 Concentration: 279 µg/m³
[15:19:58][D][pm1006:091]: Got PM2.5 Concentration: 280 µg/m³
[15:20:00][D][pm1006:091]: Got PM2.5 Concentration: 280 µg/m³

What am I missing? Why cannot I just power it via the IKEA board?

Let me answer this myself: the board type in the configuration should be esp32dev, and not wemos_d1_mini32. That fixes it.

Same problem maybe my tutorial will help you GitHub - DzurisHome/ESPHome-IKEA-VINDRIKTNING: ESPHome IKEA VINDRIKTNING