Live data from Hacker News

Cutting through the smog: making an air quality bot with Haskell

engineering.linecorp.com

11–12 of 12 posts

Re: Cutting through the smog: making an air quality bot with Haskell

#11
A good article! I agree with another commenter that explaining the language extensions would have been good.

I liked the comment at the end:

>> It’s the same bot as we have detailed in the tutorial with the exception that it uses PostGIS instead of a transactional variable to store users.

I am not a Haskell expert (I use Haskell a lot but I consider myself a student) so this is probably horrible advice, but recently I have started using embedded SQLite for transactional data instead of TVars. In some sense it is the same thing since the Simple SQLite wraps the SQLite code in an IO. I always try to minimize impure code. I write as much pure code as I can in a REPL and then study/research how to handle the impure parts.

Re: Cutting through the smog: making an air quality bot with Haskell

#12

On a related note, I've been looking for a good sensor that is hopefully plug & play and reliable for integration with home assistant. Is something like https://www.banggood.com/Geekcreit-Nova-PM-Sensor-SDS011-Hig... really the best way to go about it rather than an Awair? Would be keen on VOCs and CO2 as well. edit: Looks like esphome with the following low-cost sensors is the way to go: * MH-Z19 for co2 (or CCS811…

This looks like an interesting project: https://learn.pimoroni.com/tutorial/sandyj/enviro-plus-and-l... This sensor also looks good: https://shop.pimoroni.com/products/adafruit-sgp30-air-qualit...

Thanks for the link, already ordered the other sensors. Looks like SGP30 isn't quite as easy to use with ESPHome right now, so something to upgrade to within a year. Its really amazing how great the ecosystem is with ESPHome, I was always a bit scared buying the chips and getting really DIY with the likes of Arduino but this is no more difficult than most other tech.
Post reply on HN