Dropbox application in background process on OpenWRT processor of my Arduino Yun

Hello everybody,

Simple question: does the Arduino YUN support the same DROPBOX functionalities as my laptop?

Basically, I need to download data from the SD card of my Arduino Yun to my application server.
But the internet connection of my Arduino is not very stable.

How I want it to work:

  1. I have a sketch that writes data on a TXT file to my SD card every 10 minutes
  2. I want to install Dropbox on my Arduino Yun
  3. Then, whenever the Yun is connected, it will synchronize all the files from the SD Card with my Dropbox folder on my server. That would happen (I guess) in the background, without my Arduino needing to run a sketch.
    To do that, I think I need dropbox to run ‘in the background’ on my Arduino microprocessor.
    Did anyone do this before? Thanks.

What does NOT work:
Initially, I used the "LogToDropbox" sketch inserted in the "Datalogging to Dropbox with Arduino Yun" tutorial at the following link: http://www.instructables.com/id/Datalogging-to-Dropbox-with-Arduino-Yun/ in order to ‘actively’ upload files to my Dropbox app console from my SD card with an internet connection. But if , my Arduino Yun is losing the internet connection, it is impossible to upload the files created during the downtime to my Dropbox app console. These files are stored on the SD card plugged on the Yun during this time interval, but not synchronized.

Kind regards,

I would use the temboo api for dropbox. But my opinion dropbix is very internet consuming, Id use google spreadsheet to upload, its lighter I think.

Few lines code to upload files to dropbox:

nano /mnt/sda1/upload.py
#!/usr/bin/python
from dbupload import upload_file
upload_file("local_filename","/Path/In/Dropbox/","remote_filename","email@example.com","password")

local_filename use absolute path like "/mnt/sda1/sqljdbc.jar"

http://forum.arduino.cc/index.php?topic=266283.0

Use Linux has build in function schedule to upload files

http://forum.arduino.cc/index.php?topic=256107.msg2174648#msg2174648

Temboo API requires calls for uploading the files to Dropbox.

I don't want to use it because the 'LogToDropbox' sketch works very well and it does the same thing as the 'SendDataToDropbox' sketch whom uses a Temboo account.

That's why I want to run Dropbox application in background process.

I think it's possible to do this in the 'startup' part whom is in the 'system' part of the advanced configuration panel of the Arduino Yun.

But, I haven't ideas of how to write my own command in the 'Local startup' command line because I'm so a beginner.

Do you have some advices?

crontab -e
* * * * * /mnt/sda1/upload.py

This will run every minute and It is background process.

But the internet connection of my Arduino is not very stable.

"/mnt/sda1/upload.py" should have following function.

  • append datalog file to forward file, delete datalog file
  • check internet connection
  • if connection is OK, upload the file and delete forward file.
  • if connection is failed, do nothing

mart256:
I would use the temboo api for dropbox. But my opinion dropbix is very internet consuming, Id use google spreadsheet to upload, its lighter I think.

1+

I think google spreadsheet is smart move, since It supports append_row.

http://forum.arduino.cc/index.php?topic=198347.msg1569706#msg1569706

https://gspread.readthedocs.org/en/latest/

Need I to change something in the 'upload.py' file before running it?

May I write the 'crontab -e' and '* * * * * /mnt/sda1/upload.py' lines in the 'PuTTy' command line?

Schedule Tasks on Linux Using Crontab

Google is our best friend. :stuck_out_tongue: