(I know, it's PHP, but can be hosted virtually anywhere!)
I would post the result to a web service in this fashion from the Esp8266:
Then just setup a nice Graphana+Prometheus as a service, graphana.com is nice and can expose a Prometheus end point over basic http auth - easy to post to. Then you can setup alerts, graphs, dashboards, etc.
In fact you could have a whole suite of IoT reports flowing in from various Arduinos really easily. Or at least a couple CO2 sensors spread around the house.
Total investment of coding would be about 30-50 lines of Arduino code for the Esp8266 and you may even get away with the free plan on Graphana.com.
I obviously like to outsource as much as possible these days. Less learning, but more efficient.
>The SGP30 does have built in calibration capabilities, note that eCO2 is calculated based on H2 concentration, it is not a 'true' CO2 sensor for laboratory use.
esp8266-nonos-sdk/esp8266-rtos-sdk/esp8266-arduino uses lwip as tcp/ip stack, which supports ipv6.
The Espressif 8266 SDK docs make no mention of IPv6, does it really work there? (https://www.espressif.com/sites/default/files/documentation/... linked from https://www.espressif.com/en/products/software/esp-sdk/resou...)
I only found one example for the Espressif-provided RTOS, at https://github.com/IPv6-ESP8266/IPv6-ESP8266 . The example says it only works in a IPv6-only network and it's using link-local addresses, which kind of defeats the point of IPv6. No idea if these reflect limitations of the stack. It's a start at least :)
You might see an ATMega328p chip isolated, and that's "good enough" for hobbyist projects where you just want to make HID easier on yourself. But I think most shops that need one of these three would be much better off with a STM32-series chip - they cost pennies compared to consumer boards, run on microamps, and have much better documentation.
It'd be a huge red flag for me if I was interviewing with a hardware startup and they said they wanted to put Arduinos into mass production.
It sounds silly but it's scary how quickly levels rise when the windows are closed.
It might be scary, but is it actually dangerous? It could just be that the levels shown, even if raised, are inconsequential.
Basically wondering about the "Already changed my life" line.
Are we all without one risk certain CO2 death every day, or is the parent overly worried over nothing (and opens windows without really a need for it).
There's at least this study: https://ehp.niehs.nih.gov/doi/10.1289/ehp.1510037
And this video has the quote "At 1000ppm there is a 15% decrease in cognitive function".
In a century or so we could be looking at similar CO2 levels in the atmosphere if we don’t significantly cut emissions.
Will our decencents be made stupider by higher CO2 levels? Or will they be able to adapt?
The long answer:
I think the clarifying reference here is 'respiratory acidosis', which is the general name for what blood acidification that comes from CO2 exchange problems instead of internal sources. It's diagnosed as a disease when people exceed a threshold pH, but the body's behavior is the same before that. Acidosis is diagnosed in two forms, acute and chronic. Predictably, both represent the same problem of too-low blood pH, but acute is more extreme and shorter term. What's relevant here is the difference in subsequent outcomes.
Regardless of what's driving the acidification, the body responds first by making more bicarbonate, then by excreting more carbonic acid and reabsorbing more bicarbonate. The production response happens on the order of an hour, but heavily undercompensates for acidification. The reabsorption response happens over several days, and multiplies the effect of the first response for full compensation.
This makes the problem with acute acidosis obvious: you suffer symptoms much faster than you adjust. A weaker version of the same effect is what happens when you go into a high-CO2 space. Chronic acidosis, meanwhile, creates two different concerns:
First, can the body compensate for CO2 levels? If bicarbonate production is disrupted or acidification is very severe (e.g. late-stage emphysema), it's possible to exceed the bounds of compensation and end up with an extended form of the acute symptoms. For our purposes, though, this isn't a concern; at sub-disease levels, the only people who can't compensate probably can't produce bicarbonate at current levels either.
Second, does the compensation have health consequences? Chemically, we see slightly elevated serum levels of Ca and K, but even serious acidosis rarely requires any response. Experimentally, submarine atmospheres are substantially higher in CO2 than poorly-ventilated houses or global warming projections, but animal experiments show basically no effect and submariners don't show obvious problems.
Only true if adjustment isn’t giving up higher functioning of the body for a less efficient metabolism.
My doctors couldn't figure out what it was because every time I'd go get bloodwork done, I'd be out of the house and the symptoms would clear up. I thought it was due to age and that I was simply getting tired when I got home. It took me nearly two years to realize the fatigue didn't happen when I was spending the night somewhere else. I read an article on CO2 levels affecting quality of sleep a few days ago here on HN and it dawned on me that the symptoms weren't happening when I was out of my own apartment and I'd sealed and weather-stripped the apartment shortly before the symptoms began.
Literally -- not figuratively -- changed my life.
Either way I was referring to other chemicals that plants remove from the air, not CO2.
Depending on choice of pot and soil, most only need to be watered once a week. Even still, there are decorations that hold water to slow release for even extended times between watering. Great for vacations, or the forgetful.
Tom Scott uploaded a video about CO2 and its influences a few days ago. it's a good palce to start research:
Looks like they're out of stock now, but it has a big label on the front that says co2meter.com, so you might want to check there.
I am not affiliated with that company.
But there's a review on Amazon that describes someone getting three units and finding as much as 600ppm variation among them.
Maybe they need some kind of calibration or tuning? Or their manufacturing process is way out of control.
Edit: I realised that this is a perfect item for public libraries to loan out. Expensive, only needed occasionally, easy to use, potential for significant positive public impact on becoming more informed and healthier.
If you're looking for a cause that's affordable, practical, and local, consider buying and donating one to your local library.
They have pins with 2.54mm spacing if that helps you.
Still a cool script nonetheless, no hate.
Incidentally, NHTSA projects in 2100 CO2 will be at 789ppm  in the atmosphere, up from 410 today and 350 pre-industrial. And there are higher projections. One would assume that this would make ventilation more urgent, I guess building codes will have to be updated and existing buildings retrofitted.
I hoped there would be cheaper versions on Aliexpress, but no luck :(
EDIT: ah, looking at a CO2 monitor, it says "Indoor air quality: Good (0 to 800ppm), Normal(800 to 1200ppm), Poor (>1200ppm) indication"
You would have to place water immersed algae farms on every open space in the house and keep them illuminated with artificial light 24/7, because plants will produce CO2 at night otherwise.
Like you said, good ventilation is far more effective than any plant.
The company saved $25 though!
$ pip install CO2meter flask pandas
* Serving Flask app "co2meter.server" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
INFO:werkzeug: * Running on http://127.0.0.1:1201/ (Press CTRL+C to quit)
ERROR:flask.app:Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
File "/usr/local/lib/python2.7/site-packages/co2meter/server.py", line 64, in home
data = read_logs()
File "/usr/local/lib/python2.7/site-packages/co2meter/server.py", line 236, in read_logs
with open(os.path.join('logs', name + '.csv'), 'r') as f:
IOError: [Errno 2] No such file or directory: 'logs/co2.csv'
INFO:werkzeug:127.0.0.1 - - [25/Jan/2019 14:18:23] "GET / HTTP/1.1" 500 -
INFO:werkzeug:127.0.0.1 - - [25/Jan/2019 14:18:23] "GET /favicon.ico HTTP/1.1" 404 -
I got one and it's pretty cool. A bit of a game to get a high score.
Not that there anything wrong with that :)