182 points · by TeMPOraL · 3y ago · 132 comments
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.
- 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...
The book is very much "plug in a sensor" style as everything is connected via Qwiic cables.
That said, the point of this system is microcell climate computation, and it works best when part of the public grid of sampling points.
Top level, I replied about CO2 levels, VOCs, etc:
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.
Even with the Bosch library and their calibration the values seem rather odd at times
How are companies like Bosch allowed to pass this crap off as functional? They don't meet even basic fitness for purpose criteria.
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...
> 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
Are you seeing the same behavior?
# 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
Only thing I wish it had was voc monitoring.
It's local, and does logging. That's what I really want.
Home Assistant recently added a BLE integration [2] with the device and it works great, way better than the Airthings app actually. So now I'm automatically logging and tracking all the data on a regular basis instead of hoping the app is still running in the background on my phone and updating the cloud.
I am not sure about initial setup since I had to go with the cloud integration to get it working in the first place a year or so ago, but maybe now you could skip that and just start reading the data off the BLE? It's possible but I cannot say for sure.
1. https://www.airthings.com/wave-plus
2. https://www.home-assistant.io/integrations/airthings_ble/
They have a github repo at https://github.com/Airthings and have code for things like uploading data to a local grafana.
It was basically turnkey, the gateway works on batteries or gasp a usb-c. Batteries on the BT only widgets do last a good fraction of a year. I'm using the cloud hosted dashboard, but bought it because I could migrate local when I have the time to setup.
EDIT: I have the viewplus (not waveplus), that acts as a Bluetooth <-> WIFI gateway and has a PM2.5 sensor the view plus does not, and does NOT have any code I've found to read it for non-cloud use.
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...
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/
I suppose time will tell if CHIP/Thread/Matter will finally solve the issue once and for all, but I think it looks promising.
https://www.hackster.io/news/ikea-vindriktning-air-quality-s...
Are you using the custom PCB and 3D-printed LED mounts in the instructions? What are you doing differently?
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.
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...
It uses a high-accuracy CO2 sensor (±(40 ppm + 5 %) and you can manually calibrate it to 420 PPM outdoor air. A key innovation is reporting via a dynanmic QR code on its 128x64 OLED display. Just point your phone camera at the QR code and it takes you to a site showing a report with graphs and data tables of recent measurements. There is no app to install or web site to log into. The web page is context-free and all of the measurement data is in the query string. It is nearly ready for production and likely to sell in the $150 price range.
For my use case, I could hack a system with a spare phone reading the code on a timer and uploading the results, but this feels like an overkill. How much more complex would it have to be to use that same USB-C charging port for data and power delivery? I'm imagining attaching an ESP32 board to it, which would be powered by your device, and would occasionally wake up, read a CSV file or a data stream over that USB connection, upload it to my home server, and go back into deep sleep. With an option to turn the OLED display off, I imagine it could even extend the battery life.
(Please don't take this as criticism - I fully understand my use case is most likely out of scope of your project, but I'm wondering how close it is to be supported.)
Why OLED?
Why this QR thing and not Bluetooth, or is it both?
Is it storing long-term data or just while battery is on?
No Bluetooth. A previous version had it, but the development effort was much higher, given it then needed an App also. I wanted something simple for say a school teacher to report values in their classroom.
Data is not stored long term currently. Just since last power on.
Also, that the basic data can be seen directly on the display.
It incorporates many of the features of our commercial monitor, e.g. high quality and accurate sensor components, professional looking plastic enclosure, air flow optimized PCB for accurate measurements etc.
Since it is open source it is very easy to point it to your own server. We do also have an active forum where you can get help and discuss specific things around the monitor [2].
On the pre-soldered kit that we sell, we test all components before shipping and preflash the MCU. It only consists of a few components that need to be plugged onto sockets already on the PCB. I am able to assemble it in less than five minutes (no soldering iron required).
We spend a lot of time and resources to get this open hardware kit right and you are correct that many -if not most- DIY air quality monitor project that you find on the internet have significant weaknesses (e.g. poor sensor selection, internal overheating of the temperature sensor) that leads to very inaccurate measurements.
Why do we do this? AirGradient started as a volunteer project to help a school in Thailand better manage air quality during wild fire season and from the start we worked with students building sensors. So this is part of our DNA and also an offical part of our company [3].
[1] https://www.airgradient.com/open-airgradient/kits/
Since you are responding on HN, a question: what's the noise level of the PM sensor? I assume that, like all PM sensors of this type, it has an internal fan that spins up when taking a measurement. When I did a Luftdaten kit build a few years ago, one of the issues I had indoors was that the fan spinning up was audible enough to be annoying, particularly to my wife, and particularly at night (with no background noises to drown it out). Do you know of any effective means of reducing that noise without impeding airflow to the sensor? Also, I remember reading someone hacking such a sensor to run its fan slower (and thus quieter), but continuously - but I'm not sure if that won't compromise the sensor readings.
I have a few of our monitors in the bedroom less than 1m away from my ears and I cannot hear them at all.
The checkout is very confusing, no cart button in the top UX, need to find it in the actual product page.
Also difficult to find shipping details.
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.
Can do through hole + smd, but no bga
https://esphome.io/cookbook/iaq_board.html https://github.com/nkitanov/iaq_board
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
One Starkvind (or more if space and budget allow) and few temperature/humidity sensors (I have a few $10 ones from Sonoff), combined with a Raspberry or an HTPC running Home Assistant and any Zigbee gateway, can give you a better idea about what the air is like in your apartment than most people have.
I'm still looking for a non-DIY CO2 sensor solution I could add to my Zigbee based network, most of the stuff I've found is either totally DIY or industrial.
I do wonder where to place it. Middle of the room seems best. Would it be useful to mount it on the ceiling?
Tasmota is local first.
Get a wemos D1 and a https://www.ikea.com/us/en/p/vindriktning-air-quality-sensor...
https://tasmota.github.io/install/ flash the unofficial all sensors build.
https://github.com/Hypfer/esp8266-vindriktning-particle-sens... Solder as follows GND to GND on ESP, 5V to 5V on ESP and finally the last one to D2 on the ESP.
Guides I am stealing from. https://github.com/Hypfer/esp8266-vindriktning-particle-sens... Has most of the hardware side. But its using a different software.
https://blakadder.com/vindriktning-tasmota/ is where I got most of the rest of the info but he uses a separate voltage regulator. If you use the Wemos D1 Mini you should not need that.
After that the internet has plenty of info for hooking tasmota and say home assistant together.
Well, seeing my neighbor's indoor air quality might explain why he is such a jerk. It also might help spot local methlabs...
(just kidding - I totally agree with you)
I would recommend taking a look and talking with this Finland-based company, they utilise a global 0G IoT network, and their devices are fully plug-and-play free from any electrical supply - thus just stick their device on your walls or place them where you want, and they'll support any data configuration needs.
no internet connection required, and they have their own working data software platform for all essential monitoring data, or your own platform via API.
From all your points, they seem to actually fit your needs from #1 to #4.
Here are their contact links: https://connectedinventions.com/about-us/ And here are their devices: https://connectedinventions.com/all-devices/
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-...
https://old.reddit.com/r/Awair/comments/y7i5ku/awair_discont...
The local API is easy to interface to telegraf, so its trivial to dump to your graphing system of choice.
I've a few with PMS5003 sensors and have been satisfied so far...
The more DIY side of mine is all the software, with MQTT as the glue. Both ESP32s publish to that, one subscribes (to show both), and a little daemon on the Pi with Mosquitto writes it all to an Sqlite database.
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.
I've had some very similar ideas and stalled out at the hardware stage, but admittedly haven't tried in a while.
Highly modular components aimed at tinkerers (connect electronically with grove connectors rather than soldering (unless you want to), Lego-compatible, programmable in C, micropython, or via blockly. It's very, very easy to get up and running. Also they're still doing 10-20% off today.
Cons: documentation is a bit mediocre, you're kinda expected to read datasheets/figure it out yourself past the basics. If you are OK with looking up chip/component numbers to see exactly what they do you'll be fine.
Unfortunately don't have the skills to measure the accuracy and precision but both are well reviewed in the Internets.
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/
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
Still brewing at the moment but send me an email at cole.christensen@gmail.com if you’re interested in updates, perhaps a free prototype in a few months.
The general idea is open hardware sensors you can do whatever you want with along with an optional paid cloud service.
[0]: https://smile.amazon.com/ECOWITT-Temperature-Humidity-Partic...
[1]: https://smile.amazon.com/Ecowitt-Temperature-Humidity-Atmosp...
You may also try Tuya based solutions which maybe flashed with ESPHome but they mostly use DHT11/14 based sensors and need some soldering.
Another approach is using a BLE based sensor and then using a BLE to WiFi bridge to get the data into HomeAssistant or similar product which can log the values.
https://support.getawair.com/hc/en-us/articles/360049221014-...
You say that you want the sensor to measure what it says on the tin, but maybe you should start by defining what "air quality" means.
And then maybe you can find some simple one-off components that do all the individual measurements. I for example found a cheap and simple USB connected co2 sensor, that just changes colors based on co2 levels.
My experience so far involved playing with sensors for all of these, except CO₂, that are popular with hobby electronics crowd. Back then I didn't really care about measurement accuracy, I was just goofing around. Since then, I've read all these sensors require significant work to get them to produce stable and reasonably accurate readings.
As for CO₂, I've only read about the options recently, but apparently the actual sensor is pricey-ish, so even in mass market products, the CO₂ measurement is inferred from TVOC, temp, Rh, and a magic lookup table supplied by the vendor (and accurate only in their test lab). This is the main example of what I meant by not reporting what it says on the tin.
Now, I'm not necessarily after high-quality absolute measurement values, as long as the relative change is detected correctly. But I don't know the space well enough to go around Aliexpress shopping for components myself, and every company that seems to have done some work to validate results and calibrate their devices also wants to shove their app down my throat, which is a no-go.
why is old-school a problem?
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.
https://www.linkedin.com/in/david-burchfield-pe-cem-83920233...
I still have a few of those pms7003s, if you're in the bay let me know and you can come grab some
(If they're as robust as they look, it makes me wonder if I could score some second-hand units; something I haven't even considered as a possibility before.)
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.
Then find an appropriate sensor module breakout board and connect things up.
Other that the very basics, what you should focus on highly depends on whether you're a "Mad science analog tinkerer" or "Ultra modern high tech" kind of person.
If you're serious about this stuff you probably want to learn 3D printing to make cases.
I think the most important thing is reasonable expectations. Commercial products take months to design and large teams to handle all the companion apps and stuff. Either keep your project very simple, use off the shelf stuff wherever possible, or be prepared to spend a lot of time on it.
And be aware of the time and effort required in physically assembling things.
Despite having done this stuff for years, I still don't actually have any custom hardware in use at home, because commercial stuff is 80% good enough, and has warrantee support and all kinds of features that would be a bit time consuming to DIY.
I have the same goals with my setup, and I've been tinkering with home automation for a couple decades now, so I'll share what I've learned so far.
First, specifically for indoor air quality, and especially for real CO2, the options are terrible. eCO2 sensors are a dime a dozen, but they are awful. For real CO2 everything seems to be super industrial or cloud junk.
I'm using a variation on https://hackaday.io/project/186682-co2-buddy for CO2. It uses a high quality sensor and is really just three parts, or two if you don't want LEDs. You flash the ESP32 with esphome and then Home Assistant does the rest. Someone, maybe me, should build and sell these.
For PM2.5 I use a bunch of modified Vindriktning from IKEA. I added a tiny ESP32 board, soldered four wires, and installed esphome. I modified four in about an hour one evening. Someone, maybe me, should build and sell these.
For temperature and humidity I love the "Aqara Temperature and Humidity Sensor". I sprinkle these liberally around the house. They are Zigbee, so local by default. In fact, when shopping for home automation stuff, if you see something that "requires Hub" it usually means its either Zwave or ZigBee and will work just fine directly.
Home Assistant for control, data storage, graphing, dashboards, etc. It's free, open source, gets high quality monthly updates, good looking and responsive iOS and Android apps, great web interface, and most important to your question: has extremely good documentation when it comes to what is supported.
Take a look at the Integration page for Phillips Hue, for instance: https://www.home-assistant.io/integrations/hue/. It's marked as "Local Push" which is the keyword you want for stuff that doesn't need someone else's cloud.
https://www.home-assistant.io/blog/2016/02/12/classifying-th...
So, when I am shopping for a new class of device, I always first check the Home Assistant integration page for it and see what the support is like. There will often be helpful comments and FAQs on the page.
In general, if something is Zwave or Zigbee it will be trivial to get it working local first. If it's WiFi there's probably going to at least be an app and a cloud that you have to use to setup and it's a toss up whether you can then use it without a constant cloud connection.
If you've made it this far, here's some other recommendations for solid local first Home Assistant compatible goodies:
- Hue lights. I've tried Feit, Sengled, LiFX, Hue, and various big box store white label junk. Hue just works. They are expensive, but they work great and I never, ever have a single problem with them. Phillips doesn't make it obvious but Hue's hub is just Zigbee and you can talk Zigbee directly from Home Assistant to Hue lights. You can do the initial setup over Bluetooth using their app and then never use it again. LiFX are WiFi and are a solid runner up, but basically the same price.
- Zooz wall switches and dimmers.
- Zooz 4-in-1 Sensor is a great temperature, humidity, illuminance, and motion sensor. I use these in places where I want motion sensing in place of the Aqara temperature and humidity.
- Zooz Water Leak Sensors.
- Zooz window and door open sensors.
- Bond Bridge for 400MHz RF remotes - ceiling fans in my case. Like Hue, set it up using the app, then just run it with Home Assistant.
- Minoston Z-Wave Plug with Energy Monitor for plug in switches with energy monitoring.
I've actually stumbled on the images of that "CO₂ Buddy" a day or two ago, but dismissed it because I thought it's fundamentally designed around the LEDs, which I don't want.