Posts: 7
Joined: Wed Nov 02, 2016 12:25 pm

automated data sent to cloud directly

Mon Mar 13, 2017 6:26 am

hi !
i want to send the data obtained in rasppi from the sensor directly to cloud,i wish it be to done automated instead of tying the commands, pls suggest me how to send the data to cloud automatically,
ex. the sensor collects the data fand sends it to rpi the rpi should send the data directly to cloud
ex2. the rasp2 doc controlled from rasp1,these datas(require) needs to be updated to cloud automatically without any commands to be involved

pls suggest! :)

Posts: 17137
Joined: Tue Jul 17, 2012 3:02 pm

Re: automated data sent to cloud directly

Mon Mar 13, 2017 6:36 am

Not enough information in your question to be able to answer it.

What do you mean by cloud?

"Cloud" is a very nebulous (get it) term that encompasses many services, protocols and so on.

Presumably you mean to have some kind of storage for this data in the cloud. Be it a database of simple files.

Presumably you mean to have some kind of web interface in this cloud so as to be able to view this data or make it available to other machines.

You could go the "DIY" route and just rent a Linux server instance from Google or Amazon or Azure or Digital Ocean or whoever's cloud services. On that server you put a webserver and start writing some PHP to accept data from your Pi, stick in a database and serve up web pages to view it.

Personally I like to do this kind of thing with node.js.

Or there are cloud service providers that you can sign up for that provide ready made solutions for collecting and displaying your data. I have never tried out any of those.

Let us know more about what it is you want to do exactly and we can probably advise better how to get started.
Memory in C++ is a leaky abstraction .

User avatar
Posts: 598
Joined: Thu Feb 20, 2014 4:00 am
Location: San Diego, California

Re: automated data sent to cloud directly

Mon Mar 13, 2017 9:51 am

As Heater said, you do not provide enough information for an especially specific answer.

"The cloud" is not some all-knowing thing, it's just a bunch of servers. Either you'll be sending data to someone else's already-set-up server/service (in which case the format of data and method of transportation will be dictated by that server/service), or you'll be building both ends (local client and online server) yourself and you can use whatever formats and methods you prefer.

Two likely choices of methods for sending small amounts of data frequently are either via HTTP POST calls to a webserver, or by publishing messages to an MQTT broker.

I use MQTT for a lot of sensor readings that are passed between machines at home (e.g. one Pi is taking light level readings every 15 seconds and publishing the data to the local MQTT broker, and several other Pi's are using that data to continuously adjust the brightness of their backlights), but they could just as easily be talking to an MQTT broker out on the Internet. Adafruit has an MQTT broker that is available for experimental use at Without having to set up your own server or backend software in the cloud, you could test out the MQTT approach by signing up for an account on Adafruit's server, and then install mosquitto on your Raspberry Pi to test publishing sensor readings from the command line, and then go on to install the Paho MQTT libraries for whatever language(s) you prefer. If I recall correctly, one can easily set up gauges and graphs and such on that will respond near instantly to new values published by your client software. (There may be other MQTT test sites out there, this is just one that I've run across before. Adafruit does nice stuff.)

User avatar
Posts: 778
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: automated data sent to cloud directly

Mon Mar 13, 2017 10:11 am

Google is your friend, there are many tutorials on line for the RPi have a good selection
Can't find the thread you want? Try googling : YourSearchHere

Return to “General discussion”