IKEA Vindriktning Air Quality Sensor

I cannot get any results for pm1006. Can someone help me? I am using D1 Mini ESP32.

logger:
  level: VERY_VERBOSE

uart:
  - rx_pin: GPIO23
    baud_rate: 9600
    id: uart_air

sensor:
  - platform: pm1006
    uart_id: uart_air
    id: aq_sensor
    pm_2_5:
      name: "Particulate Matter 2.5µm Concentration"

Because I turned on logger, I see the following for this sensor:

[06:45:09][C][uart.arduino_esp32:137]: UART Bus 1:
[06:45:09][C][uart.arduino_esp32:139]:   RX Pin: GPIO23
[06:45:09][C][uart.arduino_esp32:141]:   RX Buffer Size: 256
[06:45:09][C][uart.arduino_esp32:143]:   Baud Rate: 9600 baud
[06:45:09][C][uart.arduino_esp32:144]:   Data Bits: 8
[06:45:09][C][uart.arduino_esp32:145]:   Parity: NONE
[06:45:09][C][uart.arduino_esp32:146]:   Stop bits: 1
[06:45:09][C][pm1006:017]: PM1006:
[06:45:09][C][pm1006:018]:   PM2.5 'Particulate Matter 2.5µm Concentration'
[06:45:09][C][pm1006:018]:     Device Class: 'pm25'
[06:45:09][C][pm1006:018]:     State Class: 'measurement'
[06:45:09][C][pm1006:018]:     Unit of Measurement: 'µg/m³'
[06:45:09][C][pm1006:018]:     Accuracy Decimals: 0
[06:45:09][C][pm1006:018]:     Icon: 'mdi:blur'
[06:45:09][C][pm1006:019]:   Update Interval: never
[06:45:09][C][mdns:115]: mDNS:
[06:45:09][C][mdns:116]:   Hostname: ikea-aq-fm-sensor
[06:45:09][V][mdns:117]:   Services:
[06:45:09][V][mdns:119]:   - _esphomelib, _tcp, 6053
[06:45:09][V][mdns:121]:     TXT: friendly_name = IKEA AQ FM Sensor
[06:45:09][V][mdns:121]:     TXT: version = 2023.12.9
[06:45:09][V][mdns:121]:     TXT: mac = a0a3b3910810
[06:45:09][V][mdns:121]:     TXT: platform = ESP32
[06:45:09][V][mdns:121]:     TXT: board = esp32dev
[06:45:09][V][mdns:121]:     TXT: network = wifi
[06:45:09][C][ota:097]: Over-The-Air Updates:
[06:45:09][C][ota:098]:   Address: ikea-aq-fm-sensor.local:3232
[06:45:09][C][api:139]: API Server:
[06:45:09][C][api:140]:   Address: ikea-aq-fm-sensor.local:6053
[06:45:09][C][api:144]:   Using noise encryption: NO
[06:45:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=4294947518 (now=40222)
[06:45:26][VV][api.service:558]: on_ping_request: PingRequest {}
[06:45:26][VV][api.service:043]: send_ping_response: PingResponse {}
[06:45:49][VV][api.service:558]: on_ping_request: PingRequest {}
[06:45:49][VV][api.service:043]: send_ping_response: PingResponse {}
[06:46:07][VV][api.service:558]: on_ping_request: PingRequest {}
[06:46:07][VV][api.service:043]: send_ping_response: PingResponse {}
[06:46:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=40222 (now=100226)
[06:46:46][VV][api.service:558]: on_ping_request: PingRequest {}
[06:46:46][VV][api.service:043]: send_ping_response: PingResponse {}
[06:46:49][VV][api.connection:132]: Sending keepalive PING...
[06:46:49][VV][api.service:037]: send_ping_request: PingRequest {}
[06:46:49][VV][api.service:567]: on_ping_response: PingResponse {}
[06:47:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=100222 (now=160222)
[06:47:26][VV][api.service:558]: on_ping_request: PingRequest {}
[06:47:26][VV][api.service:043]: send_ping_response: PingResponse {}
[06:47:49][VV][api.connection:132]: Sending keepalive PING...
[06:47:49][VV][api.service:037]: send_ping_request: PingRequest {}
[06:47:49][VV][api.service:558]: on_ping_request: PingRequest {}
[06:47:49][VV][api.service:043]: send_ping_response: PingResponse {}
[06:47:49][VV][api.service:567]: on_ping_response: PingResponse {}
[06:48:06][VV][api.service:558]: on_ping_request: PingRequest {}
[06:48:06][VV][api.service:043]: send_ping_response: PingResponse {}
[06:48:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=160222 (now=220222)
[06:48:47][VV][api.service:558]: on_ping_request: PingRequest {}
[06:48:47][VV][api.service:043]: send_ping_response: PingResponse {}
[06:48:49][VV][api.connection:132]: Sending keepalive PING...
[06:48:49][VV][api.service:037]: send_ping_request: PingRequest {}
[06:48:49][VV][api.service:567]: on_ping_response: PingResponse {}
[06:49:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=220222 (now=280222)
[06:49:26][VV][api.service:558]: on_ping_request: PingRequest {}
[06:49:26][VV][api.service:043]: send_ping_response: PingResponse {}

And how did you connect the PM1006?

Red → 5V
Black → Ground
Blue → GPIO23
image

Picture please!


image

All people here talking about PM 2.5 ug/m3. What about PM1.0 and PM10? Clearly PM1006K sensor supports PM1.0 and PM10 also.

edit: okay I get it, PM1006 vs PM1006K. Which one the IKEA has?

edit2: found the answer, PM1.0 & PM10 are “random numbers”.

Thank you for your suggestion, but I do not understand what you want me to do.

I have two IKEA devices and I have two D1 Mini ESP32 boards. I tested the second IKEA device with the second D1 Mini ESP32, and I have exactly the same output.

There is your mistake, I think. No - required there.

Look at the documentation, no - :

But if not, try to omit the id/uart_id parts.

Thank you for your reply. Almost all examples that we have in this long discussion, show only rx pin. The documentation also says it is optional. It should work with rx pin only.

Thank you for your suggestion. I tried it and it did not help. After I updated firmware, I see the following. Does it give any useful information?

[13:12:12][C][logger:440]:   Level: VERY_VERBOSE
[13:12:12][C][logger:441]:   Log Baud Rate: 115200
[13:12:12][C][logger:443]:   Hardware UART: UART0
[13:12:12][C][uart.arduino_esp32:137]: UART Bus 1:
[13:12:12][C][uart.arduino_esp32:139]:   RX Pin: GPIO23
[13:12:12][C][uart.arduino_esp32:141]:   RX Buffer Size: 256
[13:12:12][C][uart.arduino_esp32:143]:   Baud Rate: 9600 baud
[13:12:12][C][uart.arduino_esp32:144]:   Data Bits: 8
[13:12:12][C][uart.arduino_esp32:145]:   Parity: NONE
[13:12:12][C][uart.arduino_esp32:146]:   Stop bits: 1
[13:12:12][C][pm1006:017]: PM1006:
[13:12:12][C][pm1006:018]:   PM2.5 'Particulate Matter 2.5µm Concentration'
[13:12:12][C][pm1006:018]:     Device Class: 'pm25'
[13:12:12][C][pm1006:018]:     State Class: 'measurement'
[13:12:12][C][pm1006:018]:     Unit of Measurement: 'µg/m³'
[13:12:12][C][pm1006:018]:     Accuracy Decimals: 0
[13:12:12][C][pm1006:018]:     Icon: 'mdi:blur'
[13:12:12][C][pm1006:019]:   Update Interval: never
[13:12:12][C][mdns:115]: mDNS:
[13:12:12][C][mdns:116]:   Hostname: ikea-aq-lr-sensor
[13:12:12][V][mdns:117]:   Services:
[13:12:12][V][mdns:119]:   - _esphomelib, _tcp, 6053
[13:12:12][V][mdns:121]:     TXT: friendly_name = IKEA AQ LR Sensor
[13:12:12][V][mdns:121]:     TXT: version = 2023.12.9
[13:12:12][V][mdns:121]:     TXT: mac = 7c87cecb454c
[13:12:12][V][mdns:121]:     TXT: platform = ESP32
[13:12:12][V][mdns:121]:     TXT: board = esp32dev
[13:12:12][V][mdns:121]:     TXT: network = wifi
[13:12:12][C][ota:097]: Over-The-Air Updates:
[13:12:12][C][ota:098]:   Address: ikea-aq-lr-sensor.local:3232
[13:12:12][C][api:139]: API Server:
[13:12:12][C][api:140]:   Address: ikea-aq-lr-sensor.local:6053
[13:12:12][C][api:144]:   Using noise encryption: NO
[13:12:15][D][api:102]: Accepted 192.168.1.12
[13:12:15][VV][api.service:522]: on_hello_request: HelloRequest {
  client_info: 'Home Assistant 2024.1.6'
  api_version_major: 1
  api_version_minor: 9
}
[13:12:15][V][api.connection:1103]: Hello from client: 'Home Assistant 2024.1.6' | 192.168.1.12 | API Version 1.9
[13:12:15][VV][api.service:013]: send_hello_response: HelloResponse {
  api_version_major: 1
  api_version_minor: 9
  server_info: 'ikea-aq-lr-sensor (esphome v2023.12.9)'
  name: 'ikea-aq-lr-sensor'
}
[13:12:15][VV][api.service:531]: on_connect_request: ConnectRequest {
  password: ''
}
[13:12:15][D][api.connection:1121]: Home Assistant 2024.1.6 (192.168.1.12): Connected successfully
[13:12:15][VV][api.service:019]: send_connect_response: ConnectResponse {
  invalid_password: NO
}
[13:12:15][VV][api.service:576]: on_device_info_request: DeviceInfoRequest {}
[13:12:15][VV][api.service:049]: send_device_info_response: DeviceInfoResponse {
  uses_password: NO
  name: 'ikea-aq-lr-sensor'
  mac_address: '7C:87:CE:CB:45:4C'
  esphome_version: '2023.12.9'
  compilation_time: 'Feb  6 2024, 13:11:31'
  model: 'esp32dev'
  has_deep_sleep: NO
  project_name: ''
  project_version: ''
  webserver_port: 0
  legacy_bluetooth_proxy_version: 0
  bluetooth_proxy_feature_flags: 0
  manufacturer: 'Espressif'
  friendly_name: 'IKEA AQ LR Sensor'
  voice_assistant_version: 0
  sugges
[13:12:15][VV][api.service:585]: on_list_entities_request: ListEntitiesRequest {}
[13:12:15][VV][api.service:132]: send_list_entities_sensor_response: ListEntitiesSensorResponse {
  object_id: 'particulate_matter_2_5_m_concentration'
  key: 3776296120
  name: 'Particulate Matter 2.5µm Concentration'
  unique_id: 'ikea-aq-lr-sensorsensorparticulate_matter_2_5_m_concentration'
  icon: 'mdi:blur'
  unit_of_measurement: 'µg/m³'
  accuracy_decimals: 0
  force_update: NO
  device_class: 'pm25'
  state_class: STATE_CLASS_MEASUREMENT
  legacy_last_reset_type: LAST_RESET_NONE
  disabled_by_defau
[13:12:15][VV][api.service:055]: send_list_entities_done_response: ListEntitiesDoneResponse {}
[13:12:15][VV][api.service:594]: on_subscribe_states_request: SubscribeStatesRequest {}
[13:12:15][VV][api.service:656]: on_subscribe_homeassistant_services_request: SubscribeHomeassistantServicesRequest {}
[13:12:15][VV][api.service:140]: send_sensor_state_response: SensorStateResponse {
  key: 3776296120
  state: nan
  missing_state: YES
}
[13:12:15][VV][api.service:683]: on_subscribe_home_assistant_states_request: SubscribeHomeAssistantStatesRequest {}
[13:12:44][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=4294948591 (now=41301)
[13:12:55][VV][api.service:558]: on_ping_request: PingRequest {}
[13:12:55][VV][api.service:043]: send_ping_response: PingResponse {}
[13:13:11][VV][api.connection:132]: Sending keepalive PING...
[13:13:11][VV][api.service:037]: send_ping_request: PingRequest {}
[13:13:11][VV][api.service:567]: on_ping_response: PingResponse {}
[13:13:35][VV][api.service:558]: on_ping_request: PingRequest {}
[13:13:35][VV][api.service:043]: send_ping_response: PingResponse {}
[13:13:44][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=41295 (now=101297)

Yes, the log should look like this:

[20:51:20][D][pm1006:091]: Got PM2.5 Concentration: 42 µg/m³
[20:51:20][D][sensor:093]: 'XXXXXX Air Quality': Sending state 42.00000 µg/m³ with 0 decimals of accuracy

Do the colors of the LED changing on your device when you spray something to it, or push smoke on it?

There were cases when the sensor was faulty and was not recording any changes.

By the way, is the sensor plugged in to the device??? On your pictures it is not connected at all!

I have two IKEA devices with the same behavior. Do you think both of them broken? Unfortunately, nobody smokes here, so I cannot test it. Is there any other way to test it> The device is plugged in.

The sensor is not plugged in!

If the sensor is not connected to the board, do not expect any data coming in through the UART RX.
The original board does the pinging to the sensors, hence no need to set up the UART TX. The ESP just piggybacking the data transmitted from the sensor to the IKEA board, which output on that terminal.

Thank you very much. I did not know that the fan had to be plugged in. I spent hours trying to figure out the problem. Everything works now.

Thank you!!!

No, the fan doesn’t have to be plugged in (2 pin connector), the sensor with that 4 pin connector has to be plugged in!

Really nice project - thank you for sharing.
I want to rebuild this and want to add a CO2 sensor. Is there a way that the LEDs show the CO2 values? Or is this everytime the 2.5PM values? I don´t want to add a additional LEDs in there.

Some people modified the LEDs (cut off some lines on the PCB) to be able to control them. Otherwise the LEDs are controlled by the IKEA board. Look at the whole topic and search for LED for details on the modifications.

1 Like

i did exactly this but ended up with a slightly different solution to others i have seen. instead of tapping into the existing leds to control them i removed them from the board and stuck a short strip (3 leds) of addressable leds there instead. the spacing worked to be about the same as the old ones and now i have 3 leds that can be all 3 colours so i have one each for 2.5PM, TVOC and eCO2.

1 Like

Some update about this project

3 Likes

That’s my tutorial - Thank you for sharing it. :pray:

1 Like