Live data from Hacker News

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

github.com

41–50 of 124 posts

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

#41
post #17

Earlier quoted context omitted.

You are right, C++ is overkill. It would be much better if it was a javascript application with thousands of dependencies.

ahh so you're in the camp of wanting to re-create a graphing library for every project..

ahh so you're in the camp of outsourcing your development cost to the user's hardware.

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

#42
post #38
post #19

Earlier quoted context omitted.

It could be dangerous if the room is completely sealed, as the oxygen would eventually run out.

Fun fact: humans do not have oxygen levels detection, but do have CO2 levels detection. Your body would ring all kinds of the alarm bells if CO2 levels rise above the norm, even if there is enough oxygen.

Its not that I'm afraid to die here :) Its more about improving the quality of the air. And the body is pretty bad at recognizing higher than norm CO2 level unless it gets to life threatening levels. ( https://youtu.be/1Nh_vxpycEA?t=45 )

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

#44
I am new to this one. I always wonder about accuracy. I think it depends on where you place your sensor in the room matters. If it is in place where lot of window air is hitting, it might alter the values. Or am I completely wrong? Or are you using multiple devices to get the average of those devices?

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

#46
post #17

Isn't C++ a bit overkill for a web app?

You are right, C++ is overkill. It would be much better if it was a javascript application with thousands of dependencies.

There are memory-safe languages that aren't Javascript, you know

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

#47
I would have just had the CO2 level read via a $8 I2C device connected to an Esp8266/Esp32 running Arduino.

I would post the result to a web service in this fashion from the Esp8266:

https://techtutorialsx.com/2016/07/21/esp8266-post-requests/

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.

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

#49
post #45

Architecturally speaking this should be a super simple script that pulls the sensor data into a database for any use instead of a custom written http server that manages the sensor.

Yes, I agree. But this was way more fun :)

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

#50
post #44

I am new to this one. I always wonder about accuracy. I think it depends on where you place your sensor in the room matters. If it is in place where lot of window air is hitting, it might alter the values. Or am I completely wrong? Or are you using multiple devices to get the average of those devices?

Yes, absolutely. I only have one device at the moment, but it sure would be interesting to see how fast the levels equalize between rooms
Post reply on HN