This guide compares cloud services that a Raspberry Pi can connect to based on how easy they are to setup, and how much they cost.
Raspberry Pi can send sensor data to the cloud using a REST API or other interface offered by the cloud service provider. It typically costs between $1 and $10 per month for a cloud service to store and analyse sensor data. Free options, such as Pantry Cloud, are available to make it easy to setup a Raspberry Pi and learn about how to connect it to the cloud.
In this guide I looked at 8 different cloud services that a Raspberry Pi can connect to (as well as how to connect a Raspberry Pi to each of these services). The table below summarises the cloud services and how much they typically cost per month for a simple Raspberry Pi project setup (e.g. home automation).
|Cloud Service||Free Tier||Typical Monthly Cost|
|JSON Bin||Yes||$2 – $3|
|Azure IoT||Yes||$10 – $25|
|Google IoT Cloud||Yes||$1 – $2|
When estimating typical monthly costs, I assumed only a few devices were connected. Some of the prices seem high as they are designed to connect dozens of devices.
Further details on how to get connected to each cloud are below.
1. Pantry Cloud
Pantry Cloud is a JSON storage cloud service that offers a generous free tier. I’ve found it incredibly easy to sign up to Pantry Cloud and send data to it from a Raspberry Pi.
Pantry Cloud is great for Raspberry Pi projects that need to save small amounts of data to the cloud. Pantry Cloud offers 100mb of storage, which is enough for roughly 10 million temperature readings from the Raspberry Pi Sense HAT (including overheads associated with storing them as JSON).
Data saved by the Raspberry Pi to Pantry Cloud can be accessed by by any device using the API key. The API key is given to you when you first create an account (no password needed). This can make it a little less secure than some of the other cloud options here which require authentication (username and password) before interacting with the cloud data. The plus side is that it’s much easier to communicate with a cloud service that doesn’t need a password, at least in my experience.
To setup Pantry Cloud on Raspberry Pi:
- Provide an email address on their website here to get a free API key (no password required)
- Open up Python on your Raspberry Pi and import the
- Follow the directions to interact with the Pantry Cloud REST API here (change the code to python to get more useful examples)
If you’re interested in more detail on how to use Pantry Cloud, check out my guide here: chipwired.com/raspberry-pi-send-json-data-to-rest-api. Pantry Cloud is the example that I used to demonstrate how to send JSON data to the cloud with Raspberry Pi.
It is also possible to use Pantry Cloud to send control and command data to a Raspberry Pi. Another computer can store commands and settings in the cloud, and then the Raspberry Pi could be configured to read these.
Reasons to use Pantry Cloud with Raspberry Pi:
- Generous free tier
- Easy to setup (no password required)
- Easy to send data to
Consider an alternative cloud provider if you need better security (being easy to send data to means the security is quite light), or if you need more than 100mb of storage.
Cloud4RPi is a cloud service designed to work with Raspberry Pi. It enables you to read data and control your Raspberry Pi using their cloud-based interface (their website). Their website will display a dashboard of data from a Raspberry Pi, as well as buttons and inputs that can be used to control a Raspberry Pi remotely. This is all done in real time.
Projects that can take advantage of Cloud4RPi include:
- Home automation
- Gardening automation
- Remote control a machine (a coffee machine is described on their website)
Cloud4RPi is good when you need an instant dashboard view of whatever your Raspberry Pi is monitoring, or when you need to control something remotely. I didn’t find it great for saving data for later analysis however (more on this below).
I found that you should avoid Cloud4RPi if you:
- Need to receive a lot of data from a lot of different devices. A single device can bundle data into one packet for transmission, but this becomes really hard if you’re using lots of devices all transmitting to the cloud
- Need to analyse historic data. I found it a bit difficult to extract and analyse data that had been collected over time, where you wanted to analyse a trend in something. It’s possible, though just not as easy as some other services
Cloud4RPi offers a free tier is offered that allows you to monitor and control unlimited devices. The free tier allows you to transmit up to 5,000 packets per month. I believe 1 packet is either a single command sent to a device (e.g. “turn on switch 1”), or a piece of data received from a device (e.g. “temperature is 25 degrees”).
At the time of writing Cloud4RPi was priced as follows:
- $0 for 5,000 packets
- $9.99 for 500,000 packets
- $17.90 for 1,000,000 packets
- $79.90 for 5,000,000 packets
Packets are only consumed as you use them, usage is pay as you go after the free 5,000 packets per month are used. Simple projects, such as monitoring the temperature in a house, should be able to stay within the free tier. More complicated projects, monitoring a large garden for example, might require a few dollars per month in purchased packets.
To get setup with Cloud4RPi on a Raspberry Pi follow these steps:
- Use pip to install Cloud4RPi with the following command:
sudo pip3 install cloud4rpi
- Clone some sample code which can be found here
- Replace the text __YOUR _DEVICE_TOKEN__ with your actual device token string
- Run the control script with this command:
sudo python3 control.py
This should have setup your device and connected it to the Cloud4RPi cloud. More details on the setup process can be found here.
3. ThingsBoard Cloud
ThingsBoard Cloud is a cloud storage and software provider designed to work in the IoT space. It is designed to work with a wide variety of IoT devices, including Raspberry Pi, over many different use cases. ThingsBoard offer a cloud-based solution and a “on premises” solution (where you host it yourself) for IoT projects. They also have a ‘white-labeling’ feature where you can configure the cloud with your own domain name and logo (only available on the paid tiers).
Using ThingsBoard Cloud with Raspberry Pi is good for:
- Projects with a lot of devices (over 100) all connected to the cloud, such as monitoring operations in a large warehouse
- When you want to create your own cloud for your Raspberry Pi to connect to
- Having others (e.g. customers) connect to your cloud
Avoid ThingsBoard Cloud if you’re looking for a cheap and simple solution for a hobby project (it’s really designed for projects that justify at least $10 per month perpetual spend). I also couldn’t find a way to easily send data to the Raspberry Pi, so it doesn’t look great for controlling a Raspberry Pi either.
ThingsBoard Cloud starts at $10/month which allows you to connect up to 30 devices and use up to 10 million data points per month. There is a free tier edition of the ThingsBoard software, though you have to setup your own server to host it. Professional ThingsBoard Cloud solutions can cost over $749/month, so they have you catered for if you need even more use.
To get setup with ThingsBoard Cloud, sign up on their website here. The best example I could find to setup ThingsBoard Cloud on Raspberry Pi is here. Be careful – unless you’re hosting your own cloud, you don’t want to setup ThingsBoard on your Raspberry Pi (this is the first result when Google’d); you likely want to setup your Raspberry Pi to connect to ThingsBoard Cloud instead (the instructions here).
4. JSONsty and JSON Bin
JSONsty and JSON Bin are cloud services which provide storage and access for JSON formatted data. They offer a very similar service as Pantry Cloud – easy to use, easy to setup, and a generous free tier. The reason I rank them a little lower is that they are not quite as easy as Pantry Cloud.
JSONsty and JSON Bin are good when you need:
- Simple setup and account creation (though a password is required, unlike Pantry Cloud)
- Simple connectivity (via a REST API)
- More data than is available with Pantry Cloud
JSONsty is free, while JSON Bin offers a free allocation of 10,000 requests then asks you to pay more. That’s 10,000 once off per API key (per data store), this allocation does not refresh every month. Additional requests are between $1 to $10 per million depending on how many you buy. A request is counted each time a device sends data to the cloud (up to 500 kilobytes – so bundle some readings together if using JSON Bin to save money).
If I were starting a project with Raspberry Pi where I needed to store small amounts of data in the cloud (such as from a few temperature sensors around the house), I would choose JSON Bin over JSONsty. Being a paid product, there’s more incentive for JSON Bin to keep running; I’d be concerned JSONsty might shut down one day.
Similar to Pantry Cloud, consider an alternative on this list if you need better security, better longevity of the service (Azure isn’t going anywhere, while JSONsty might not be feasible a few months from now), or if you need more data handling than these services offer.
5. Microsoft Azure IoT
Azure IoT is a collection of services offered by Microsoft to integrate Internet of Things (IoT) technology to their Azure cloud service. Like many Microsoft products, it can be utilised by people working on a home project (though may be a bit complicated) all the way up to running serious industrial applications (such as factory monitoring and chemical refining processes).
Using Azure IoT with Raspberry might be a good idea for:
- Industrial or work related projects where you can see it’s going to make enough money to justify the expense and trouble of setting up Azure IoT
- Prototype of something you want to apply to an industrial or work environment (e.g. a vehicle tracking system)
- Learning how Azure works, and how it can interact with IoT
Microsoft offers a free trial of Azure which includes IoT. I could never get this working though, it seemed after attending a Microsoft conference (which included a small amount of free Azure credit), it cancelled my free trial and insisted I pay for every small amount of data used. Microsoft also offer an IoT-specific free trial of up to 8,000 messages per month, where each message can be up to 500 kilobytes.
Azure IoT can cost between $10 and $2500 per month after the free trial, depending on how many messages you are going to send and how you need to manage the devices you’re connecting to Azure. A small home project that exceeds the free tier would cost between $10 and $25, though a large industrial project with dozens of connected devices reporting data and needing to be controlled could cost a few hundred dollars per month.
To setup Azure IoT on Raspberry Pi, Microsoft offers a great example project on their website which uses Node.js running on a Raspberry Pi. Check it out here.
I’d avoid Azure IoT if you only need a simple cloud storage service for your project. It is a powerful service, but that power makes it large and complex. If you need this power and don’t mind the complexity, it can be fairly good value for money.
6. Google IoT Cloud
Google IoT cloud is – as the name suggests – Google’s answer to the IoT cloud solutions space. It’s designed to work with large industrial systems and customers with large amounts of data. That said, it’s capable of working with Raspberry Pi.
Similarly to Azure IoT, Google Cloud and Raspberry Pi work best for large industrial projects, or for learning about cloud IoT services (so you can apply it in large industrial projects).
Google IoT Cloud has one of the most generous free tiers available out of the big players. The first 250mb of data is free, equivalent to roughly 250,000 messages. This is compared with 8,000 from Azure and 10,000 from JSON Bin. After this, it costs approximately 4 cents per 10,000 messages. The billing appears to be very complicated, but it could end up as the cheapest service on this list if you can wrap your head around it.
To connect your Raspberry Pi to Google IoT cloud, check out the guide here.
I found Google IoT cloud the hardest so far on this list to get setup. It’s not straightforward and requires a lot of installation and setup before your Raspberry Pi can communicate with the cloud. This becomes easier though if your project involves dozens of Raspberry Pi looking to to have their data analysed and managed in the cloud.
7. Amazon AWS IoT
AWS IoT is Amazon’s entry into the IoT cloud services space. It’s designed to collect, store, and analyse IoT data from “billions of devices”. That makes it designed for large-scale industrial use, rather than at-home tinkering with hobby projects (Raspberry Pi is also suitable for both of these, and Amazon even publishes a guide on how to connect Raspberry Pi to AWS IoT – see below).
AWS IoT is a competitor to Google IoT Cloud and Azure IoT, and I’d say that similar it’s suitable in similar situations: Large industrial projects designed to turn a profit (e.g. at work), or learning about IoT cloud services.
I found AWS IoT to have the most confusing free tier pricing available. They give the example that the free tier would allow 50 devices to connect 24/7 each sending 300 messages (less than 5kb in size) per day. This is more than enough for any home-based hobby project, such as automating your entire house.
If you do trigger pricing with AWS IoT, you pay per message and per minute of time that the cloud spent processing your data. I can’t figure out a way to make sense of this for typical applications, take a look at the pricing here to see what I mean.
To setup AWS IoT on your Raspberry Pi you need to setup an AWS account and install a lot of things on your Pi. There’s a complete guide on how to do so here.
8. Oracle IoT Cloud
Oracle IoT Cloud is Oracle’s competing product in the IoT space. Oracle markets it as designed for asset monitoring, production monitoring, fleet monitoring, and worker monitoring (they have a nicer name for this last one).
As a competitor to Azure, Google Cloud, and AWS, its usefulness to us Raspberry Pi owners is really the same as these other services: Large-scale applications that will turn a profit for a business, or a project to learn about IoT cloud services.
I’m completely confused by Oracle’s IoT Cloud pricing (guess this is a sign it’s not designed for a Raspberry Pi hobbyist such as myself!). A free tier of $300 is available, but I have no idea how much that gets you.
Oracle have published a guide on setting up a Raspberry Pi with Oracle IoT, check it out here.