PragmaticBookshelf

PragmaticBookshelf

Forum Sponsor

Build a Weather Station with Elixir and Nerves (PragProg)

Alexander Koutmos
Bruce A. Tate @redrapids
Frank Hunleth @fhunleth

edited by Jacquelyn Carter @jkcarter

The Elixir programming language has become a go-to tool for creating reliable, fault-tolerant, and robust server-side applications. Thanks to Nerves, those same exact benefits can be realized in embedded applications. This book will teach you how to structure, build, and deploy production grade Nerves applications to network-enabled devices. The weather station sensor hub project that you will be embarking upon will show you how to create a full stack IoT solution in record time. You will build everything from the embedded Nerves device, to the Phoenix backend and even the Grafana time-series data visualizations.

Elixir as a programming language has found its way into many different software domains, largely in part to the rock solid foundation of the Erlang virtual machine. Thanks to the Nerves framework, Elixir has also found success in the world of embedded systems and IoT. Having access to all of the Elixir and OTP constructs such as concurrency, supervision, and immutability makes for a powerful IoT recipe. Find out how to create fault-tolerant, reliable, and robust embedded applications using the Nerves framework.

Build and deploy a production grade weather station sensor hub using Elixir and Nerves, all while leveraging the best practices established by the Nerves community for structuring and organizing Nerves applications. Capture all of your weather station sensor data using Phoenix and Ecto in a lightweight server-side application. Efficiently store and retrieve the time-series weather data collected by your device using TimescaleDB (the Postgres extension for time-series data). Finally, complete the full stack IoT solution by using Grafana to visualize all of your time-series weather station data. Discover how to create software solutions where the underlying technologies and techniques are applicable to all layers of the project.

Take your project from idea to production-ready in record time with Elixir and Nerves.


Alexander Koutmos has been writing software professionally for almost a decade and has been working primarily with Elixir since 2016. He currently maintains a few Elixir libraries on Hex and also runs a software consultancy (www.stagira.com).

Bruce Tate is a kayaker, programmer, and father of two from Chattanooga, Tennessee. The author of more than 10 books has been around Elixir from the beginning. He is the founder of Groxio, a company that trains Elixir developers.

Frank Hunleth is an embedded systems programmer, OSS maintainer, and Nerves core team member. When not in front of a computer, he loves running and spending time with his family.


Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:


Posted via Devtalk (see this thread for details).

Most Liked

stefanluptak

stefanluptak

OK, so I found an european e-shop, that has all the parts in stock, except for the Raspi. Raspi is in stock in another e-shop we have here. Also, I didn’t link the MicroSD card + reader and the micro USB cables, since I own these already. Hope this could help somebody. :slight_smile:

akoutmos

akoutmos

Author of Build a Weather Station with Elixir and Nerves

:partying_face: Beta 2 of the book has just landed :partying_face:

Feel free to check it out at: Build a Weather Station with Elixir and Nerves: Visualize Your Sensor Data with Phoenix and Grafana by Alexander Koutmos, Bruce A. Tate, Frank Hunleth

The updates for this beta include the addition of chapter 4 and chapter 5 as well as addressing some errata. Chapter 4 goes over how to publish data from your Nerves device to a Phoenix API that you will be writing. The Phoenix API is backed by TimescaleDB so you can store and query all that time-series goodness :wink:. Chapter 5 goes over how to set up Grafana and how to visualize your time-series data that is stored in TimescaleDB. By the end of the book you’ll be able to build a (near) real-time weather dashboard like so:

Be sure to check it out and feel free to reach out with any feedback! Happy hacking :slight_smile:.

margareteldridge

margareteldridge

@lucaong We do have another Nerves book in the works – stay tuned. I am not sure when it will be ready for beta as only a few chapters are written so far.

Where Next?

Popular in Books Top

AstonJ
by Benjamin Tan Wei Hao The Little Elixir & OTP Guidebook gets you started programming applications with Elixir and OTP. You begin w...
New
shankardevy
Dear Elixir Alchemists I’m happy to share that I’m working on my 2nd series of books (See my first one here) and this time it’s about As...
New
meraj_enigma
New book from Packt publication that goes into teaching how to write a web framework using Elixir. About this book Elixir’s functional...
New
AstonJ
By Simon St. Laurent If you’re new to Erlang, its functional style can seem difficult, but with help from this hands-on introduction, y...
New
AlchemistCamp
EARLY ACCESS (currently in writing, estimated length: 40 pages) Hi. I’m Mark and over the past two and a half years, I’ve been teaching ...
New
PragmaticBookshelf
Sean Moriarity @seanmor5 edited by Tammy Coron @Paradox927 From finance to artificial intelligence, genetic algorithms are a powerful to...
New
benwilson512
by Bruce Williams and Ben Wilson Your domain is rich and interconnected, and your API should be too. Upgrade your web API to GraphQL, le...
New
PragmaticBookshelf
Svilen Gospodinov edited by Jacquelyn Carter @jkcarter Learn different ways of writing concurrent code in Elixir and increase your appli...
New
mchean
By @emadb OVERVIEW Author Emanuele DelBono guides readers along the first steps of mastering the Elixir programming language in Elixi...
New
collegeimprovements
by @whatyouhide and @idlehands Elixir offers new paradigms, and challenges you to test in unconventional ways. Start with ExUnit: almost...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31265 143
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement