davidanddiesel
Posts: 15
Joined: Sun Jan 18, 2015 4:03 am

FTP to wunderground?

Sat Jan 31, 2015 10:18 pm

I want to use FTP to transfer an image to WunderGround Weather using the camera module and python-picamera. I have installed vsftpd and ran it, however I do not know how to get it to save pictures not to my local ip, but rather to weather underground. I need very detailed non-technical instructions on this one! Any help would be appreciated! Cause it's driving me MAD :evil: !

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: FTP to wunderground?

Sat Jan 31, 2015 10:32 pm

If you're trying to send from your Raspberry Pi up to Wunderground you DO NOT need vsftpd. That server means you can accept external FTP requests to send/receive data on your Raspberry Pi.

To save on your local Raspberry Pi you just need to write the file on the local filesystem.

Code: Select all

import picamera
from time import sleep

camera = picamera.PiCamera()
camera.capture('/home/pi/pictures/image.jpg')
You may need an ftp client to send to Wunderground.
sudo apt-get install ftp

Then the basics of an FTP send are:

cd /home/pi/pictures # or wherever you stored them
ftp ftp.wundergound.com
-->Please enter userid:
yourid
-->Please enter password (which won't echo):
yourpassword
cd /dir/subdirectory/place/you/store/files/
put image.jpg
quit
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “General discussion”