DD-Weathernet is located at:
https://dd-weathernet.web.app
Overview
Weathernet is a complete fullstack system the acquires weather observation data from multiple stations, stores it in the cloud, and allows users to view the data in real time on an active web page.
Weathernet is comprised of 3 main components.: The weather station is custom built hardware which acquires and uploads the data. The back-end is implemented on Google Firebase and stores and distributes the data. The front-end web application uses React and Redux to give users and active real-time view that is tightly coupled to the information in the database.
The current implementation only has one active station, simply because I have only built one to date. The system is expandable to handle as many stations as the back-end capacity permits.
The Station
The station submits reports to the back end by sending a request to a URL via a WiFi internet connection.
This station is based on an ARM Cortex M0 microcontroller in an Arduino-compatible package. It is connected via SPI to an Atmel ATWINC1500 WiFi module that provides internet connectivity. The weather sensor is a Bosch BME280 which interfaces to the microcontroller via I2C.
The microcontroller itself was programmed with the Arduino IDE using C++.
The specification for a Weathernet station is flexible. The only requirement is that it is capable of acquiring weather data, formatting it into a compatible HTTPS request, and submitting that request to the internet. There are many options for implementing one.
Currently there is only one real station, the Las Vegas station, pictured, which is in my back yard. It is almost always running and transmits updates about every 5 minutes. The other stations are virtual stations. They are simulated with a Node script that periodically calls the OpenWeatherMap API to get existing data then submits it as if it were a weather station observation.
The Back-End
The back end is implemented using the Google Cloud Platform. The central component is a realtime database that stores all of the information used by the system. It contains detailed information about each station registered with the system, secure passkeys for each station used to authenticate weather reports, and an archive of all the weather reports received from each station.
A Google Cloud Function is used to handle the data reports. It is activated when a station submits its report via HTTPS. It verifies the authentication key in the report matches the station and if so adds the report to the database.
The Front-End
The front end is a web application implemented using React, Redux, react-redux-firebase and the Materialize framework. The integration of React, Redux and Firebase tightly couples the application to the database. Any database changes – new weather observations, new stations or station detail changes – are instantly reflected in all views in the web application.
Provided it is active, which it usually is, you will see the Las Vegas weather station updating about every 5 minutes in both the list and detail view.
The application is hosted using the Google Cloud Platform and is accessible at https://dd-weathernet.web.app.
Summary
Weathernet is a full-stack internet application. Developing it required competency with the following technologies:
- JavaScript
- React
- Redux
- Google Firebase / Google Cloud
- react-redux-firebase
- Materialize CSS
- Node.js and Node Package Manager
- HTML
- CSS
- C++
- Embedded microcontroller programming and Arduino
- I2C
- SPI