Smart Weather Archive for Cheap Local Storage

I have successfully captured an entire 24 hour period and did not lose a single packet.

The next step is to write a query API to return data in JSON.

1 Like

What is it you want done?

1 Like

@dan.gealt

How was your first day with capturing data?

1 Like

The Raspberry Pi capture is working great! Working on some SQL queries for it now . . . maybe turn them into some scripts to make my daily NWS Co-Op Observer data gathering as simple as running a script.

Only one odd situation in the data (not in the capturing) . . . and it may be related to one of the devices going offline for a while. Here is an example of some of the odd data (the query that produced it was just selecting records with air_temperature <= 0. Not sure why the serial_number looks the way it does.

But . . . other than that data oddity . . . the local archiver is working perfectly. Thanks for your efforts!

40%20PM

2 Likes

a device with a strange serial number is a known bug. It will be address in the next firmware release.

I suggest you reboot HB-00001889.

Gary

I thought I remembered reading about that bug . . . memory is great - wish I had one.

Will reboot that Hub.

2 Likes

I’m thinking about writing a post processor to convert the data to values used by the station. Then pull and store values such as low, high, average, total, time and other values as appropriate.

1 Like

That sounds great! I’m playing with that sort of project, but I am sure that you’ll be done way ahead of me.

2 Likes

I think I have everything configured. The process now survives a reboot of the Pi.

I’m going to start fresh and go through the entire installation again. So far I’m very pleased with how it’s working.

I have the scripts and setup instructions ready for those the would like to test.

The script runs in the background under the “Pi” user and fully survives a system boot.

Please let me know if you would like to test.

The next step is to incorporate this into NodeServers to allow queries so the nodeserver can retrieve high, low and trend values.

I’ll keep testing. Probably not on a pi initially though, my old PI doesn’t seem to like the nodejs mysql install.

1 Like

These Pi units are great. I’m going to order 10 more.

The latest files are now online.

Well @GaryFunk, the latest written version of the installation steps worked perfectly for me the other day . . . and the WF Archiver is doing exactly what I expected it to do. The best part, for me at least, is that I can write SQL queries against the data (using Sequel Pro on Mac OS/X to read the MySql data from the Raspberry Pi). Thanks for building this!

Dan.

1 Like

I have another Pi 3B+ on the way already . . . should be here Friday. I am sure I’ll order more, too.

1 Like

The latest instructions show you how to keep it running in the background and the script has more error handling.

1 Like

The Pi is a great device. You can have local storage and processing for around $60.

1 Like

With this you can have the nodeserver pull the previous three hours of pressure data if needed. Also yesterday’s values.

For those that are really OCD I will put two Pi units in a cluster and synchronize them. If one unit needs to reboot the other will keep storing data. Then when the unit comes back online it will pull the lost data.

I have been using the archiver to do some precipitation comparisons between SKY and my 4" NWS/CoCoRaHS gauge. Simple to write a query that selects and totals the SKY precip from time A to time B (and converts the units, too).

1 Like

Are you planning to use DB sync via MySQL for this?

1 Like

I don’t know what I will use.

Changes in the latest version.
Added more logging.
Added scheduling.
Added shutdown control.

This is a sample of the logging.

2018-04-06 03:10:43 Starting WFArchiver v1.0.2
2018-04-06 03:10:43 Listening on: 0.0.0.0:50222
2018-04-06 04:00:00 WFArchiver is running

2 Likes