{"id":19658120,"url":"https://github.com/cdaringe/freshawair","last_synced_at":"2025-07-26T05:14:07.706Z","repository":{"id":50903625,"uuid":"312890660","full_name":"cdaringe/freshawair","owner":"cdaringe","description":"Host and view your Awair data locally","archived":false,"fork":false,"pushed_at":"2025-07-19T02:52:00.000Z","size":1205,"stargazers_count":25,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-19T07:51:55.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdaringe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-14T19:50:08.000Z","updated_at":"2025-07-19T02:52:04.000Z","dependencies_parsed_at":"2024-08-07T06:25:11.074Z","dependency_job_id":"bce51c09-6fed-4272-a4dd-a10e6c87fe07","html_url":"https://github.com/cdaringe/freshawair","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cdaringe/freshawair","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ffreshawair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ffreshawair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ffreshawair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ffreshawair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdaringe","download_url":"https://codeload.github.com/cdaringe/freshawair/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ffreshawair/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267122571,"owners_count":24039446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:36:10.487Z","updated_at":"2025-07-26T05:14:07.658Z","avatar_url":"https://github.com/cdaringe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# freshawair\n\n\u003c!-- markdownlint-disable MD033 --\u003e\n\nHost and view your [Awair data](https://www.getawair.com/) locally.\n\n- **Store** Awair data in your own database\n- **View** Awair data from a self hosted web-app (grafana).\n\n\u003cimg alt=\"freshawair grafana\" src=\"./img/preview.png\" width=\"600\" /\u003e\n\n## description\n\n`freshawair` is three macro components\n\n- `agent` - captures data from your awair(s) and load data into the database\n- `database` - [timescale db](https://www.timescale.com/) instance\n- [grafana](https://grafana.com/) - visualize your data\n\n## usage\n\n`docker-compose -f docker-compose.yml -f docker-compose.prod.yml up`\n\n`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.\n\nThe agent has a CLI with all options configurable via ENV or CLI args:\n\n```sh\n$ docker run --rm -it cdaringe/freshawair --help\nUsage: agent [OPTIONS] --db-host \u003cDB_HOST\u003e --db-port \u003cDB_PORT\u003e\n\nOptions:\n      --awair-endpoint \u003cAWAIR_ENDPOINT\u003e\n      --db-host \u003cDB_HOST\u003e\n      --db-port \u003cDB_PORT\u003e\n      --db-user \u003cDB_USER\u003e                  [default: fresh]\n      --db-password \u003cDB_PASSWORD\u003e          [default: fresh]\n      --poll-duration-s \u003cPOLL_DURATION_S\u003e  [default: 60]\n  -h, --help                               Print help\n  -V, --version                            Print version\n```\n\nPostgres/TimescaleDB \u0026 Grafana configuration is left to the user. Sensible\ndefaults are set in compose files.\n\n### local builds\n\nThe only supported mechanism for _building_ is following:\n\n- install [rad](https://github.com/cdaringe/rad#install)\n- `./rad build`\n- `docker-compose -f docker-compose.yml -f docker-compose.dev.yml up`\n- visit grafana@[localhost:3000](https://localhost:3000) and select the prebuilt dashboard\n\nSee [rad.ts](./rad.ts) or run `rad --list` for various actions.\n\n## Performance\n\nHere are some typical CPU/Mem usage from the different components:\n\n```sh\n$ docker stats\nNAME                      CPU %     MEM USAGE / LIMIT\nfreshawair_freshagent_1   0.00%     2.355MiB / 5.641GiB\nfreshawair_grafana_1      0.05%     38.5MiB / 5.641GiB\nfreshawair_freshdb_1      0.01%     101.6MiB / 5.641GiB\n```\n\nFurther tuning can be done to tweak the postgres \u0026 grafana runtime characteristics.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Ffreshawair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdaringe%2Ffreshawair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Ffreshawair/lists"}