Bits of Geekery

Building a Raspberry Pi weather station with Elixir/Nerves – Part 1

My house is at the top of a hill, and no weather stations are close enough to accurately determine the wind speeds. Being the nerd that I am, knowing the current and historical wind speeds is something I would love to play with. I am most interested in the wind speeds during storms. Being able to use Elixir to build this project makes it even more fun!

Parts List

I sourced parts from Adafruit and Amazon. The smoke case and power supply that I planned on purchasing were out of stock. Begrudgingly I had to order a different case and use Amazon for the SD card/power supply. Adafruits pricing for SD cards couldn’t compete with Amazon.



The 30_000 foot view is to create a web interface to view live and historical weather information for my back yard. The overall weather station project will consist of multiple actions/projects:

  • Data collection from sensors
  • Sending data over HTTPS to an API layer for persistence
  • Exposing data via HTML / JS to the end user (me)

All code written for this project will be open sourced and published on my Gitlab account. You can follow along using my blog and possible twitch streams. If a package isn’t available on to process the 1-Wire Dallas protocol, one will be created.

To avoid running power to the shed, which is roughly 111’ from the house, solar power is required. During the winter, sun might become rare, thus a decent battery system is also needed.


This project is a bit daunting because I generally avoided hardware projects, but a weather station has been an itch I’ve wanted to scratch for a long time. When I found out about Nerves it was an easy decision, Elixir and hardware was too cool to not play with.

Another challenge will be reading the temperature from the sensor using the 1-Wire Dallas Protocol. More sleuthing needs to be done to find packages which can parse this, or I will create one on my own. My bet is a large chunk of my time will be writing the library for parsing the protocol. As I plan on open sourcing it, tests/dialyxir/docs will all have to be included, adding time. I believe any open source project should have those items mentioned, at least.


Once the parts arrive I will load the OS, and boot the Pi. The sensors will be be connected to the GPIO using female connectors cut in half, and soldered to the wires of the sensors. I hope this works, if you have suggestions feel free to let me know via Twitter or frank AT kumro DOT io. Nerves will be setup and a new project created. Reading from the sensors will be the first few steps. Persisting to an API (which doesn’t exist yet) is the last step as it has unmet deps.


  • Wind speed
  • Temperature
  • Persisting to API

Part #2 has been posted.

Frank Kumro
Hi, my name is Frank Kumro. Writing Elixir and building hardware projects is a passion of mine. I enjoy sharing what I learn and hope it inspires others to do the same.