Raspberry Pi Oracle Weather Station FAQs
The Raspberry Pi weather station is a weather station in kit form, controlled by a Raspberry Pi and a special add-on board called a HAT. It’s an educational tool aimed at teaching computing, engineering and data handling. Funded by a grant from Oracle, we have sent the kit, free of charge, to nearly 1000 schools in 78 countries.
It gathers data on rainfall, wind direction and speed, temperature, air quality, relative humidity and barometric pressure. It stores these data in a database on the Pi itself and can also upload to a central Oracle database so they can share and collaborate with schools around the world.
Because kits are fun and kits contain learning. By building the hardware yourself your gain a better understanding of how the sensors and other components work. By installing the software manually you learn all sorts of useful stuff, from using the Linux command line to basic programming. The challenge is the whole point! We also wanted students to be able to hack the weather station, adding a new sensor for example, or customising the cases.
Thousands of schools applied and we picked 940 schools in 78 countries.
No, all weather stations have been allocated.
Not at the moment. Whilst we would love to make them available to everyone, there are no firm plans at the present time to make and sell them.
Sort of. While you can’t make the official HAT itself, you can build a weather station controlled by a Raspberry Pi. Many of the sensors are freely available and some of our community are currently working on projects that use the same software as the official board.
We are currently working on a nice interface that will map weather stations and give access to the whole dataset. We will also publish the data as an open source set to accompany our upcoming education resources on data manipulation and visualisation.
Forget the leaflet that is in the box for now, and follow the instructions here. Do not put the Pi and boards in the plastic cases until you have set up and tested the software!
You have two options:
- Download the pre-built image and put it on an SD card.
- Start with a fresh SD card and follow our guide to install and configure the software.
Option 1 will get you up and running quickly.
Option 2 will take longer but you will learn lots of useful things on the way, as well as gaining a better understanding of the hardware.
Follow Dougie Lawson’s guide on the forums.
It’s in the weather station tab in the control panel on the Oracle website.
- Log into the database:
2. Click on the Weather Stations menu tab:
- Put the weather station name and passcode into your credentials file as per the UPLOAD YOUR DATA TO THE ORACLE APEX DATABASE section of the software guide.
The soil probe is waterproof probe that you can stick in the ground to measure ground temperatures. It’s optional. Some people have put it in a plant pot full of soil—although this does not measure real ground temperature it is a nice contrast to the air temperature which fluctuates more.
Yes, you can splice in a cable, perhaps an old Ethernet cable, to extend the probe.
The Real Time Clock is a battery powered clock that keeps the correct time even if the weather station is powered off. Note that as long as the weather station is connected to the internet it will set the correct time and date when it boots up.
The three supplied glands are 2xM20 and 1xM16. One of the M20s and the M16 are for the network cable (gives a choice between making your own or using off the shelf Ethernet cables.)
The other M20 gland is for the RJ11 connection cable that joins the main HAT to the air sensor board. Yes, it’s too big to seal the cable, but the connector would not fit through anything smaller. You will need to use tape or foam or Sugru or … anything lying about really! …to seal the cable at the main box.
It all depends on your school and environment! We’ve mounted them on walls, rooftops, fences, and even plumbing pipes stuck in the ground. As long as the sensors are open to the elements, then that’s fine. See the guide for more information.
The sensor tubes are about 17.5mm externally. Plastic 22mm plumbing pipe is slightly too small internally, but can be reamed out (aka scraped with a penknife) to make them fit. Our Raspberry Pi Towers demo setup is mounted this way.
No – you can use an off the shelf patch cable. If you do this you will need to use the larger (marked M20) sealing gland provided.
Absolutely! In fact we actively encourage it, from adding extra sensors to building a shelter for it to powering it by solar energy. If you do hack it, please let us know what you’ve done.
It’s very probable that the pins on the GPIO extender are not making good contact with the HAT, so none of the external sensors can be detected by the software. You can improve contact by bending the pins outwards.
Power down the Pi, then slightly bend the pins out by 1° or 2° from vertical so that they make a better connection. One way to use a small piece of plastic between the pins an give it a gentle push. Another is to put two credit cards in the gap between the pins then slightly open the gap by pushing the credit cards apart.
After that reboot the Pi, install i2c-tools if you’ve no done so and run i2cdetect -y 1 (see the software guide for more details) to see if the sensors and real-time clock are visible.
You should get something like this if all is working:
pi@beaufort:~ $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- UU 69 6a -- -- -- -- -- 70: -- -- -- -- -- -- -- 77
If you see Invalid Login Credentials, Error 500 or some other weird response this usually means that your credentials file is not set up properly. Either you have not edited it yet to add your weather station name and passcode, or you have made an error when editing it. This could be a missing semi-colon or a typo in the password for example.
Also check that the double quotes enclosing the name and passcode haven’t been deleted by mistake. The weather station name must match exactly and is case-sensitive.
The pressure sensor gives a relative reading and needs to be adjusted to your particular location/pressure. See the advice on the forums.
The sensors can get warm because they are in an enclosed space, or the box is in direct sunlight. Some people have had success by mounting a small 5v computer fan on the daughter board box to draw fresh air through.
The weather station uses Coordinated Universal Time (UTC) so that all entries to the Oracle database will be logged properly and allow meaningful comparison.
Use the MySQL command :
select DATE(CREATED), SUM(RAINFALL) as rain FROM WEATHER_MEASUREMENT WHERE (DATE(CREATED) = CURDATE());
There are a number of ways to do this. You can even set the weather station up without ever having to connect it to a monitor. This is called “running headless” and there are two main methods:
- Secure shell (SSH), where you use a simple command to type commands. This is the easiest method as there is no need to install any extra software.
- Remote desktop/Virtual Network Computing (VNC) allows you to view and use the desktop as if you were sitting in front of it. You will need to install extra software but some people prefer the graphical environment.
To use SSH follow the instructions here. Instructions for VNC desktop access are here—note that if you are using the disk image version of weather station software this will not work as a graphical interface is not installed.
For Windows users we recommend using Remote Desktop as follows:
- Install xrdp on your Pi. At the terminal type:
sudo apt-get install xrdp
- Find the IP address of your Pi.
- Start Remote Desktop Connection on your PC, enter the IP address and hit “Connect”.
- Login to xdrp with your Pi username and password (by default this is ‘pi’ and ‘raspberry’).
Thanks to everyone who has contributed to this FAQ, especially our resident forum experts Dougie, Texy and Jim, but also anyone else who has taken the time to share their experiences and help others.
If your question isn’t answered here, please visit our friendly and helpful forums and ask away– we’ll add it here!