Skip to content

kiskolabs/air-back

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirBack

A simple Sinatra backend for fetching air quality data from the Netatmo API.

Features

  • Exchange a username & password for an access token
  • Refreshes the access token before it expires
  • Caches the tokens in Redis
  • Fetch current air quality data for all registered devices
  • Fetch data for the past hour for the given device ID
  • Measurement responses are automatically cached in Redis

Requirements

Developing

  1. Clone the repo
  2. Install dependencies with bundle install
  3. Create a .env.local file in the root of the project:
export NETATMO_CLIENT_ID="IDIDIDIDIDIDIDIDID"
export NETATMO_CLIENT_SECRET="SECRETSECRETSECRET"
export NETATMO_USERNAME="[email protected]"
export NETATMO_PASSWORD="superpassword"
  1. Start the Sinatra app: rackup

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •