Good Idea

Story: Build a Pi weather stationTotal Replies: 8
Author Content
dotmatrix

May 24, 2016
9:10 AM EDT
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...
mbaehrlxer

May 24, 2016
10:07 AM EDT
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.
penguinist

May 24, 2016
10:28 AM EDT
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.
dotmatrix

May 24, 2016
10:47 AM EDT
>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.
mbaehrlxer

May 24, 2016
1:40 PM EDT
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.
cybertao

May 24, 2016
2:10 PM EDT
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.
dotmatrix

May 24, 2016
2:51 PM EDT
>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.
mbaehrlxer

May 25, 2016
4:35 AM EDT
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.
dotmatrix

May 25, 2016
3:56 PM EDT
>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.

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!