IKEA's VINDRIKTNING is an air quality sensor that samples particles in the air and illuminates an LED to report its findings. The module also writes the sample data to a UART tx port, making it possible to publish the sample and make it available to a home automation system.

Following Hypfer's work in receving and publishing the sample data with an Arduino project, ESPHome contributors soon built a PM1006 Particulate Matter Sensor component to simplify the process of setting up a UART sensor for ESPHome.

To follow the steps below, you will need:

Hardware steps

  1. Disassemble the VINDRIKTNING and remove the main board.
  2. Tin the REST, GND and +5V pads.
  3. Cut, strip and tin some jumper wires. Solder them in place.
  4. Attach header blocks to the ESP board, if required. This walkthrough uses D2, GND and 5V pins.

ESPHome configuration

Use the ESPHome dashboard to configure the ESP. Remember to keep secrets in a separate configuration file. Ensure the static_ip is an available and assignable IP address.

First, install a basic ESPHome

esphome:
  name: air-quality-sensor

# Depends on the ESP and breakout board model.
esp8266:
  board: d1_mini

logger:

api:
  encryption:
    key: !secret air_quality_sensor_api_encryption_key

ota:
  password: !secret air_quality_sensor_ota_password

uart:
  # Software uart on this port isn't realtime, but the baud rate is slow.
  rx_pin: D2
  baud_rate: 9600

sensor:
  - platform: pm1006
    pm_2_5:
      # The name of this sensor will show in Home Assistant
      name: "Particulate Matter <2.5µm"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  # Skip searching for available networks first
  fast_connect: true
  # Connecting is faster and more reliable if you don't wait for DHCP.
  # Just make sure the router is also configured to reserve this address for your device.
  manual_ip: 
    static_ip: !secret air_quality_sensor_wifi_manual_ip_static_ip
    gateway: !secret air_quality_sensor_wifi_manual_ip_gateway
    subnet: !secret air_quality_sensor_wifi_manual_ip_subnet

Log in to your router and reserve the static_ip IP address. Keep note of that address and the api_encryption_key.

Assembly steps

  1. Secure the main board in the VINDRIKTNING housing and reconnect wires to the sensor and fan.
  2. Hot glue the ESP breakout board inside the VINDRIKTNING housing in a place that minimises obstruction of the sensor. Ensure the back panel still attaches properly.
  3. Connect the wires (REST to D2, GND to GND, and +5V to 5V).

Adding it to Home Assistant

In Home Assistant, add a new ESPHome integration. Follow the workflow steps, supplying the host IP address and encryption key from before. Once added, the device should appear with a single sensor: "Particulate Matter <2.5µm".

In the screenshot above, I added the sensor to a statistics-graph Lovelace card. Next step is to use it for a Node-RED automation; such as dispatching a notification if the particulate matter starts to average above 30µg/m³.


If you have any feedback or questions related to this article, please reply to my post on Mastodon. This article is part of the Home automation set.