{"id":34072712,"url":"https://github.com/anrijs/aranet4-python","last_synced_at":"2025-12-14T08:17:56.350Z","repository":{"id":35141094,"uuid":"208207851","full_name":"Anrijs/Aranet4-Python","owner":"Anrijs","description":"Aranet4, Aranet2 and Aranet Radiation Python client","archived":false,"fork":false,"pushed_at":"2025-10-15T15:23:33.000Z","size":137,"stargazers_count":256,"open_issues_count":6,"forks_count":25,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-10-16T11:44:57.876Z","etag":null,"topics":["aranet2","aranet4","bluetooth","python"],"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/Anrijs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-13T06:25:34.000Z","updated_at":"2025-10-15T15:23:37.000Z","dependencies_parsed_at":"2024-04-08T16:45:00.309Z","dependency_job_id":"56b48482-5609-42cc-a445-deaadfa200be","html_url":"https://github.com/Anrijs/Aranet4-Python","commit_stats":{"total_commits":120,"total_committers":8,"mean_commits":15.0,"dds":0.6,"last_synced_commit":"f2115767660e2397012f6268df83b9e7293aaa46"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/Anrijs/Aranet4-Python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anrijs%2FAranet4-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anrijs%2FAranet4-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anrijs%2FAranet4-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anrijs%2FAranet4-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anrijs","download_url":"https://codeload.github.com/Anrijs/Aranet4-Python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anrijs%2FAranet4-Python/sbom","scorecard":{"id":14458,"data":{"date":"2025-08-11","repo":{"name":"github.com/Anrijs/Aranet4-Python","commit":"892ea20514fb3d1e7514889f141171e93ab0cde4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":2,"reason":"Found 8/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/Anrijs/Aranet4-Python/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/Anrijs/Aranet4-Python/python-package.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:31","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T15:25:53.061Z","repository_id":35141094,"created_at":"2025-08-14T15:25:53.061Z","updated_at":"2025-08-14T15:25:53.061Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27722936,"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-12-14T02:00:11.348Z","response_time":56,"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":["aranet2","aranet4","bluetooth","python"],"created_at":"2025-12-14T08:17:55.216Z","updated_at":"2025-12-14T08:17:56.343Z","avatar_url":"https://github.com/Anrijs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Aranet4 Python client\nPython library and command line interface for [Aranet4](https://aranet.com/products/aranet4-home), [Aranet2](https://aranet.com/products/aranet2-home), [Aranet Radiation](https://aranet.com/products/aranet-radiation-sensor) and [Aranet Radon Plus](https://aranet.com/products/aranet-radon-sensor) sensors.\n\n## Installation\n1. Install aranet4 and its dependencies:\n```\npip3 install aranet4\n```\n2. Pair Aranet device\n3. Run `aranetctl` or use as a library\n\n**Note:** \"Smart Home integrations\" must be enabled in the [Aranet Home](https://aranet.com/aranet-home-app) mobile application for full support.\n\n## aranetctl usage\n```text\n$ aranetctl -h\nusage: aranetctl.py [-h] [--scan] [-u URL] [-r] [-s DATE] [-e DATE] [-o FILE] [-w] [-l COUNT] [--xt] [--xh] [--xp] [--xc] [--set-interval MINUTES]\n                    [--set-integrations {on,off}] [--set-range {normal,extended}]\n                    [device_mac]\n\npositional arguments:\n  device_mac            Aranet Bluetooth Address\n\noptions:\n  -h, --help            show this help message and exit\n  --scan                Scan for Aranet devices\n  -r, --records         Fetch historical log records\n\nOptions for current reading:\n  -u URL, --url URL     Remote url for current value push\n\nFilter History Log Records:\n  -s DATE, --start DATE\n                        Records range start (UTC time, example: 2019-09-29T14:00:00\n  -e DATE, --end DATE   Records range end (UTC time, example: 2019-09-30T14:00:00\n  -o FILE, --output FILE\n                        Save records to a file\n  -w, --wait            Wait until new data point available\n  -l COUNT, --last COUNT\n                        Get \u003cCOUNT\u003e last records\n  --xt                  Don't get temperature records\n  --xh                  Don't get humidity records\n  --xp                  Don't get pressure records\n  --xc                  Don't get co2 records\n\nChange device settings:\n  --set-interval MINUTES\n                        Change update interval\n  --set-integrations {on,off}\n                        Toggle Smart Home Integrations\n  --set-range {normal,extended}\n                        Change bluetooth range\n```\n### Scan devices\nUsage: `aranetctl --scan`\n\nOutput:\n```\n=======================================\n  Name:     Aranet4 00001\n  Address:  AA:BB:CC:DD:EE:FF\n  RSSI:     -83 dBm\n---------------------------------------\n  CO2:            484 ppm\n  Temperature:    20.9 °C\n  Humidity:       43 %\n  Pressure:       1024.8 hPa\n  Battery:        3 %\n  Status Display: GREEN\n  Age:            9/60\n```\n\n**Note:** To receive current measurements directly from the Bluetooth advertisement data, \"Smart Home integrations\" must be enabled and device firmware version must be v1.2.0 or newer.\n\n### Current Readings Example\nUsage: `aranetctl XX:XX:XX:XX:XX:XX`\n\nOutput:\n```\n--------------------------------------\nConnected: Aranet4 00000 | v0.3.1\nUpdated 51 s ago. Intervals: 60 s\n5040 total readings\n--------------------------------------\nCO2:          904 ppm\nTemperature:  19.9 C\nHumidity:     51 %\nPressure:     997.0 hPa\nBattery:      96 %\nStatus Display: GREEN\n--------------------------------------\n```\n\n### Get History Example\nWrite full log to screen:\n\nUsage: `aranetctl XX:XX:XX:XX:XX:XX -r`\n\n```shell\n-------------------------------------------------------------\nDevice Name    :        Aranet4 00000\nDevice Version :               v0.3.1\n-------------------------------------------------------------\n id  |        date         |  co2   | temp | hum | pressure |\n-------------------------------------------------------------\n   1 | 2022-02-18T14:15:44 |    844 | 21.8 |  50 |    985.6 |\n   2 | 2022-02-18T14:20:44 |    846 | 21.8 |  50 |    985.9 |\n   3 | 2022-02-18T14:25:44 |    843 | 22.0 |  50 |    986.4 |\n   4 | 2022-02-18T14:30:44 |    881 | 22.1 |  50 |    986.4 |\n   5 | 2022-02-18T14:35:44 |    854 | 22.1 |  50 |    987.3 |\n   6 | 2022-02-18T14:40:44 |    867 | 22.2 |  50 |    987.5 |\n   7 | 2022-02-18T14:45:44 |    883 | 22.1 |  50 |    988.1 |\n   8 | 2022-02-18T14:50:44 |    921 | 22.1 |  50 |    988.6 |\n   9 | 2022-02-18T14:55:44 |    930 | 22.0 |  50 |    989.1 |\n  10 | 2022-02-18T15:00:44 |    954 | 22.0 |  50 |    989.5 |\n-------------------------------------------------------------\n```\n\nUsage: `aranetctl XX:XX:XX:XX:XX:XX -r -o aranet4.csv`\n\nOutput file format: `Date,CO2,Temperature,Humidity,Pressure`\n\nOutput file example:\n```\ndate,co2,temperature,humidity,pressure\n2022-02-18 10:05:47,1398,23.2,53,986.6\n2022-02-18 10:10:47,1155,23.1,50,986.3\n```\n\n## Usage of library\n\n### Current Readings Example\n\n```python\nimport aranet4\n\ndevice_mac = \"XX:XX:XX:XX:XX:XX\"\n\ncurrent = aranet4.client.get_current_readings(device_mac)\n\nprint(\"co2 reading:\", current.co2)\nprint(\"Temperature:\", current.temperature)\nprint(\"Humidity:\", current.humidity)\nprint(\"Pressure:\", current.pressure)\n```\n\n### Logged Readings Example\n\n```python\nimport aranet4\n\ndevice_mac = \"XX:XX:XX:XX:XX:XX\"\n\nhistory = aranet4.client.get_all_records(\n    device_mac, entry_filter={\"humi\": False, \"pres\": False}\n)\nprint(f\"{'Date':^20} | {'CO2':^10} | {'Temperature':^10} \")\nfor entry in history.value:\n    print(f\"{entry.date.isoformat():^20} | {entry.co2:^10} | {entry.temperature:^10}\")\n\n```\n\n## Library functions\n### get_current_readings(mac_address: str) -\u003e client.CurrentReading\nGet current measurements from device\nReturns **CurrentReading** object:\n```python\nclass CurrentReading:\n    name: str = \"\"\n    version: str = \"\"\n    temperature: float = -1\n    humidity: int = -1\n    pressure: float = -1\n    co2: int = -1\n    battery: int = -1\n    status: int = -1\n    interval: int = -1\n    ago: int = -1\n    stored: int = -1\n```\n\n### get_all_records(mac_address: str, entry_filter: dict) -\u003e client.Record\nGet stored datapoints from device. Apply any filters if required\n\n`entry_filter` is a dictionary that can have the following values:\n - `last`: int : Get last n entries\n - `start`: datetime : Get entries after specified time\n - `end`: datetime : Get entries before specified time\n - `temp`: bool : Get temperature data points (default = True)\n - `humi`: bool : Get humidity data points (default = True)\n - `pres`: bool : Get pressure data points (default = True)\n - `co2`: bool : Get co2 data points (default = True)\n\nReturns **CurrentReading** object:\n```python\nclass Record:\n    name: str\n    version: str\n    records_on_device: int\n    filter: Filter\n    value: List[RecordItem] = field(default_factory=list)\n```\nWhich includes these objects:\n```python\nclass RecordItem:\n    date: datetime\n    temperature: float\n    humidity: int\n    pressure: float\n    co2: int\n\nclass Filter:\n    begin: int\n    end: int\n    incl_temperature: bool\n    incl_humidity: bool\n    incl_pressure: bool\n    incl_co2: bool\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanrijs%2Faranet4-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanrijs%2Faranet4-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanrijs%2Faranet4-python/lists"}