Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I bet Rest just uses a cheap voc sensor and triggers when a set threshold is hit. I doubt there's any algorithm involved.




Having played with an SGP41 (a current-gen VOC sensor), you cannot correctly do anything involving a threshold. The sensor has a couple of nasty properties, all well documented in the datasheet:

- It has a lot of low frequency noise (timescale of hours to days), so you need to do some sort of high pass filter.

- The responses to different VOC compounds don’t even necessarily have the same sign.

So the sensor gives you a “raw” reading that you are supposed to post-process with a specific algorithm to produce a “VOC index” that, under steady state conditions, is a constant irrespective of the actual VOC level. And then you look at it over time and it will go to a higher value to indicate something like “it’s probably stinkier now than it was half an hour ago”.

This, of course, cannot distinguish smoking from perfume or from anything else, nor is it even particularly reliable at indicating anything at all.

Modern PM2.5 meters are actually pretty good, although they struggle in high humidity conditions. But they still can’t distinguish smoking from other sources on fine particles.


>some sort of high pass filter

Quite some algorithm you got there!


There is a concrete algorithm, IIRC complete with pseudocode, in the datasheet. You can find open source implementations in various places. And you can have your own opinion about whether the algorithm is fit for your particular purpose.

I was jabbing at the "algorithmic smoke detectors", not the concept of filtering sensor output.

Yep. And these things trigger from things including hairspray, nail polish remover, nail polish, microwaved food, and more. I'm constantly watching "VOCs" on a cheapo Amazon AQM change whenever I cook.

Yeah, stovetop cooking makes your VOC and particulate numbers look like a bad day on an LA freeway.

The other thing that's surprisingly nasty for air quality is incense. You might live in the woods with excellent air quality, but burn some incense and suddenly all the VOC and particulate numbers look like downtown Manhattan. It's ironic that incense is a massive air pollutant, but not really surprising.


if you think a 'cheap sensor' is doing much of anything without the involvement of an algorithm somewhere then might I suggest you try to use (any) cheap sensor.

algorithms are one of the only things that make cheap equipment usable. That cheap voc sensor is going to be a noisy mess on the line.


I do use them throughout the house and I didn’t have to write a single algorithm because the libraries available handle that for you. What I was meaning was they don’t have any magic sauce. The most I can see them doing is maybe est voc greater than x for y duration.

I guess you could pedantically say see that’s an algorithm! But you know what they’re heavily implying in their marketing…


It would be more profitable, and honestly probably more accurate, if the sensor was just a plastic box and then the app rolled a random number.

Yeah, since 2023 or thereabouts all of these chips claim AI anyway.

Probably detecting the VOC from the synthetic carpet and mattress.

What if the product is just a random number generator?



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: