Skip to main content
  1. Blog/

Setting Up Home Assistant with Zigbee2MQTT for Air Quality Monitoring

·640 words·4 mins

This guide walks you through setting up a complete Home Assistant environment with Zigbee2MQTT to monitor air quality using IKEA’s VINDSTYRKA sensor and Sonoff ZigBee 3.0 dongle.

Why This Setup?
#

I am curious about sensors that measure the living conditions in the home.

After struggling with VirtualBox’s nightmare USB passthrough issues, I switched to VMware Workstation for a much smoother experience. This setup provides reliable air quality monitoring with proper Zigbee integration.

Hardware Requirements
#

Air Quality Sensor
#

  • IKEA VINDSTYRKA Smart air quality sensor
    • Measures: PM2.5 particles, temperature, humidity, and tVOC (Total Volatile Organic Compounds)
    • Displays PM2.5 levels, humidity, temperature, and TVOC on an integrated display
    • Zigbee enabled device that works with Home Assistant
    • Price: Around 39 euros.

Zigbee Coordinator
#

  • Sonoff ZigBee 3.0 USB Dongle Plus (ZBDongle-P or ZBDongle-E) I ended up choosing ZBDongle-E and contrary to what is written onine, it works perfectly.
    • Preflashed with coordinator firmware, ready to work out of the box
    • Built on TI CC2652P chipset with +20dBm transmission power for extended range
    • Aluminum housing helps reduce electromagnetic interference
    • Supports up to 50 direct children devices and 200 total with routers

Software Stack
#

Virtualization Platform
#

  • VMware Workstation Pro (recommended over VirtualBox)
  • Linux Host OS (any distribution)
  • Home Assistant VM with allocated resources:
    • 4 CPU cores
    • 4GB RAM
    • Adequate storage for logs and database.
    • I am surprised about how snappy this is.
    • Add USB device passthrough for Sonoff dongle
    • Important: Use a USB extension cable to minimize interference

Home Assistant Configuration
#

  • Home Assistant OS (running in VM)
  • Zigbee2MQTT integration (not the builtin ZHA). Very important: Remove the ZHA if it comes preactivated.
  • MQTT Broker (Mosquitto)

Install VMware Workstation Pro
#

Follow your distribution’s specific installation guide for VMware Workstation Pro. This provides much better USB passthrough than VirtualBox. I find the whole VMware website quite hard to parse after Broadcom acquistion. But it still is quite good software if you manage to download it.

Installation Steps
#

Step 1: Install Home Assistant OS
#

  1. Download the latest Home Assistant OS image
  2. Create VM with recommended specifications
  3. Boot from the ISO and complete installation
  4. Access Home Assistant at http://VM_IP:8123

Step 2: Install MQTT Broker
#

Before installing Zigbee2MQTT, you need an MQTT broker:

  1. Go to SettingsAdd-onsAdd-on Store
  2. Search for “Mosquitto broker”
  3. Install and configure with basic settings
  4. Start the broker

Step 3: Install Zigbee2MQTT Add-on
#

Follow these steps to install Zigbee2MQTT as a Home Assistant add-on:

  1. Go to SettingsAdd-onsAdd-on Store
  2. Click the three dots → Repositories
  3. Add repository: https://github.com/zigbee2mqtt/hassio-zigbee2mqtt
  4. Install Zigbee2MQTT (not the Edge version)

Step 4: Configure Zigbee2MQTT
#

Find USB Port
#

To find the USB port where the Zigbee dongle is installed:

  1. Go to SettingsHardwareAll Hardware
  2. Search for “sonoff”
  3. Note the port (typically /dev/ttyUSB0 or /dev/ttyACM0)

Configure Add-on
#

  1. Go to SettingsAdd-onsZigbee2MQTT
  2. Click Configuration tab
  3. Add the USB port path:
serial:
  port: /dev/ttyUSB0
  1. Click Save and Start the add-on

Step 5: Add IKEA VINDSTYRKA Sensor
#

  1. Enable Pairing Mode

    • In Zigbee2MQTT interface, enable “Permit Join”
    • Put VINDSTYRKA in pairing mode (follow device manual)
  2. Device Discovery

    • The sensor should appear in Zigbee2MQTT devices list
    • New devices will automatically appear in the Home Assistant MQTT integration
  3. Configure in Home Assistant

    • Go to SettingsIntegrationsMQTT
    • The VINDSTYRKA should appear as a discovered device
    • Configure friendly names and areas

Getting VOC Values from VINDSTYRKA
#

The VINDSTYRKA sensor provides tVOC (Total Volatile Organic Compounds) readings that can help monitor indoor air quality. The sensor monitors harmful particles (PM2.5), temperature, relative humidity and total Volatile Organic Compounds (tVOC) and displays trends with directional arrows.

Useful Resources
#