• Stars
    star
    1,144
  • Rank 39,372 (Top 0.8 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created almost 3 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Wifi MQTT Data Logging via an esp8266 for the Ikea VINDRIKTNING PM2.5 air quality sensor

MQTT connectivity for the Ikea VINDRIKTNING

This repository contains an ESP8266 firmware, which adds MQTT to the Ikea VINDRIKTNING PM2.5 air quality sensor. The modification doesn't interfere with normal operation of the device in any way. The ESP8266 just adds another data sink beside the colored LEDs.

half_assembled

Home Assistant Autodiscovery is supported. Furthermore, the WifiManager library is used for on-the-fly configuration. Also, ArduinoOTA is used, so that firmware updates are possible even with a reassembled device.

As the ESP8266 is 5V-tolerant, this should there shouldn't be any issues, however I haven't had time to test this for longer periods of time. Therefore, if the ESP burns out after a while, just add a voltage divider or something.

Prerequisites

To extend your air quality sensor, you will need

  • An ESP8266 with a 5v voltage regulator (e.g. a Wemos D1 Mini)
  • Some short dupont cables
  • A soldering iron
  • A long PH0 Screwdriver (e.g. Wera 118022)

Fortunately, there is a lot of unused space in the enclosure, which is perfect for our ESP8266. Also, everything we need is accessible via easy to solder testpoints.

Hardware

To install the ESP8266, you need to unscrew the four visible screws in the back of the enclosure.

Then, there are also three screws holding the tiny PCB in place. These aren't necessary to remove since you can solder in-place, however personally, I'd recommend taking the board out of there since it will be easier to solder without fear of accidentally melting some plastic.

board

As you can see in this image, you'll need to solder wires to GND, 5V and the Testpoint that is connected to TX of the Particle Sensor.

Then just connect these Wires to GND, VIN (5V) and D2 (if you're using a Wemos D1 Mini).

Done.

Software

The firmware can be built and flashed using the Arduino IDE.

For this, you will need to add ESP8266 support to it by using the Boards Manager.

Furthermore, you will also need to install the following libraries using the Library Manager:

  • ArduinoOTA 1.0.3
  • ArduinoJSON 6.10.1
  • PubSubClient 2.8.0
  • WiFiManager 0.15.0

Just build, flash, and you're done.

When connecting everything up, you should see an open Wi-Fi Access Point to configure your Wi-Fi and MQTT credentials.

Low-Noise Mod

Note: The intent of this section is only to document that this is possible. I don't "recommend" doing this nor do I advise against it.

As you might've noticed, there's a fan in there, which is audible even multiple meters away.

For some reason, the Ikea uC firmware decides to toggle the fan on and off every minute or so causing the noise it makes to change and therefore it constantly stays noticeable.

Good thing is that the Fan does spin up fine with just 3.3V, which means that we can run it constantly from the voltage regulator of the D1 Mini.

At 3.3V its noise is barely noticeable from 50 cm away.

3.3v

Having the Fan not connected at all was also tried but proved to mess up all readings completely.

This is of course a more invasive modification than just adding Wi-Fi data logging. Though, given that it is just a €10 device, I'm fine with that.

To make soldering a bit easier, note that the whole outer metal part of the Micro USB connector of the D1 Mini is connected to GND.

Misc

The VINDRIKTNING consists of a custom(?) Cubic PM1006-like Sensor + another uC that does all that LED stuff, which talk via UART. The uC simply regularly polls the sensor and displays the results.

Therefore, to add Wi-Fi connectivity, we just need to also listen to the TX of the Sensor and decode those messages. The Ikea uC will do all that polling stuff for us.

As reported in #16, the transitions from Green to Yellow and Yellow to Red in the Ikea firmware are at around 30 and 100μg/m³.

ToDo

Reconfiguration of a provisioned device without having to OTAU a firmware that clears the settings would be nice.

References and sources

More Repositories

1

Valetudo

Cloud replacement for vacuum robots enabling local-only operation
JavaScript
5,960
star
2

ICantBelieveItsNotValetudo

A Valetudo companion service which renders maps to pngs
JavaScript
130
star
3

Cybele

BLE to MQTT Gateway for Smarthome and IoT Devices
JavaScript
110
star
4

valetudo-dreameadapter

97
star
5

deye-microinverter-cloud-free

Documentation and tooling to use Deye microinverters without the solarman cloud
JavaScript
97
star
6

esp8266-midea-dehumidifier

Cloud-free wifi dehumidification
C++
90
star
7

hass-scene_presets

Hue-like scene presets for lights in home assistant
TypeScript
59
star
8

esp8266-deerma-humidifier

Cloud-free wifi humidification
C++
43
star
9

SilenTeams

Turn off MS Teams Taskbar Notifications by employing malware techniques
C++
41
star
10

valetudo-helper-miioota

Install rooted firmwares via miio local OTA
JavaScript
37
star
11

glance-clock

Glance Clock BLE protocol reverse-engineered
36
star
12

valetudo-companion

Valetudo Companion App for Android
Kotlin
25
star
13

Valetudo-Minecraft-Mapper

Create a Minecraft World from your Valetudo Map
JavaScript
24
star
14

valetudo-helper-httpbridge

Utility webserver
JavaScript
14
star
15

hollywood-hacker

Sometimes you just want to look important and skillful
13
star
16

schellenberg-qivicon-usb

Schellenberg USB protocol
11
star
17

valetudo-tray-companion

Valetudo Companion App for the Windows Tray
C#
9
star
18

valetudo-helper-voicepacks

C
8
star
19

airgradient-cloud-free

Airgradient air quality sensor cloud replacement and firmware modifications
C++
8
star
20

glance-clock-assets

Glance Clock Assets
7
star
21

huesful-power-adaptor

Use proper PSUs with Hue Signes, Playbars and more
7
star
22

Smarthome

Node/mongo/express server logging sensor data and providing graphs with highcharts. RESTful
JavaScript
6
star
23

Valetudo-Openhab

Stuff related to using Valetudo with Openhab
6
star
24

WiFiFanCon

Control 12V PC Fans via Wi-Fi
Berry
6
star
25

valetudo-misc

Random valetudo-related stuff
Dockerfile
4
star
26

deye-microinverter-cloud-free-assets

4
star
27

better-button-card

A button-card custom Home Assistant Lovelace Card which has no external dependencies
JavaScript
3
star
28

sieve-ruleset

An excerpt of my sieve ruleset
3
star
29

node-tradfri

Control Ikea Homesmart Tradfri devices using javascript
JavaScript
3
star
30

fiio-bta30-protocol

Documentation on the BLE protocol of the FiiO BTA30 DAC & Bluetooth Transceiver
2
star
31

valetudo-helper-miio

Miio toolbox
JavaScript
2
star
32

BotanischerGarten

A broken mess
TypeScript
2
star
33

home-assistant-no-cloud-custom-component

Use default_config: without the cloud integration
Python
2
star
34

huesful-mounts

3d-printable wall-mounting adapter plates for hue remotes
OpenSCAD
2
star
35

valetudo-knowledgebase

Here be dragons
1
star
36

squeezelite-downloads

Automatically exported from code.google.com/p/squeezelite-downloads
1
star
37

mikettle2mqtt

Mi Kettle to mqtt bridge
JavaScript
1
star
38

osx-configs

1
star
39

custom-scene_presets

Custom presets to be used with the scene_presets home assistant custom component
1
star
40

ttrss-plugin-opengraph

Global tt-rss plugin to add opengraph meta tags to shared articles
PHP
1
star
41

Valetudo-Godot-Livemap

Renders a live 3D representation of a Valetudo Map in the Godot Engine
GDScript
1
star
42

simcity3000-strings-de

Kulturgut welches gesichert gehört
1
star
43

webpidginz

Webinterface Plugin for Pidgin || Fork of http://www.shaorang.com/webpidginz/
1
star