Ask HN: Indoor air quality sensors and other IoT that's local-first and not DIY?

182 points by TeMPOraL ↗ HN
I've recently been looking into assembling an indoor air quality monitoring system, and so far have failed to found any solution that would meet the following criteria simultaneously:

1. Connected for data logging, but local-first. That is, no mandatory Internet connection to vendor cloud. Ability to point to my own server (in my local network), or at least download a data dump off device every now and then (even if over a wire, as a last resort).

2. Not strictly industrial-use. I.e. one that doesn't require me to become a large corporation to buy some, and that doesn't require some proprietary, expensive, and/or old-school industrial protocols to talk to.

3. Not DIY at the hardware level. I'm not that good with a soldering iron, and with small children, I have neither time nor workshop space to solder and assemble anything less trivial than "plug a sensor into an ESP32 and screw both into a box".

(EDIT: shmaybe I can solder a few through-hole components into a PCB, but can't do SMD nor make a custom PCB.)

4. Quality components. With sensors, I mean measuring what it says on a tin (vs. measuring something else and using a factory-provided lookup table to synthesize approximations), and doing it with reasonable accuracy and precision. If there's a calibration step to be done, it should be one that doesn't require me to incorporate myself to perform it.

I've spent some time looking at available options and past HN threads, and so far I discovered that:

- Most products that fit #2 and #3 fail at #1 - they're predominantly cloud-connected bullcrap, and going by review, they often fail at #4. Occasionally, I find something that fits #2, #3, and #4, but then it fails at #1 by... providing no data export option altogether - apparently, it's enough for the consumer to see traffic lights instead of numbers, or browse the readings from the device control panel.

- The DIY stuff I saw (failing #3 to smaller or greater degree) is weak in #4 - in some cases, I recognize the sensors as rather poor and tricky to use right (infamous DHT11 comes to mind), and in all cases, I don't know how one would go about calibrating anything.

My questions thus are:

- Does anyone here have a setup that solves for these four points, and if yes, could you share some details?

- How one would go about looking for vendors meeting those criteria, if they exist at all?

- In a broader sense, how do you go looking for any IoT-adjacent vendor that meets those criteria? It really seems to me that everyone wants me to install their godawful stupid app to connect to their broken cloud, and there's such a flood of those products that reviewers can't keep up with quality testing, and hackers can't keep up with reversing the proprietary protocols and firmwares.

138 comments

[ 3.1 ms ] story [ 240 ms ] thread
I'm happy to set something up and sell you a few, but my experience making these is that the cost gets pretty steep for small batch, high quality runs.

It's been a side project of mine to set up a local-first IoT shop. But haven't gotten a lot of traction yet.

If you're willing I'd love to know what you use / would use for something like this.

I've had some very similar ideas and stalled out at the hardware stage, but admittedly haven't tried in a while.

Can you give some ballpark estimates, either here or privately (my e-mail is in the profile)?
Sure, I will email you later this week.
(comment deleted)
I'd love to hear more about your shop and why you think it's been difficult to get a lot of traction!
Are there any high quality local-first IoT brands out there at all? I would be interested in a home assistant with some basic offline-only (or limited online) skills. For example, set a timer by voice, check the weather by voice, add something to a locally-synced calendar.
Thanks!

Some years ago, I built a sensor kit for a similar project (Luftdaten), but IIRC, the measurement quality of the hardware was... questionable (it did led me to discover that ultrasonic air purifiers will disperse as particulates anything and everything that's dissolved in the water you feed them, though).

At this point, my area is somewhat saturated with (cloud-connected, proprietary, with penalties for opening up) air quality sensors leased by a local startup - I have access to more outside-air data than I need right now. I'm looking for setup optimized for indoor air in various rooms - so even public clouds are kind of a mismatch here: I don't want to publish this data, and it would only make their aggregate results less accurate.

(comment deleted)
The https://operame.nl/Operame project made some designs/kits for CO² monitoring (in dutch classrooms). While this is mostly a DIY thing, assembly was really easy, and there were some volunteers even pre-assembling kits for third parties.

I have 2 of these sensors myself, and they report over mqtt (local), and I've connected them to homeassistant for live insight and possibly triggeging other events based on CO² levels.

The Operame project is currently on hold, but all designs/code are open and free to use.

We use these at office in conference rooms or 1:1 rooms, and encourage people to keep CO2 levels below 700-800 (an empty room 450-550). Very high quality, a half dozen all agree perfectly on all sensors. They support API.

# SAF Aranet4 Home

Wireless Indoor Air Quality Monitor for Home, Office or School (CO2, Temperature, Humidity and More) Portable, Battery Powered, E-Ink Screen, App for Configuration & Data History

- The perfect companion for indoor environments, allowing you to monitor CO2 levels, temperature, relative humidity, and atmospheric pressure in real-time

- Easy for anyone to use – the color coding and the optional buzzer warns you when the CO2 concentration gets too high

- Power-efficient e-ink display ensures super long battery life for this wireless device (up to 4 years)

- Smartphone app for viewing and analyzing historical data up to 14 days history (supports iPhone and iPad with iOS 12 or later, Android devices with Oreo 8.0 or later, compatible with Bluetooth 4.1 or later)

- Uses nondispersive infrared sensor (NDIR) technology for most precise and reliable CO2 measurements

https://smile.amazon.com/gp/product/B07YY7BH2W/

https://github.com/Anrijs/Aranet4-Python *

* Note: Smart Home Integrations must be enabled in Aranet4 mobile app for full support

I love mine too. Been meaning to set up some longer term logging since the app only holds two weeks (and I've noticed it often wipes out data faster than that).

Only thing I wish it had was voc monitoring.

(comment deleted)
Another vote for this. We saw it at friends over Thanksgiving, and immediately got our own.

It's local, and does logging. That's what I really want.

Here's another upvote for the Aranet4 device, I first found it recommended on HN and have been happy with it ever since purchasing it a couple of months ago. Integrated into Home Assistant using a couple of lines of Python code scheduled by AppDaemon.
I have the Awair Element and I'm reasonably happy with it.

The primary interface is through their app and I think you might need to use this to get it up and running initially. But they have a supported local API feature[1] that has so far worked as I'd expect. In the end I've been happy with their app so have primarily used that so far. The data seems good.

They're quite expensive new. But they were involved in some sort of cryptocurrency (!) that failed. So there are a lot of them available as nearly-new on eBay. In the UK I picked one up for about £60, I think.

[1] https://support.getawair.com/hc/en-us/articles/360049221014-...

Awair recently deprecated some of their devices making them into bricks instead of allowing them to continue working locally. I'd stay away.

https://old.reddit.com/r/Awair/comments/y7i5ku/awair_discont...

The v1 devices never supported a real local API. The v2 devices like the Awair Element do have a local API built-in. It does have to be enabled via the app but it lets you hit the device's LAN address and get back real time JSON with the sensor data. Not to say they couldn't figure out a way to brick those devices in the future, but you could theoretically turn on the Local API and then firewall the devices to your network to prevent future firmware updates.
That would work for a while but if you ever needed to set it up on a new Wifi network you would be screwed, as the app is required for initial setup.
One thing I've learned over the years is that it's good to "own" your SSID, and preferably stick to pro-grade routers that let you configure local network addressing. As long as you stick to Internet providers that let you run their hardware in "bridge" mode, it means you don't have to set up new WiFi networks at all.
I have some of them. They are expensive new, but well calibrated, with decent components.

The local API is easy to interface to telegraf, so its trivial to dump to your graphing system of choice.

I haven’t kept up with commercial solutions. Full home automation even with the easy solutions eat up a lot of time especially with light switches. I remember only one brand that might meet the local first requirement. UI was clunky. https://hubitat.com/

Imo I’d go open source for the hub. Installing it on an older laptop shouldn’t take as much DIY

https://www.home-assistant.io/

https://www.openhab.org/

Sadly, you’re probably going to need to do some DIY if local first and air monitoring are your highest priorities

Edit: I forgot that Apple HomeKit is local first

I think Ambient Weather weather stations hit all your requirements. They can log to SD card, come with a display, and expose local only network endpoints. They can also upload to various web services.
Hey there! My co-authors and I actually wrote a book on this topic earlier this year. It walks you though setting up a weather station with Elixir and Nerves using a Raspberry Pi and the following sensors:

- VEML6030 light sensor - BME680 environmental sensor - SGP30 air quality sensor

After you set up the hardware side of things, you put together a very simple Elixir Phoenix REST API and persist the sensor data into Postgres (with the TimescaleDB extension).

And to wrap up the book, you learn how to create Grafana dashboards to visualize all your time-series data.

Everything is meant to be set up on your LAN and everything can be run either natively or in Docker (there is a Docker compose file in the repo).

Hope that helps!

GitHub Repo: https://github.com/akoutmos/nerves_weather_station Book: https://pragprog.com/titles/passweather/build-a-weather-stat...

Since OP mentioned not wanting to DIY, if people are looking for weather system with incredibly rich API and no moving parts (no Raspberry PIs either), this system is fantastic for people without workshop build time:

https://weatherflow.com/tempest-weather-system/

To clarify, the OP said: "I have neither time nor workshop space to solder and assemble anything more trivial than "plug a sensor into an ESP32 and screw both into a box"."

The book is very much "plug in a sensor" style as everything is connected via Qwiic cables.

That looks like it doesn't have any local-first functionality? Their API documentation only talks about how to retrieve data from their server, even if you are just trying to get the data from your own station.
The device has an API, as does their "Hub" that reports the device to cloud. You may find tools under different names like tempestwx or etc.

That said, the point of this system is microcell climate computation, and it works best when part of the public grid of sampling points.

Does it? I couldn't find any documentation on those features, if you have links to any documentation that doesn't require going through their servers I'd love to see it since I've been looking for something just like that. Everything I have found, even for querying a single devices, requires making a request to swd.weatherflow.com via an internet connection.

EDIT: I was eventually able to find this: https://apidocs.tempestwx.com/reference/tempest-udp-broadcas...

So it is possible to get the data locally, but it seems like they are pretty strongly discouraging its use.

This looks good, but this is an outdoor weather station. OP is asking for an indoor air quality monitory.
True. That said, it's still interesting to me, because an outdoor weather station is something I've also been eyeing, and also having trouble to find something that a) logs data, but b) not to a cloud.
> This looks good, but this is an outdoor weather station. OP is asking for an indoor air quality monitory.

I replied with an indoor no-DIY suggestion and code at top level: https://news.ycombinator.com/item?id=33774695

> I actually wrote a book on this topic earlier this year. It walks you though setting up a weather station...

... and replied to this from immediately above with a similarly no-DIY weather option.

Confused here, isn't 'indoor air quality' primarily about CO2 levels, particulate matter, VOCs, etc.? I don't see any of that in there.
(comment deleted)
Have you actually gotten any reliable co2 data out of the bme680?

Even with the Bosch library and their calibration the values seem rather odd at times

Yeah, it's only a propietary approximation.
When developing the book, I didn't have any additional meters or sensors to cross reference measurements with so I can't comment on the accuracy unfortunately. But I did notice that the changes in measurements made sense when the environment changed. I.e when I would exhale on the sensor, the measurement would rise and fall.

Another example was when I opened my window in my office. CO2 immediately dropped off (15:42 timestamp): https://twitter.com/akoutmos/status/1443233937015418891/phot...

Both the SGP30 and the BME680 have a big weakness that I experienced some years ago when I trying putting an air quality sensor together. They correlated the TVOC readings with the temperature. And sometimes it was bad, like a difference of just 1 or 2 degrees Celsius could double or triple the TVOC readings at the lower end of the scale (~50ppb), and add maybe ~50% at the upper end (~500ppb).

Are you seeing the same behavior?

Yeah same - there is definitely a practical cause & effect practical correlation, but also a lot of effect without obvious cause in an environment that should be relatively stable. (one person, small apt, no co2 sources)

> additional meters or sensors

I've got a CCS811 as well but no luck yet. Acquired 2nd hand so unsure if broken from shipping or I'm being stupid with code or I broke it while soldering

This reminds me how my DIY build of Luftdaten kit (PM sensor) started reporting huge particulate spikes indoors, with no obvious cause. Took me ~2 days to figure out they're being caused by our ultrasonic humidifier, and another 2 days of looking through blogs and scientific papers to finally learn that one shouldn't be putting tap water into them (as they efficiently aerosolise the minerals and contaminants dissolved in it).
It's not capable of CO2 measurement, it only estimates CO2 levels based on measurements of VOCs. These estimated readings are garbage and have close to zero correlation with CO2 levels.
Unless I've got another source of VOCs around there should be at least some correlation with actual CO2 levels though? I don't have a reliable way of checking this, but the bottom end seemed well calibrated...outside air leads to a reading consistent with ambient co2
We tested a lot of VOC sensor modules and the estimated CO2 values they give is -in our experience- 80% of the time totally wrong. Also the absolute ppb values of the TVOC are most often not to be trusted.

What they are good at is detecting spikes, e.g. from cleaning liquids, desinfection etc. but I would not trust the absolute value at all.

The big sensor manufacturers recognized that and newer generations of the Sensirion sensors are now just displaying an "index" instead of absolute measurements.

Thank you for asking this question because all of my experience so far with "environmental sensors" that aren't laboratory grade has been that they are absolute garbage and only barely correlated to anything.

How are companies like Bosch allowed to pass this crap off as functional? They don't meet even basic fitness for purpose criteria.

I bought the Aranet4 a while ago, and that seems to meet all your requirements. Keeps measurement history local, but can be paired via Bluetooth (with a pairing code) through their (somewhat flaky) app or open source options. Has a hardware switch to disable Bluetooth. Good quality sensor. Very good battery live due to e-ink screen. Looks pretty neat as well. Quite expensive though, but almost every quality sensor is.
This should fit all yours needs.

https://www.evehome.com/en/eve-room

Nice. This seems like the perfect solution and fits OP's requirements!
Almost. Unless I'm missing something, the only way I can get the data for my own storage and processing is by manual export of an Excel sheet from their app. Unless HomeKit allows some other way, but I'm not familiar with it (I'm not an iOS user).
I'd kill for a Dylos-to-ESP32 cheat kit. That would be extremely valuable for my woodshop to monitor when I can resume a post-disaster activity.
For any readers who need hand soldering for a project like this, you're welcome to dm me. Ship it to my house and I'll put it together. I'll do it for free (USA only)

Can do through hole + smd, but no bga

I have a couple Eve Room air quality monitors[0] and like them. You do need the iOS app to view and export (XLSX format) historical data, but there's no cloud service or anything to sign up for. I charge them about once a month and usually look at the graphs every couple of days so I'll see then when a battery is getting low. The only other "smart" devices I have in my home are some lightbulbs, though, so I don't have any automation set up using the temperature or air quality.

[0] https://www.evehome.com/en-us/eve-room

I'm just starting a similar project to monitor my home. I decided on using esphome.io based devices connected to my Home Assistant setup. Spark Fun has a great ecosystem [1] of sensors and carriers [2] that are just plug and play as far as the hardware goes (no soldering). You would just need to DIY a case.

You could probably also find off the shelf Bluetooth sensors that would interface with Home Assistant for data logging and visualization.

[1]: https://www.sparkfun.com/categories/tags/qwiic [2]: https://www.sparkfun.com/products/17724

I recommend looking at Zigbee devices. They are local-first and don't require an internet connection (or any network at all.) If you don't have any existing home automation software or hardware, then the easiest way to get started is probably with a Home Assistant Yellow: https://www.home-assistant.io/blog/2021/09/13/home-assistant...

I've been very happy with my $20 Zigbee air quality sensors that I bought from AliExpress [1]. No DIY required, just plug them in and pair them with Home Assistant. These cheap sensors don't really have quality components or accurate readings, but they're accurate enough to get a good sense of my air quality and set thresholds to automate extractor fans and air purifiers.

If you really need a commercial-grade and highly accurate sensor, you could look at this iQi Zigbee sensor for $300 [2]. But I would recommend the $20 ones from AliExpress for home use.

[1] https://www.aliexpress.com/item/1005003815133870.html

[2] https://www.trutechtools.com/iqi-air-quality-monitor-v1-with...

Were you able to get accurate CO2 readings from the AliExpress Zigbee sensors? I got two of them and the CO2 values from each were wildly wrong. I'm curious if I'm missing a calibration step.
I'm not sure how accurate it is but the values seem reasonable. It hovers around 360ppm for fresh air. I can see it creep up if I'm in my office with the windows and door closed, and it spikes up if I breathe onto it.
In my experience the CO2 readings from these cheap devices are estimated from VOC levels.
I think it's difficult to make an electronic sensing device that logs data locally but isn't a little DIY. There's not a great standard for passing around data on a local network. Perhaps the best way to do this from a consumer device would be to log to a USB stick.

You asked for something that's not DIY at the hardware level, though, so I think something like the AirGradient Pre-Soldered kit would be perfect for you[1].

You'll get an Arduino connected to top-of-the-line sensors that can be flashed with your SSID to connect to your local WiFi network. Once connected, the device exposes an HTTP endpoint you can GET for the status of each sensor[2].

I've been thinking a lot about indoor air quality[3] so if this setup works for you I'd love to know!

1. https://www.airgradient.com/open-airgradient/shop/#!/DIY-Pro...

2. https://youtu.be/Cmr5VNALRAg?t=444

3. https://gen.co/air

> I think it's difficult to make an electronic sensing device that logs data locally but isn't a little DIY. There's not a great standard for passing around data on a local network. Perhaps the best way to do this from a consumer device would be to log to a USB stick.

I was a bit surprised by that, but ultimately guessed at the same thing - even ignoring the (IMHO repugnant) cloud-based business model, there isn't one obvious way to record data off-device in local-first way that would be useful for non-tech / non-industrial users. It's kind of similar to the problem of transferring files between two computers: there are so many ways you could do it, with different requirements and tradeoffs[0], that there is no one universal way everyone can rely on. See also [0].

WRT. DIY, I don't mind extensive software-level DIY (especially that I'm DIY-ing the data storage, analysis and reporting side), but I currently want to avoid hardware DIY.

Thanks for your thoughts and the links; I found your analysis under[3] particularly useful and insightful. I'm actually looking into this space for health reasons - we don't have regular wildfires where I live, but I do have allergies, and now children with allergies too, so I want to better understand and control our indoor air.

----

[0] - https://xkcd.com/949/

Zigbee 3.0 has reports of being fussy and cutting out, but it seems like they are as close as anyone's ever gotten to a proper standard.

I suppose time will tell if CHIP/Thread/Matter will finally solve the issue once and for all, but I think it looks promising.

Anything HomeKit is local-first. That's one thing Apple actually got right, and thankfully has pushed into the new Matter industry standard too. Won't work without some Apple device though of course.
I'm curious to see how matter will be adopted, it looks like almost everything will have a local method of control. I'm already using zigbee and z-wave and some local wifi interfaces. I love automating everything how I want and not worrying about any online services.
Is it local but fully delegated to Apple, or local as in I can actually get my hands on raw data and the control plane?
YoLink isn't "local first" yet but they are aware it is an issue to be solved. They use LoRa.
I have several IKEA Vindriktning air quality sensors (measuring PM2.5 but not CO, CO2 or VOC) equipped with an ESP32 with Tasmota on it. The level of soldering is trivial and the hardware looks really nice. It feeds a Grafana dashboard via MQTT, Node RED and InfluxDB. All is well documented and easy to do - you will find lots of resources online. And the Tasmota toolchain can be used for many other sensors as well.

https://www.hackster.io/news/ikea-vindriktning-air-quality-s...

From the article, it looks like it involves a significant investment in DIY time and parts acquisition.

Are you using the custom PCB and 3D-printed LED mounts in the instructions? What are you doing differently?

I've seen articles about it; my understanding it that at minimum, it only involves a small amount of simple soldering to connect an ESP8266 (or ESP32)-equipped board to the IKEA PCB, which is about the limit of what I can do in my current conditions. It also fits into the original enclosure without damaging it, which is a nice bonus.

I keep it on my list as a last-resort option, because of two factors:

1. That's only a particulate sensor, and I'm hoping I can find something more comprehensive - at least with TVOC, but a legitimate CO₂ would be nice too.

2. Unless immediately hacked, it's just a paperweight - I'm not going to bother manually recording the two-bit measurement it displays, and my wife isn't fond of colorful indicator lights illuminating the apartment at night.

> , and that doesn't require some proprietary, expensive, and/or old-school industrial protocols to talk to.

why is old-school a problem?

I guess he might mean not working out how to encode EBCDIC into ASN.1 in order to issue command PDUs using modbus-over-IP, or something equally barking...
I knew modbus was going to be mentioned. As someone who has written low level modbus software, there's nothing wrong with modbus. The only people who complain about it are people who are bad at data marshaling.
I can deal with it if it's only an issue of decoding a byte stream with a simple structure in software, though it would be annoying. But I don't want to get into dealing with some obscure industrial protocols that would require me to spend 3+ digit amounts on specifications, or proprietary clients / servers, or - heaven forbid - some industrial hardware for routing or ingesting data.

I don't have anything against those technologies per se - but I'm just a person doing this for a household, not a plant operator, so I don't want anything that's assuming it'll be a part of 5-digit procurement budgets and multi-person installation projects.

EDIT: I've heard of modbus, my impression is that it's accessible for a hobbyist to read/write/work with, so that by itself is not off the table. I suppose I could even deal with OPC UA (I worked with it professionally, and IIRC, there are some open source implementations for client/servers). I don't know much about other protocols used in the industry.