{"id":16156557,"url":"https://github.com/nioc/netatmo-collector","last_synced_at":"2026-04-26T23:31:24.536Z","repository":{"id":101263905,"uuid":"189785130","full_name":"nioc/netatmo-collector","owner":"nioc","description":"Netatmo collector is a script for requesting measures from Netatmo devices.","archived":false,"fork":false,"pushed_at":"2023-12-05T23:21:59.000Z","size":428,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T01:20:07.868Z","etag":null,"topics":["grafana","grafana-dashboard","influxdb","netatmo","netatmo-api","netatmo-weather-station"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nioc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-01T23:06:41.000Z","updated_at":"2023-12-05T23:48:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"2468d691-231d-424e-920e-bdd0816158b7","html_url":"https://github.com/nioc/netatmo-collector","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/nioc/netatmo-collector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nioc%2Fnetatmo-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nioc%2Fnetatmo-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nioc%2Fnetatmo-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nioc%2Fnetatmo-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nioc","download_url":"https://codeload.github.com/nioc/netatmo-collector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nioc%2Fnetatmo-collector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32317162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["grafana","grafana-dashboard","influxdb","netatmo","netatmo-api","netatmo-weather-station"],"created_at":"2024-10-10T01:45:17.024Z","updated_at":"2026-04-26T23:31:24.520Z","avatar_url":"https://github.com/nioc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Netatmo collector\n\n[![license: AGPLv3](https://img.shields.io/badge/license-AGPLv3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)\n[![GitHub release](https://img.shields.io/github/release/nioc/netatmo-collector.svg)](https://github.com/nioc/netatmo-collector/releases/latest)\n[![Codacy grade](https://img.shields.io/codacy/grade/ef9c7195ad5945309bb13b5899d63cd8.svg)](https://www.codacy.com/app/nioc/netatmo-collector)\n\nNetatmo collector is a PHP script for requesting measures from Netatmo devices.\n\n## Key features\n\n-   Automatic script (can be used with cron for example),\n-   Initialization step (providing a start date and wait for the magic),\n-   Store measures into an InfluxDB database,\n-   Explore data with Grafana.\n\n![screenshot](screenshot.png)\n\n## Installation\n\n### Script\n\nDownload this project and extract files to directory of your choice.\n\nIn order to authenticate yourself on the Netatmo API, you must:\n\n-   create a Netatmo [application](https://dev.netatmo.com/myaccount/createanapp),\n-   generate a token with `read_station` scope,\n-   enter your `client_id` and `client_secret` values in `config.php`,\n-   create a `tokens.json` file with this content (replace the 2 values between `\u003c\u003e` with your tokens):\n\n``` json\n{\"access_token\":\"\u003cyourAccessToken\u003e\",\"refresh_token\":\"\u003cyourRefreshToken \u003e\",\"scope\":[\"read_station\"],\"expires_in\":10800,\"expire_in\":10800,\"expires_at\":0}\n```\n\n### Dependencies\n\nInstall dependencies with [composer](https://getcomposer.org/): `composer install`.\n\n### InfluxDB\n\nYou need [InfluxDB](https://docs.influxdata.com/influxdb/v1.7/introduction/installation/) installed.\n\nDefault values are ok, but configuration can be changed (see [docs](https://docs.influxdata.com/influxdb/v1.7/administration/config/)).\n\nScript will create database.\n\n### Grafana\n\nYou need [Grafana](https://grafana.com/grafana/download) installed.\n\nImport [JSON file](dashboard.json) from Grafana GUI (Create / Import).\n\nCreate InfluxDB data source, mainly name and influxDB URL, for example:  `http://localhost:8086` (Configuration / Data sources / Add).\n\nConfigure dashboard variables (Dashboard / Settings / Variables):\n\n-   `datasource` = the data source name you set up,\n-   `devices` = the Netatmo station name (only one station by dashboard),\n-   `modules` = comma separated list of modules name,\n-   `windGauge` = wind gauge module name (obviously),\n-   `rainGauge` = rain gauge module name (obviously),\n-   `mainModule` = main module name (obviously).\n\n## Usage\n\n### Initialization\n\nIn order to collect oldest measures, script accepts a start date (YYYY-MM-DD) as an optional argument.\n\nOpen a shell, go in script directory and execute it: `php -f index.php 2018-12-31`.\n\n### Scheduling repeated executions\n\nAdd to your scheduler (cron for exemple) following command (change the path `/usr/local/bin/netatmo-collect/` according to your installation):\n\n```shell\n# /etc/cron.d/netatmo-collect: crontab fragment for requesting Netatmo measures\n# Requesting Netatmo measures and storing to database every 12 hours\n 0 */12    * * *     root   php -f /usr/local/bin/netatmo-collect/index.php \u003e\u003e /var/log/syslog 2\u003e\u00261\n```\n\n### Logs\n\nLog settings can be found in `config.xml` file.\n\nIn production mode, the default configuration use a file (`netatmo-collect.log`) for logging at level `INFO`.\n\nFor debugging, you can output to console and set a more verbose level (`DEBUG` or even `TRACE`) by overriding the `root` section:\n\n```xml\n  \u003croot\u003e\n    \u003clevel value=\"DEBUG\"/\u003e\n    \u003cappender_ref ref=\"console\"/\u003e\n  \u003c/root\u003e\n```\n\n## Versioning\n\nThis project is maintained under the [semantic versioning](https://semver.org/) guidelines.\n\nSee the [releases](https://github.com/nioc/netatmo-collector/releases) on this repository for changelog.\n\n## Contributing\n\nPull requests are welcomed.\n\n## Credits\n\n-   **[Nioc](https://github.com/nioc/)** - _Initial work_\n\nSee also the list of [contributors](https://github.com/nioc/netatmo-collector/contributors) to this project.\n\nThis project is powered by the following components:\n\n-   [Netatmo-API-PHP](https://github.com/Netatmo/Netatmo-API-PHP)\n-   [influxdb-php](https://github.com/influxdata/influxdb-php) (MIT)\n-   [Apache log4php](http://logging.apache.org/log4php/) (Apache License)\n\n## License\n\nThis project is licensed under the GNU Affero General Public License v3.0 - see the [LICENSE](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnioc%2Fnetatmo-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnioc%2Fnetatmo-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnioc%2Fnetatmo-collector/lists"}