About This Title

Pages: 60
Published: October 2021
ISBN: 9781680509021
Edition: 1
In Beta

Skill Level Meter

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 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.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $18.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Oct 2021

Beta Books: What do I get?


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.

What You Need

To complete the Nerves weather station project in this book, you will need the following:

  • A Linux, MacOS, or Windows computer to build and deploy Nerves firmware images
  • A Raspberry Pi Zero W or any other Nerves supported target (https://hexdocs.pm/nerves/targets.html#supported-targets-and-systems)
  • A VEML6030 light sensor
  • An BME680 environmental sensor
  • An SGP30 air quality sensor
  • Qwiic connect cables for weather sensors

Resources

Releases:

  • B3.0 2021/11/18
  • B2.0 2021/09/27
  • B1.0 2021/08/23

Contents & Extracts

Note: Contents and extracts of beta books will change as the book is developed.

  • Introduction
    • What You Will Build
    • How to Read This Book
    • Running the Code Exercises
    • Online Resources
  • Elixir and Nerves for IoT
    • Why Nerves for IoT?
    • Time-Series Sensor Hub excerpt
    • Laying out the Architecture
    • Organizing Your Nerves Project
    • Assembling the Weather Station excerpt
    • Your Turn
  • Wirelessly Reading Sensor Data
    • Creating a Network-Enabled Sensor Hub Project
    • Getting on to the Network
    • Capturing Sensor Data
    • Your Turn
  • Aggregating Sensor Data
    • Wrapping Sensors in GenServers
    • Build the Firmware Project
    • Managing the Lifecycle excerpt
    • Your Turn
  • Publishing Sensor Data
    • Setting up Docker Compose
    • Creating The Phoenix Application
    • Publishing Metrics
    • Your Turn
  • Pulling it all Together
    • Adding Grafana to Docker Compose
    • Exploring the Data With SQL
    • Creating a Weather Dashboard
    • Your Turn

Author

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.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $18.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Oct 2021

Beta Books: What do I get?

Related Titles:

Skill Level Meter

About This Title

Pages: 60
Published: October 2021
ISBN: 9781680509021
Edition: 1
In Beta