6 ms·
Hey there! My co-authors and I actually wrote a book on this topic earlier this year. It walks you though setting up a weather station with Elixir and Nerves us
by akoutmos 4y ago
Hey there! My co-authors and I actually wrote a book on this topic earlier this year. It walks you though setting up a weather station with Elixir and Nerves using a Raspberry Pi and the following sensors:
- VEML6030 light sensor
- BME680 environmental sensor
- SGP30 air quality sensor
After you set up the hardware side of things, you put together a very simple Elixir Phoenix REST API and persist the sensor data into Postgres (with the TimescaleDB extension).
And to wrap up the book, you learn how to create Grafana dashboards to visualize all your time-series data.
Everything is meant to be set up on your LAN and everything can be run either natively or in Docker (there is a Docker compose file in the repo).
Hope that helps!
GitHub Repo: https://github.com/akoutmos/nerves_weather_station https://github.com/akoutmos/nerves_weather_station
Book: https://pragprog.com/titles/passweather/build-a-weather-station-with-elixir-and-nerves/ https://pragprog.com/titles/passweather/build-a-weather-stat...
- Terretta 4y agoSince OP mentioned not wanting to DIY, if people are looking for weather system with incredibly rich API and no moving parts (no Raspberry PIs either), this system is fantastic for people without workshop build time: https://weatherflow.com/tempest-weather-system/ https://weatherflow.com/tempest-weather-system/
- akoutmos 4y agoTo clarify, the OP said: "I have neither time nor workshop space to solder and assemble anything more trivial than "plug a sensor into an ESP32 and screw both into a box"." The book is very much "plug in a sensor" style as everything is connected via Qwiic cables.
- shkkmo 4y agoThat looks like it doesn't have any local-first functionality? Their API documentation only talks about how to retrieve data from their server, even if you are just trying to get the data from your own station.
- Terretta 4y agoThe device has an API, as does their "Hub" that reports the device to cloud. You may find tools under different names like tempestwx or etc. That said, the point of this system is microcell climate computation, and it works best when part of the public grid of sampling points.
- shkkmo 4y agoDoes it? I couldn't find any documentation on those features, if you have links to any documentation that doesn't require going through their servers I'd love to see it since I've been looking for something just like that. Everything I have found, even for querying a single devices, requires making a request to swd.weatherflow.com via an internet connection. EDIT: I was eventually able to find this: https://apidocs.tempestwx.com/reference/tempest-udp-broadcast https://apidocs.tempestwx.com/reference/tempest-udp-broadcas... So it is possible to get the data locally, but it seems like they are pretty strongly discouraging its use.
- circularfoyers 4y agoHaving said that, there's plenty of people using this method[1]. I particularly like the work this person did presenting that data in Grafana[2]. [1] https://community.weatherflow.com/c/developers/5 https://community.weatherflow.com/c/developers/5 [2] https://github.com/lux4rd0/weatherflow-dashboards-aio https://github.com/lux4rd0/weatherflow-dashboards-aio
- shkkmo 4y agoThanks for those links, I'll check them out!
- anxrn 4y agoThis looks good, but this is an outdoor weather station. OP is asking for an indoor air quality monitory.
- TeMPOraL 4y agoTrue. That said, it's still interesting to me, because an outdoor weather station is something I've also been eyeing, and also having trouble to find something that a) logs data, but b) not to a cloud.
- Terretta 4y ago> This looks good, but this is an outdoor weather station. OP is asking for an indoor air quality monitory. I replied with an indoor no-DIY suggestion and code at top level: https://news.ycombinator.com/item?id=33774695 https://news.ycombinator.com/item?id=33774695 > I actually wrote a book on this topic earlier this year. It walks you though setting up a weather station... ... and replied to this from immediately above with a similarly no-DIY weather option.
- rngname22 4y agoConfused here, isn't 'indoor air quality' primarily about CO2 levels, particulate matter, VOCs, etc.? I don't see any of that in there.
- Terretta 4y agoPlease note I replied to a comment about a book about a weather station. Top level, I replied about CO2 levels, VOCs, etc: https://news.ycombinator.com/item?id=33774695 https://news.ycombinator.com/item?id=33774695
- deleted 4y ago[deleted]
- Havoc 4y agoHave you actually gotten any reliable co2 data out of the bme680? Even with the Bosch library and their calibration the values seem rather odd at times
- gsich 4y agoYeah, it's only a propietary approximation.
- akoutmos 4y agoWhen developing the book, I didn't have any additional meters or sensors to cross reference measurements with so I can't comment on the accuracy unfortunately. But I did notice that the changes in measurements made sense when the environment changed. I.e when I would exhale on the sensor, the measurement would rise and fall. Another example was when I opened my window in my office. CO2 immediately dropped off (15:42 timestamp): https://twitter.com/akoutmos/status/1443233937015418891/photo/1 https://twitter.com/akoutmos/status/1443233937015418891/phot...
- buran77 4y agoBoth the SGP30 and the BME680 have a big weakness that I experienced some years ago when I trying putting an air quality sensor together. They correlated the TVOC readings with the temperature. And sometimes it was bad, like a difference of just 1 or 2 degrees Celsius could double or triple the TVOC readings at the lower end of the scale (~50ppb), and add maybe ~50% at the upper end (~500ppb). Are you seeing the same behavior?
- Havoc 4y agoYeah same - there is definitely a practical cause & effect practical correlation, but also a lot of effect without obvious cause in an environment that should be relatively stable. (one person, small apt, no co2 sources) > additional meters or sensors I've got a CCS811 as well but no luck yet. Acquired 2nd hand so unsure if broken from shipping or I'm being stupid with code or I broke it while soldering
- 4y ago