Advanced

Build a Pi weather station

Posted by bob on · 9 comments
Linux User & Developer – the Linux and FOSS mag for a GNU generation
Mail this story
Print this story

Discover what you need to build your own Pi-based weather station

Full Story

  Nav
» Read more about: Groups: GNU, Linux, Developer; Story Type: News Story

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (9)

I've been meaning to do this sort of thing... however I've been working on the thought process of the web interface and have generally decided that it's probably a better idea to make the sensor data available through an email interface.

Why an email interface rather than a web interface?

An email interface has no requirement for an Internet facing server and any email address can be used. This means the weather station can be placed anywhere, and could even use a public wifi connection.

I'm envisioning a plain text command parser/processor and a small set of commands which will result in data being emailed back to the requester.

Ex:

Subject: Pi Weather Body:

@Format: csv, png @Temp: avg, 2016-01-01, 2016-02-29 @Pres: hr, 2016,04-30

****

Which would then respond by sending the daily average temperature for Jan through Feb and the hourly pressure reading for April 30... as attachments in csv format and png graphics.

There are also neat things like lightning sensors...
intriguing. you make a good point. the device can poll for emails from any public server, and send them the same way.

you could probably use other messaging solutions that way too. (xmpp for example or irc. lot's of irc bots for remote control exist, so there ought to be some reusable one there too)

most other options would require your own server.

greetings, eMBee.
I have deployed several RPi-based security cameras and I've noticed that it is really easy to add a temperature/humidity sensor to an RPi using the DHT22 sensor (three wire direct connection), so each cam also doubles as a mini weather station with little extra cost expenditure.

For a user interface, I'm doing communication through certificate-based ssh connections with a centralized UI that has scripted access to all devices both on-site and off-site for display and archiving.

Linux is so very flexible, there are undoubtedly a multitude of ways to customize access and view the data without having to resort to "The Cloud" as commercial vendors would like to have us believe.
>Linux is so very flexible, there are undoubtedly a multitude of ways to customize access and view the data without having to resort to "The Cloud" as commercial vendors would like to have us believe.

Agree...

However, I would personally recommend that anyone with a yearly budget of $120.00 ... rent a small Linode server with that money... A small Linode server is plenty of computing power to support a family's needs.

https://www.linode.com/pricing

Linode wrote: $10/mo
  • 1 GB RAM
  • 1 CPU Core
  • 24 GB SSD Storage
  • 2 TB Transfer
  • 40 Gbps Network In
  • 125 Mbps Network Out


IMO: $120.00/year is worth avoiding the PII stealing adware "Cloud" as well as ensuring complete flexibility in all configuration items. However, I do need to do all the patching and backups myself... but I don't mind, and in fact, enjoy doing that myself.
money is not necessarily the problem, but time to maintain the server is.

dotmatrix approach has the beauty that it does not depend on specific cloud services but uses general public infrastructure. any mail-server will do. should the selected server become unavailable, just change to another one without any recoding. email is not going to go away any time soon.

greetings, eMBee.
Services like Twitter can be useful as well. Tweets can be made by encoding the information in a url, and once had a cron script that tweeted server information and statistics using calls to wget.
>using calls to wget.

wget is soooo last year... the cool kids are all using curl.

>dotmatrix approach

So, it's a good idea? Should I start coding the parser?

Warning: Professional programming is not something I'm famous for... and I generally need a kick to get going on something new.
it's your itch, you scratch it in any way you see fit :-)

i would look at the alternatives i suggested just to see whether an email interface is really what you want. (an irc interface is more interactive and immediate in its response, it also doesn't have to deal with spam sent to the mailbox you'll be using, and you can probably fork an existing irc bot and modify it. so if you are concerned about lack of programming fame, then limiting the amount of code you need to write is probably a good idea)

greetings, eMBee.
>so if you are concerned about lack of programming fame, then limiting the amount of code you need to write is probably a good idea

Good point... I'm neither 'in it for the fame' nor 'famous for the code' ...my coding is generally utilitarian.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post