Host and view your Awair data locally.
freshawair
is three macro components
agent
- captures data from your awair(s) and load data into the databasedatabase
- timescale db instancedocker-compose -f docker-compose.yml -f docker-compose.prod.yml up
docker-compose
is the primary supported deployment mechanism. Services may be deployed independently as desired, but users will need to adopt the docker-compose.yml
configurations into the alternative desired format.
The agent has a CLI with all options configurable via ENV or CLI args:
$ docker run --rm -it cdaringe/freshawair --help
Usage: agent [OPTIONS] --db-host <DB_HOST> --db-port <DB_PORT>
Options:
--awair-endpoint <AWAIR_ENDPOINT>
--db-host <DB_HOST>
--db-port <DB_PORT>
--db-user <DB_USER> [default: fresh]
--db-password <DB_PASSWORD> [default: fresh]
--poll-duration-s <POLL_DURATION_S> [default: 60]
-h, --help Print help
-V, --version Print version
Postgres/TimescaleDB & Grafana configuration is left to the user. Sensible defaults are set in compose files.
The only supported mechanism for building is following:
./rad build
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
See rad.ts or run rad --list
for various actions.
Here are some typical CPU/Mem usage from the different components:
$ docker stats
NAME CPU % MEM USAGE / LIMIT
freshawair_freshagent_1 0.00% 2.355MiB / 5.641GiB
freshawair_grafana_1 0.05% 38.5MiB / 5.641GiB
freshawair_freshdb_1 0.01% 101.6MiB / 5.641GiB
Further tuning can be done to tweak the postgres & grafana runtime characteristics.