Raspberry Pi Oracle Weather Station FAQs

General

What is the Raspberry Pi Oracle weather station project?

What does it do?

Why is it in kit form?

Who has a weather station?

Can my school still get one for free?

Can I buy one?

Can I make my own?

How do I access the data from all the other schools?

How do I set it up?

How do I build the kit?

How do I install the software?

I know a bit about the Pi and Linux—what’s the quickest way to get up and running?

Where do I get the credentials (username and password) to put into the credentials.oracle file?

Hardware specifics

What’s the soil probe for?

Can I extend the soil probe cable?

What is the RTC?

Why is there a spare sealing gland in the kit?

Where should I install my weather station?

What are the dimensions of the pipe needed to mount the wind direction and wind speed sensors?

Do I need to make my own Ethernet cable, crimping connectors and so on?

Are we allowed to modify / hack our weather station?

Troubleshooting

Why do I get errors when I run log all sensors or the  i2cdetect command?

Why do I get error when trying to connect to the Oracle database?

The pressure and altitude readings are wrong, how can I fix this?

Why do my temperature readings seem high?

Why is my time wrong?

The rainfall reading resets every day. How can I log the total rainfall for a set period?

How can I control and view my weather station without connecting it to a monitor and keyboard?


General

What is the Raspberry Pi Oracle weather station project?

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.

What does it do?

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.

Why is it in kit form?

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.

Who has a weather station?

Thousands of schools applied and we picked 940 schools in 78 countries.

Can my school still get one for free?

No, all weather stations have been allocated.

Can I buy one?

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.

Can I make my own?

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.

How do I access the data from all the other schools?

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.

How do I set it up?

How do I build the kit?

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!

How do I install the software?

You have two options:

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.

I know a bit about the Pi and Linux—what’s the quickest way to get up and running?

Follow Dougie Lawson’s guide on the forums.

Where do I get the credentials (username and password) to put into the credentials.oracle file?

It’s in the weather station tab in the control panel on the Oracle website.

  1. Log into the database:
    ws home page2. Click on the Weather Stations menu tab:
    ws menu tab
  1. 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.

Hardware specifics

What’s the soil probe for?

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.

Can I extend the soil probe cable?

Yes, you can splice in a cable, perhaps an old Ethernet cable, to extend the probe.

What is the RTC?

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.

Why is there a spare sealing gland in the kit?

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.

Where should I install my weather station?

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.

What at the dimensions of the pipe needed to mount the wind direction and wind speed sensors?

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.

Do I need to make my own Ethernet cable, crimping connectors and so on?

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.

Are we allowed to modify / hack our weather station?

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.

Troubleshooting

Why do I get errors when I run log all sensors or the  i2cdetect command?

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

Why do I get error when trying to connect to the Oracle database?

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 and altitude readings are wrong, how can I fix this?

The pressure sensor gives a relative reading and needs to be adjusted to your particular location/pressure. See the advice on the forums.

Why do my temperature readings seem high?

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.

Why is my time wrong?

The weather station uses Coordinated Universal Time (UTC) so that all entries to the Oracle database will be logged properly and allow meaningful comparison.

The rainfall reading resets every day. How can I log the total rainfall for a set period?

Use the MySQL command :

select DATE(CREATED), SUM(RAINFALL) as rain FROM WEATHER_MEASUREMENT WHERE (DATE(CREATED) = CURDATE());

How can I control and view my weather station without connecting it to a monitor and keyboard?

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:

  1. 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.
  2. 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:

  1. Install xrdp on your Pi. At the terminal type:
sudo apt-get install xrdp
  1. Find the IP address of your Pi.
  2. Start Remote Desktop Connection on your PC, enter the IP address and hit “Connect”.
  3. 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!