Live data from Hacker News

Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

github.com

111–120 of 124 posts

Re: Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

#111
post #89

Earlier quoted context omitted.

They use optical measurement, are reasonable in pricing. Outputs are UART, PWM and analoge. They have pins with 2.54mm spacing if that helps you.

Would you use something else if you meant to solder something on a PCB for medium scale production?

Don't know. There are chemical sensor with a heating element, but those usually suck.

Re: Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

#112
post #61

Shameless plug: I wanted to measure PM10 and PM2.5 pollution level in my neighbourhood, so I built the ESP8266-based sensor using instructions from Luftdaten [1] and since the original interface is pretty ugly, I created my own UI: http://smog.rekawek.eu/ https://github.com/trekawek/air-quality-info (I know, it's PHP, but can be hosted virtually anywhere!) [1] https://luftdaten.info/feinstaubsensor-bauen/

I built a pretty similar rig around an RPi Zero W, same SDS011 AQ sensor and BME280 temp/pressure/humidity sensors as Luftdaten, just polled by a couple of python scripts on cronjobs.

Re: Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

#113
post #79

Earlier quoted context omitted.

Yes, I agree. I've already ordered a bunch of plants :) Sadly my building is quite old and ventilation is poor.

I heard that you would need about 40(?) plants per person. Best advice was to be well ventilated unless the outdoor CO2 is worse than indoors.

You literally can't have enough plants in the house to compensate for the CO2 production of its inhabitants.

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.

Re: Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

#114
post #94

Earlier quoted context omitted.

Would you be able to share where you might get such a cheap CO2 sensor/the name of it? I've had trouble finding them for less than £60 in the UK and would like to set one up.

https://www.co2meter.com/collections/sensors has a bunch of different ones, I usually look on Mouser also. I don't have a name of one currently. I've been using the particle.io platform with a particle device/LTE for sending out data and programming them.

None of them are in the 8$ range. There also seem to some copies which are way overpriced.

Re: Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

#115

Earlier quoted context omitted.

I'm having trouble recounciling that with the study that shows cognitive decline, can you explain your wife's thinking?

The short answer is that we're great at compensating for CO2 variation, but only if it's constantly elevated for days or more. 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…

Thanks for the high quality response!

Re: Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

#116
post #95
post #59

Earlier quoted context omitted.

Slight aside, anyone know why all the supposedly iot-oriented small arduino devices are IPv4-only? Is everyone deploying them in some kind of NATs + port forwards / upnp system or tunneled overlay IPv4 network using external gateway devices?

Seems that both "official" SDK for esp8266 and its Arduino port support ipv6 out of the box: https://github.com/esp8266/Arduino/pull/5136 . esp8266-nonos-sdk/esp8266-rtos-sdk/esp8266-arduino uses lwip as tcp/ip stack, which supports ipv6.

Awesome. The Arduino port "IPv6 support" issue was closed 9 days ago too. No other IPv6 related issues reported yet. Off to look for reports from elsewhere of people using it...

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 :)

Re: Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

#118
post #70

Earlier quoted context omitted.

For those who are wondering about 'changed my life': Tom Scott uploaded a video about CO2 and its influences a few days ago. it's a good palce to start research: https://youtu.be/1Nh_vxpycEA

Also DHH presenting about this at Basecamp from a few months ago: https://youtu.be/MRqh8oLY7Ik

This is what I was looking for!

Re: Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

#119
post #93

I wanted to do this in my office and was told, "if we find out something is wrong then we'd have to fix it." facepalm

I think it's safe to say CO2 levels in your office are already over the limit with coworkers making arguments like that lol

The company saved $25 though!

Re: Show HN: I wanted to measure CO2 in my office, so I build a C++ WebServer/App

#120
post #35

Earlier quoted context omitted.

Did you search for... "co2 meter python"? The pypi package called "CO2meter" ( https://github.com/vfilimonov/co2meter ) not only works well as a library on Mac OS, but also comes with a web-based dashboard: $ pip install CO2meter flask pandas ... $ co2meter_server Edit: link

Though with your steps it at least starts, but the webserver fails, and CTRL+C doesn't work ^^ * 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] Traceba…

co2meter_server writes measurements to "logs/co2.csv" in the current working directory every 30 seconds or so. As long as there is no measurement, you'll get this error from the web app trying to access the file. Just wait a minute and refresh the page.
Post reply on HN