{"id":24101340,"url":"https://github.com/yxtay/sensehat-weather","last_synced_at":"2025-05-08T01:11:38.668Z","repository":{"id":82529109,"uuid":"85709147","full_name":"yxtay/sensehat-weather","owner":"yxtay","description":"Weather Station with Sense HAT on Raspberry Pi.","archived":false,"fork":false,"pushed_at":"2025-02-12T20:14:17.000Z","size":14,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T01:11:36.647Z","etag":null,"topics":["raspberry-pi","sense-hat","weather-station"],"latest_commit_sha":null,"homepage":"","language":"Python","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/yxtay.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}},"created_at":"2017-03-21T14:04:46.000Z","updated_at":"2024-03-01T01:55:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"9704e74c-dd8c-4085-9ba9-9e2fed16066d","html_url":"https://github.com/yxtay/sensehat-weather","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yxtay%2Fsensehat-weather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yxtay%2Fsensehat-weather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yxtay%2Fsensehat-weather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yxtay%2Fsensehat-weather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yxtay","download_url":"https://codeload.github.com/yxtay/sensehat-weather/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978768,"owners_count":21834916,"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":["raspberry-pi","sense-hat","weather-station"],"created_at":"2025-01-10T16:54:48.800Z","updated_at":"2025-05-08T01:11:38.656Z","avatar_url":"https://github.com/yxtay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weather Station with Sense HAT on Raspberry Pi\n\nRecords temperature, humidity and pressure data periodically into Google Spreadsheet with a scheduled cron task.\n\nBased on \n[Mini Weather Station](https://www.hackster.io/idreams/make-a-mini-weather-station-with-a-raspberry-pi-447866) \non hackster.io and modified to run as a cron task.\n\n## Setup\n\n```bash\n# clone the repo\ngit clone https://github.com/yxtay/sensehat-weather.git \u0026\u0026 cd sensehat-weather\n\n# install dependencies\npip install -r requirements.txt --user\n```\n\n## Download OAuth credentials file for Google API\n\nFollow the `gspread` documentation instructions to obtain OAuth credentials from Google Developers Console.\n\nhttp://gspread.readthedocs.io/en/latest/oauth2.html\n\nDownload the credentials json file and copy it into the project directory in your Raspberry Pi.\n\n```bash\n# assuming credentials file is in the current directory\nscp credentials.json pi@192.168.1.5:sensehat-weather/\n```\n\n## Create Google Sheet\n\nCreate a Google Spreadsheet and name it as you desire.\n\nRename the default worksheet as you desire.\n\nOpen up the credentials json file in the previous step \nand note the email address under the `client_email` field. \nShare the spreadsheet with that email address.\n\n## Schedule cron task\n\nOpen crontab in the Raspberry Pi.\n\n```bash\ncrontab -e\n```\n\nCopy the following line into crontab.\nThis schedules the task to run every 5 mins.\n\n```bash\n*/5 * * * * cd $HOME/sensehat-weather \u0026\u0026 python sensehat_weather.py\n```\n\n## Usage\n\nUse optional arguments if your configurations are different from defaults.\n\n```\nusage: sensehat_weather.py [-h] [--credentials-json CREDENTIALS_JSON]\n                           [--spreadsheet SPREADSHEET] [--worksheet WORKSHEET]\n                           [--log LOG]\n\nTake readings from SenseHat and add to Google Spreadsheet.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --credentials-json CREDENTIALS_JSON\n                        path to Google OAuth credentials json file (default: credentials.json)\n  --spreadsheet SPREADSHEET\n                        name of Google Spreadsheet to save SenseHat readings (default: sensehat-weather)\n  --worksheet WORKSHEET\n                        name of worksheet to save SenseHat readings (default: data)\n  --log LOG             path of log file (default: main.log)\n```\n\n## Logs\n\nBy default logs are written to `main.log` in the project directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyxtay%2Fsensehat-weather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyxtay%2Fsensehat-weather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyxtay%2Fsensehat-weather/lists"}