PM1006 Particulate Matter Sensor¶
pm1006 sensor platform allows you to use Cubic PM1006 particulate matter sensors (datasheet)
As the communication with the PM1006 is done using UART, you need to have an UART bus in your configuration with the
rx_pin connected to the TX pin of the PM1006.
The baud rate needs to be set to 9600.
# Example configuration entry uart: rx_pin: D2 baud_rate: 9600 sensor: - platform: pm1006 pm_2_5: name: "Particulate Matter 2.5µm Concentration"
In common usage, with the IKEA VINDRIKTNING still controlling the pm1006 sensor, there is no update interval, and this implementation will passively pick up whatever the VINDRIKTNING MCU has requested from the sensor.
The implementation was inspired by https://github.com/Hypfer/esp8266-vindriktning-particle-sensor; you can also see the pinout there. However, we recommend mounting your ESP below the fan (which blows out the front) so you do not obstruct the airflow. This discussion thread on the HA forum has several examples of how people have connected their ESP device to the IKEA sensor.
pm_2_5 (Optional): Use the concentration of particulates of size less than 2.5µm in µg per cubic meter. All options from Sensor.
update_interval (Optional, Time): If you need to actively request measurements to the sensor, set this to some sensible interval. The IKEA VINDRIKTNING does measurements every 20 seconds. Defaults to never.
Using this component standalone¶
If you acquired a pm1006 outside of an IKEA VINDRIKTNING, or if you removed the IKEA MCU or replaced the whole PCB, you will need to actively request measurements. In that case, you need a TX pin, and you need to set an update interval.
# Example configuration entry uart: rx_pin: D2 tx_pin: D1 baud_rate: 9600 sensor: - platform: pm1006 pm_2_5: name: "Particulate Matter 2.5µm Concentration" update_interval: 20s
If you run the PM1006 (2.5µm) or PM1006K (1, 2.5, 10µm) independent from the original MCU you need to send a serial command in the first 5 seconds after power is applied to the sensor. Otherwise the sensor will switch to PWM mode and does not repond to UART requests. A possibility to do this in ESPhome is to use an automation. Source
# Example configuration entry on_boot: priority: 240 then: - uart.write: id: ikea #id of the uart bus used for the PM1006 data: [0x11, 0x02, 0x0B, 0x01, 0xE1]