Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiskolabs/air-back
The backend for the air quality dashboard
https://github.com/kiskolabs/air-back
Last synced: about 5 hours ago
JSON representation
The backend for the air quality dashboard
- Host: GitHub
- URL: https://github.com/kiskolabs/air-back
- Owner: kiskolabs
- Created: 2019-12-14T08:28:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-29T01:26:01.000Z (8 months ago)
- Last Synced: 2024-03-25T21:24:13.959Z (8 months ago)
- Language: Ruby
- Homepage: https://github.com/kiskolabs/air-dash
- Size: 30.3 KB
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AirBack
A simple Sinatra backend for fetching air quality data from the [Netatmo API](https://dev.netatmo.com/apidocumentation/).
## 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
* Hardware
* One or more [Netatmo air quality monitors](https://www.netatmo.com/en-eu/aircare/homecoach)
* [Netatmo API ID and secret](https://dev.netatmo.com/apidocumentation/oauth)
* Dependencies
* Redis
* Ruby
* Bundler## Developing
1. Clone the repo
2. Install dependencies with `bundle install`
3. Create a `.env.local` file in the root of the project:```sh
export NETATMO_CLIENT_ID="IDIDIDIDIDIDIDIDID"
export NETATMO_CLIENT_SECRET="SECRETSECRETSECRET"
export NETATMO_USERNAME="[email protected]"
export NETATMO_PASSWORD="superpassword"
```4. Start the Sinatra app: `rackup`