{"id":24569439,"url":"https://github.com/dfederschmidt/airsensor-py","last_synced_at":"2025-06-25T16:03:29.150Z","repository":{"id":55144799,"uuid":"106053236","full_name":"dfederschmidt/airsensor-py","owner":"dfederschmidt","description":"Python package for getting sensor values from an Ambient Air Sensor","archived":false,"fork":false,"pushed_at":"2021-01-07T09:40:41.000Z","size":7,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-25T16:02:56.928Z","etag":null,"topics":["airquality","home-automation","python3","pyusb"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfederschmidt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-06T21:52:03.000Z","updated_at":"2021-01-07T09:40:44.000Z","dependencies_parsed_at":"2022-08-14T13:20:50.405Z","dependency_job_id":null,"html_url":"https://github.com/dfederschmidt/airsensor-py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dfederschmidt/airsensor-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfederschmidt%2Fairsensor-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfederschmidt%2Fairsensor-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfederschmidt%2Fairsensor-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfederschmidt%2Fairsensor-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfederschmidt","download_url":"https://codeload.github.com/dfederschmidt/airsensor-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfederschmidt%2Fairsensor-py/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261906772,"owners_count":23228346,"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","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":["airquality","home-automation","python3","pyusb"],"created_at":"2025-01-23T15:23:12.718Z","updated_at":"2025-06-25T16:03:29.130Z","avatar_url":"https://github.com/dfederschmidt.png","language":"Python","readme":"# airsensor-py\n\n[![PyPI version](https://badge.fury.io/py/airsensor-py.svg)](https://badge.fury.io/py/airsensor-py)\n\nPython package for getting sensor values from an Ambient Air Sensor such as offered by [Rehau](https://www.amazon.co.uk/Rehau-USB-Stick-Ambient-Sensor/dp/B00ZXP6EI4).\n\n## About VOC sensors\n\nVOC (**V**olatile **O**rganic **C**ompounds) potentially contribute to long-term health issues when exposed to them over a long time period [1].\nThe sensor outputs numerical values typically in the 450-2000 range. According to the internet [2]:\n\n* **450-1000** Good air quality\n* **1000-1500** Medium air quality\n* **1500-** Bad air quality, consider opening a window for fresh air.\n\n## Getting Started\n\nThis section will introduce you to airsensor-py and how to install and use it for fun and profit.\n\n### Prerequisites\n\nMake sure that python 3 + pip is installed.\n\n### Installing\n\nThis package is published on pip from time to time.\n\n```\npip install airsensor-py\n```\n\nTo get the most recent version, clone this repository and install locally.\n\n```\ngit clone https://github.com/dfederschmidt/airsensor-py\ncd airsensor-py\npip install -r requirements.txt\npip install -e .\n```\n\n\n\n## Usage\n\nYou can either use this package as a library in your code or using the bundled CLI. You'll have to run it as root or set up a udev rule to grant r/w access to the device to the user. For more instructions on that, see [here](https://github.com/tuxedo0801/usb-sensors-linux).\n\n### Library\n\n```\nfrom airsensor.core import AirSensor\nairsensor = AirSensor()\nvoc = airsensor.get_voc()\nprint(voc)\n\n\u003e 450\n```\n\n### CLI\n\n```\n$ airsensor-py\n\n\u003e 450\n```\n\nor\n\n```\n$ airsensor-py --json\n\u003e {\"timestamp\": \"2017-05-05 10:30:05\", \"voc\": 450}\n```\n\n## Built With\n\n* [PyUSB](https://walac.github.io/pyusb/)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details\n\n## Contribution\n\nWant to add a feature or report a bug? Open an issue or a pull request for me!\n\n## Acknowledgments\n\n* [A C implementation](https://code.google.com/archive/p/airsensor-linux-usb/) was done by Rodric Yates which I used to see how the interaction with the device works.\n\n## References\n\n* [1] https://toxtown.nlm.nih.gov/text_version/chemicals.php?id=31\n* [2] http://nicht-traeumen-sondern-machen.de/RaspberryPi_Basteleien/Code_Luftqualitaet.php?anker=a7\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfederschmidt%2Fairsensor-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfederschmidt%2Fairsensor-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfederschmidt%2Fairsensor-py/lists"}