IKEA Vindriktning Air Quality Sensor

Wow, thanks for that reply. It is what I joined the Home Assistant community for.

I recently successfully added a Tapo service from HACS and go my old bulbs working in HA. The flexibility of open source is unbeatable.

thanks again

I actually can only power the whole setup through the wemos. If I power through the USB-C, the wemos is on (I can reset it) but it never connects to the internet.

I would guess, that there must be some problem with the power supply. The WEMOS must go into an endless loop as crashing from a brownout.

Hello,
i ended up with three Vindriktning for three key areas of my home.
I’m setting them up so now i have all of them side by side in the very same place.
Sensor one: 52 μg/m3
Sensor two: 24 μg/m3
Sensor three: 38 μg/m3
Is this the level of consistency i can expect? :slight_smile:
As you see even not looking to numbers, one of them is Green and two are Orange…

I’ve built 2 of these and plan on 3 more when the materials get here… this is what I measure in my house…

As you can see the living room says unknown but I believe that to be a bad sensor… I’ll replace it when the new ones arrive…
I built mine off of this video:

Ikea Air Sensor

This guy is very helpful and this is an easy make! The bottom one shows when it’s measuring the air… every 7 to 10 seconds…

1 Like

I’ve built my version with LáskaKit board and MH-Z19B CO2 sensor.

PM1006 updates

I am, however, not sure about frequency of fan vs. frequency of PM1006 updates. IIUC, the ideal operation would be:

  1. periodically start fan
  2. after some time, start measurement by PM1006 (manually requested)
  3. when the measurement is done or when timed out, stop fan

I am however not sure how to request update from PM1006 sensor. Is there some other way than manually sending the request packet? @TataGEEK seems to use sensor.template.publish, but it is probably not intended to be used with non-templated sensors, doesn’t compile for me and maybe it has never done the trick.

Update frequency

@TataGEEK seems to update PM1006 every two minutes, but fan runs every minute. I see two potential issues with that:

  1. Why does the fan run so often? IIUC, fan isn’t needed for CO2 sensor, just for the PM1006.
  2. It doesn’t seem to handle alignment of measurement and fan. With perfect timing, it starts the fan at the same moment as PM1006 measurement, which isn’t the desired timing. However, when timings aren’t perfect, the alignment might vary over time.

My config

I’ve started with @TataGEEK’s YAML, but adjusted it for my needs, most notably:

  • BLE proxy caching
  • Switched from Arduino framework to ESP-IDF in order to get better support of BLE proxy.
  • Adjusted light driver to be compatible with ESP-IDF.
  • Periodic fan running can be disabled from HA. (It is done automatically based on sleep mode input_boolean.) When disabled, it can be controlled manually. (Well, technically fan can be controlled manually even when periodic fan running is enabled, but it would be overridden soon…)
  • Added basic support for other features (buzzer, IR sensor), even though I don’t use it yet.
  • Removed parts I don’t need.
1 Like

I’ve updated the YAML. Now, it synces PM1006 readings with fan. When reading is done, fan is turned off. This assumes that no other sensor needs fan. CO2 sensor doesn’t need fan and it seems to be reliable without it.

Also, when the reading takes too much time, it disables the fan by timeout, so the fan doesn’t go crazy when pm1006 dies. Moreover, when a reading from pm1006 is done and fan isn’t running, this fact is recorded.

The code is in the updated gist.

I am, however, a bit unsure how long to wait between turning fan on and requesting a value from pm1006 sensor. Currently, I wait 3s. Is it enough? Although the pm1006 datasheet promises a response within 8s, it is usually instant, which means the fan usually runs just for 3s. (I can see it in Home Assistant history.) In the original Vindrikting, the fan definitely runs for much longer time. Maybe they have a good reason to do so, maybe they don’t turn the fan off just after reading.

I hoped to have solved my issues with suddenly high readings from the pm1006 sensor by increasing fan time before measurement from 3s to 10s. But I am not sure, I still sometimes get somewhat suspicious readings. I made the time configurable, so I can experiment with that further without rebuilding the SW.

I’ve also implemented color status:

  • Off when night mode (input_boolean from home assistant)
  • Top LED: CO2 status: 400–1000 green to yellow, 1001–1500 orange to red. The sudden change from yellow to orange is intended as recommendation of ventilation.
  • Middle LED: usually black. It can advise closing windows by blinking green/yellow (low CO2 + outside hotter than inside + it’s hot enough inside). Green when CO2 < 420 ppm (i.e., you can close window(s)), red when CO2 > 1500 ppm (i.e., you really should ventilate). It is orange when some temporary settings apply to curtains.
  • Bottom LED: PM2.5 status; some smoothing might be useful

Brightness is controlled externally from Home Assistant by Adaptive Lighting component.

Color adjustment was a bit painful, especially orange and it’s transition to red. This is the reason why I implemented fake CO2 and settings of the green component of orange.

However, I sometimes experience an issue with the top LED. It sometimes temporarily gets blue for no reason. Timings seem to help to some degree, but I don’t have a final solution yet.

I’ve literally had to set mine outside to ‘reset’ it… so it could get fresh air… it seems to have fixed it for me.

Here’s my latest ‘batch’… to cover the rest of my house I’d need to build 2 more of these but for now I’m just going with what I have… It would be safe to assume the air in my house isn’t too bad LOL

I would love to build what you have but I cannot get the parts you have…

I know that personally I’ve had to put the entire sensor outdoors for a bit to ‘clear’ it out and since I’ve done that you can see the readings in the latest picture I posted.

Thank you for doing that… I’ve built 5 and I love the results.

2 Likes

Not 100% related to IKEA but I digress…

I had the Vindriktning in my garage shop, but it’s not intrusive enough :slight_smile: I considered modifying it as seen here but went a different direction.

I used

I have a nice automation setup based on PM thresholds defined by the US AQI. It controls the bulb in my garage door opener (it’s always on when I am working in the garage).

I’ll play with it over the coming weeks to tune the thresholds. Right now there’s 5 different colors, I might just keep it simple to white (all good), yellow and red similar to Vindriktning.

1 Like

Hello,

has anybody seen such behaviour on their IKEA PM1006 sensor? It grows and then drops periodically.
Is there a way to deal with this?

honestly no, mine is quite stable, you have a very strange monotonic graph

Please check my timescale - it’s for 1 year. Could you post your readings for a longer period? Thanks.

Need to clean the plastic and inside some times to avoid this.
With a gaz (air) ‘bomb’ inside and slow press.
Immediately it drops to a more ‘normal’ value.

1 Like

@tikismoke your graph is similar to mine. The strange part is that I am not blowing it with air, and the readings still drop periodically (every 3-4 months) - it seems like it “resets” itself. Thanks for your insight anyway.

1 Like

1 Like