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.
- Create a database
- Configure
config/database.yml
- Run bundler:
bundle install
- Run database migrations:
bundle exec rake db:migrate
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
The REST API, is implemented using sinatra, so you can start it using rackup:
bundle exec rackup
/last
: last captured data
You can try the API using provided html inside public
folder. Try it
accessing: http://localhost:9292/index.html
- Add more services
- Integrate with dashing gem