7 ms·
Build a weather station with Elixir and Nerves
- cfeduke 5y agoI started putting together a parts list on sparkfun but many of the authors' recommended components were listed as out of stock with no known return date. I tried to do similar at adafruit but some components would have to be substituted. I don't know enough about electrical engineering and component picking to make the right substitution choice here, and wasn't prepared to commit too much free time to trial and error. My guess is people who do know what to substitute and how to work around any necessary changes here are already too advanced to be an audience for this book. Seems like bad luck on the timing for the release of this book that components would just be unavailable, or maybe its just bad luck with the worldwide chip shortage. If a separate manifest of usable parts appears I'd likely dig into this title.
- atonse 5y agoIt would be nice if someone made a pcpartspicker for electronics, and used digikey. That way you can have replacements. I don’t have a solution but that would be nice.
- vvanders 5y agoDepending on what you want to do you can get away with a RPi and RTL-SDR which are pretty widely available. Most wireless weather stations use ISM bands, I used RTL_433[1] to pull the raw data and quite a few popular stations already have the format documented. Combine with InfluxDB+Grafana+simple polling script/program and you can do a bunch of fun stuff with it. Have the whole thing wrapped with docker compose and just runs in the backgound. [1] https://github.com/merbanan/rtl_433 https://github.com/merbanan/rtl_433
- goatsi 5y agoWould you be willing to throw your docker file up somewhere? I have a RTL-SDR and an underutilized pi4 that this sounds perfect for. I've even seen some of the weather stations in the vineyards near my house.
- myth_drannon 5y agoMaybe the authors can suggest alternatives
- Dkuku 5y agoThanks to the chip shortage I wrote a driver for part that I already had in my drawer - nice learning experience
- deleted 5y ago[deleted]
- MatthiasWandel 5y agoI don't understand. Why all these software tools for publishing and managing the data. Why not just put the data in a csv file from a python script, then use gnuplot to plot it when requested from a web server running on the pi. Reminds me of the recent hacker news post "is this madness ever going to end?" https://news.ycombinator.com/item?id=29898030 https://news.ycombinator.com/item?id=29898030
- anaganisk 5y agoSounds very much like the infamous Dropbox comment.
- ReleaseCandidat 5y agoBecause this isn't meant as a way to get a weather station running as fast as possible, but as a toy project to learn more complex stuff.
- exdsq 5y agoI agree, although I think the purpose is to teach Elixir and Nerves. On a side note your website, https://woodgears.ca/ https://woodgears.ca/, is awesome. If anyone sees this comment check out https://woodgears.ca/marbleadd/index.html https://woodgears.ca/marbleadd/index.html
- jtsiskin 5y agoI don’t get it. Why would you build a wooden machine with marbles, just to add numbers together? Just use an excel spreadsheet, or a $1 calculator. When will this madness end?
- exdsq 5y agoAn excel spreadsheet would require an entire computer! This just requires household objects. And a calculator includes so many unnecessary features like division, it’s a lot of scope creep.
- argvargc 5y ago
- brightball 5y agoI’d been waiting for this book to come out. Seems like a fun way to learn whenever the parts are more available.
- freedomben 5y agoI haven't read the book yet but I was perusing the code and two big things struck me. It's possible I missed something, so please correct me if I'm errant. 1. There is no Phoenix UI. The Phoenix app has no views and only one endpoint, and API for recording "weather conditions". That said there is a Grafana dashboard that seems like it would be great, so I don't think you really need a Phoenix UI. 2. There are no tests, so if you (like me) were hoping to also see how testing is done in Nerves (and even Phoenix though this isn't a book to teach you Phoenix) you will be a bit disappointed. An exciting title though, and as soon as the components are back in stock I'm excited to build it.
- whalesalad 5y agoWoohoo! I really love the Nerves project. I have been slowly working on a project to build a rpi4 powered motorcycle racing timer. The goal was to use sensor fusion to get high accuracy. A friend of mine is a semi-pro motorcycle racer and didn't want to pony up for an Aim Solo device. I bit off a lot more than I could chew: learning elixir, i2c and embedded device programming simultaneously. I didn't see any libraries for interacting with Ublox GPS devices so I started writing my own. Learning how to read a datasheet, how to read/parse/construct binary messages and control the state of the various devices. I made the gradient too steep for myself and ended up kinda abandoning everything. Friend ended up buying the Aim Solo :( I eventually did get the API to a stable enough point where I could power on the device, configure it as needed, and then read a constant stream of positioning/time data. My next steps are probably the easy part (sending the data up to an API, or collecting it internally for the sensor fusion bits), but I am kinda burned out. I am probably over thinking it - I shouldn't hold myself to such a high standard since I am learning so many new concepts at once. I'm definitely going to grab this book. I have been in software for a long time but have never done low-level driver/device programming so I don't know the "idomatic" way to do things. For instance, a lot of devices need to warm up, then get configured to operate a certain way, and then you can read data from them. But I am used to request/response style programming, not dealing with a shared memory space that the you and the device are both reading/writing from together. I'm also completely in love with the actor model, but coming from a more traditional background struggle here with intuition on how to structure supervisors and such.
- jagged-chisel 5y ago“Elixir is a dynamic, functional language for building scalable and maintainable applications.” [1] “Nerves is the open-source platform and infrastructure you need to build, deploy, and securely manage your fleet of IoT devices at speed and scale.” [2] 1 - https://elixir-lang.org/ https://elixir-lang.org/ 2 - https://www.nerves-project.org/ https://www.nerves-project.org/
- GreenWatermelon 5y ago> Simply bring your code and scale up. reminds me of > MongoDB is scalable, you turn it on and it scales right up https://youtu.be/b2F-DItXtZs https://youtu.be/b2F-DItXtZs
- bmitc 5y agoInteresting book. I got it ordered to check it out. Does anyone have any interesting examples of Nerves or Elixir Circuits being used in industry and not by the developers of Nerves? I tried using Elixir Circuits a while back for a simple project but found it a little non-standard and got the impression it's only used by the few people developing it.
- dognotdog 5y agoI’ve just finished an rpi based device that would be going into mass production if it wasn’t for the parts shortage, with some digital IO and I2C. It took me about a year calendar time to convert the software stack to elixir+nerves as a side project, with many improvements just because of the good infrastructure support for remote deployment. Circuits wasn’t particularly weird, though it had only limited support for some advanced GPIO functions.
- bmitc 5y agoAny details of the domain? I'm just curious, so if you can't share to protect the idea/IP, no worries. For me, I ran into a limitation of Circuits.UART and didn't get the feeling that the maintainers cared to improve it beyond their own needs.
- windex 5y agoIs there an ongoing shortage of RPi Zero Ws? Cant find any in most places.