What's the best way to transfer data continuously from a Raspberry Pi to my droplet?

March 21, 2017 3.6k views
DigitalOcean Ubuntu 16.04

I have a Raspberry Pi and I have connected two different sensors to my Raspberry Pi. Now I need to send the data I've received from my R-Pi to my droplet to get access to it from everywhere. My knowledge about Digital Ocean is limited so now I need some help how I should do this in the best way. To sum it up:

  • I want to send stored information from my R-Pi to my Digital Ocean droplet continuously and automatically
  • What do I need to do, what programs do I need?
  • I prefer to use Python code
  • One option is to put it on a web browser, but I'm not sure what I have to do in order to make that work

Thankful for any help I can get!

// Jenny

3 Answers

Hi @jennykimbengtsson

You actually got an answer on your other thread:

DigitalOcean offers just a server (which they call a droplet). You need to setup and manage the server yourself, but you can run whatever you like on the server.

  • Yes I know, but in this question I ask further about how to do it... :)

    • You would probably get a better answer in the RPi forums.
      I don't know your Python coding skills, so it would be difficult for me to answer that.

It depends on how you want to digest your RaspberryPi data. Lets say you would like to present it on a website. A possible solution could be to setup a URL:Endpoint with your Python Application that presents JSON data and then digest and display it using a simple Angular application.

Here is a place to start: https://www.w3schools.com/angular/angular_http.asp

Not the fanciest solution, but I think you can do that with netcat. That is how the hackers steal data.

Here is the first google hit I found on this, but there are many examples of how to transfer data with netcat. Note that you will have to harden this service with systemd or similar to restore the link should it crash.


Have another answer? Share your knowledge.