Skip to content

REST API that exposes data imported from Davis Weather Station Vantage Pro 2 Plus. Imported data is read from an ascii file downloaded by ftp.

Notifications You must be signed in to change notification settings

chrodriguez/api_weather_station

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather API

REST API that exposes data imported from Davis Weather Station Vantage Pro 2 Plus. Imported data is read from an ascii file downloaded by ftp.

Install

  • Create a database
  • Configure config/database.yml
  • Run bundler: bundle install
  • Run database migrations: bundle exec rake db:migrate

Use

If weather data file is data/data.txt then the following task will import data to be exported as a REST Api

  rake weather:feed:file[data/data.txt]

You should call this task from a crontab after updating data/data.txt

API

The REST API, is implemented using sinatra, so you can start it using rackup:

  bundle exec rackup

Sercices

  • /last: last captured data

Sample application

You can try the API using provided html inside public folder. Try it accessing: http://localhost:9292/index.html

TODO

  • Add more services
  • Integrate with dashing gem

About

REST API that exposes data imported from Davis Weather Station Vantage Pro 2 Plus. Imported data is read from an ascii file downloaded by ftp.

Resources

Stars

Watchers

Forks

Packages

No packages published