{"id":16520059,"url":"https://github.com/pageauc/enviro-pi","last_synced_at":"2025-06-19T14:33:37.442Z","repository":{"id":74954754,"uuid":"214843204","full_name":"pageauc/enviro-pi","owner":"pageauc","description":"Use RPI with Sensehat to monitor humidity, temperature, barometric pressure.  View data and graphs on a web browser. Optionally Upload data to Weather Underground Personal Weather Station","archived":false,"fork":false,"pushed_at":"2024-09-26T19:21:44.000Z","size":263,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T12:45:30.070Z","etag":null,"topics":["curl-install","graphs","humidity","personal-weather-station","pws","raspberry-pi","sense-hat","sqlite3-database","temperature","trends","webserver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pageauc.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}},"created_at":"2019-10-13T15:20:17.000Z","updated_at":"2024-10-05T14:48:50.000Z","dependencies_parsed_at":"2024-02-28T11:44:28.119Z","dependency_job_id":"00bd1e2a-ff61-47d0-8f2a-f879416aa4b1","html_url":"https://github.com/pageauc/enviro-pi","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/pageauc%2Fenviro-pi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Fenviro-pi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Fenviro-pi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Fenviro-pi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pageauc","download_url":"https://codeload.github.com/pageauc/enviro-pi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238614553,"owners_count":19501479,"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":["curl-install","graphs","humidity","personal-weather-station","pws","raspberry-pi","sense-hat","sqlite3-database","temperature","trends","webserver"],"created_at":"2024-10-11T16:49:25.333Z","updated_at":"2025-02-13T07:31:11.504Z","avatar_url":"https://github.com/pageauc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Enviro-Pi\nMonitor temperature, humidity, barometric pressure trends with a Raspberry Pi and SenseHat.\nData is stored in a sqlite3 database. Default updates are every 5 minutes.  \n\nA webserver allows viewing data trends status, charts and statistics from a web browser on your local network.\n\nIncludes optional feature to upload data to the Weather Underground Personal Weather Station web site.\n\nThis project is a modified version originally from https://github.com/odlevakp/enviro-pi\n\n### Quick Install\n**IMPORTANT** - It is suggested you do a Raspbian ***sudo apt-get update*** and ***sudo apt-get upgrade***\nbefore curl install.  You should have a recent RPI OS distro.  Bullseye or later.\n\n***Step 1*** With mouse left button press copy icon on right side of box below.    \n***Step 2*** On RPI putty SSH or terminal session right click, select paste then Enter to download and run script.\n\n    curl -L https://raw.github.com/pageauc/enviro-pi/master/setup.sh | bash\n\nThis will install and setup the ~/enviro-pi directory\n\n### To Run/Test\nFrom SSH or Terminal Session input the following command to test run enviro-pi.py.\n\n    cd ~/enviro-pi\n    ./enviro-pi.py\n    \nMonitor log activity to ensure correct operation. \n\nNote if sense hat display is enabled \n* Red up arrow indicates temp rise since last reading. \n* Blue down arrow temperature decreased since lasr reading.  \n* Red/blue stripes no change.  \n* pixel in top left indicates upload status. Green last upload successful. Red last upload failed.    \n    \n### Setup enviro-pi.py and enviro-web.py as background tasks \n    \n    ./run.sh help\n    ./run.sh install\n    ./run.sh status\n    ./run.sh start\n    ./run.sh status\n    \nExample of Help screen below For more information on supervisor [See Docs](https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps)\n \n```\n./run.sh ver 2.0  written by Claude Pageau\nControl enviro-pi.py enviro-web.py\n\nUsage: ./run.sh [Option]\n\nOptions:\n  start        Start supervisor service\n  stop         Stop supervisor service\n  status       Status of supervisor service\n  install      Install symbolic links for supervisor service\n  uninstall    Uninstall symbolic links for supervisor service\n  upgrade      Upgrade files from Github Repo\n  help         Display Usage message and Status\n\nExample:  ./run.sh status\n\n```\n    \n#### Note   \n***./run.sh install*** command above will setup systemd supervisor symbolic links.   \nThis will auto start enviro-web.py and enviro-pi.py on boot.\nSee run.sh help for other options. Eg start, stop, upgrade.  Reboot to test autostart.\n\n### Web Interface \nTo Access enviro-pi web interface See ***./run.sh*** help.      \n\nFrom a computer on your local network, Type or copy/paste url link into web browser url box.     \n\n#### On the Enviro-Pi Web Page\nPress top menu ***Status*** button to view current data. Press ***Refresh Page*** button to update data.    \nIf no data displayed check sensehat hardware and setup.\n\nAfter startup, allow 15-20 minutes to accumulate chart data (default updates are every 5 minutes).   \nPress ***Charts*** button to display historical data, Press green box pull down to select time range,    \nthen     \nPress ***Load/Refresh Charts*** button to update graphs for selected range.\nGraphs will update automatically after that but you can always refresh with the ***Load Charts*** button\n\n### Setup Weather Underground Personal Weather Station \n\nenviro-pi.py has an optional feature to upload your data to the Weather Undergound Personal Weather Station.\nTo setup your Raspberry Pi and Sense Hat to upload data\n\n* Create/login to an account at https://www.wunderground.com/login?action=member-devices\n* Add New Device and select Raspberry Pi from pulldown.\n* Setup device name and location per web site instuctions.\n* When device registration is complete you will receive a Station ID and a Station Key.\n* login to your raspberry pi and cd to enviro-pi folder.\n* nano config.py and edit weather station settings to add your STATION_ID AND STATION_KEY.\n* Edit STATION_UPLOAD_ON = True\n* Ctrl-x y to save changes and exit nano\n\nTo test\n\n    ./run.sh stop\n    ./enviro-pi.py\n    \nReview logs to ensure uploads are successful.\nIf OK restart enviro-pi.py and weather.py \n\n    ./run.sh start\n    \n\n### Hardware Requirements\n* [Raspberry Pi](https://www.raspberrypi.org/products/) 2, 3, 4  suggest using Raspbian Buster or Stretch.   \n* [RPI SenseHat board](https://www.raspberrypi.org/products/sense-hat/)   \n* [40 pin GPIO Ribbon Cable](https://thepihut.com/products/gpio-ribbon-cable-for-raspberry-pi-40-pins) (optional)\n\nIf you put your SenseHat on top of your Pi, the temperature readings will be\ninaccurate due to the heat coming from the pi - that's what the optional ribbon cable is for:\nTo use your SenseHat with a ribbon cable, you can carefully remove the GPIO header on the bottom of the hat.\nIt won't go easy the first time, just remember, you are removing the bottom one ;-)\n![SenseHat Ribbon Cable](http://files.phisolutions.eu/enviro-pi-hw1.jpg \"SenseHat with Ribbon Cable\")\n\n### Edit Configuraton\nUser Variables are stored in the config.py file.  Edit this file to change variables per comments\n\n    cd ~/enviro-pi\n    nano config.py\n\nPress ctrl-x y to exit and save nano changes.\n\n### Screenshots\n![Status MacOS screenshot](http://files.phisolutions.eu/status.png \"Status MacOS screenshot\")\n![Charts MacOS screenshot](http://files.phisolutions.eu/charts.png \"Charts MacOS screenshot\")\n![Statistics Android screenshot](http://files.phisolutions.eu/statistics.png \"Statistics Android screenshot\")\n\n### How to Query sqlite database\nThe writer process is storing environmental readings in a local SQLite database. You can use the CLI client\nto make additional queries on the recorded dataset.\n\n```\ncd ~/enviro-pi\nsqlite3 enviro-pi.db\n\nsqlite\u003e .headers on\nsqlite\u003e .mode column\n\nsqlite\u003e SELECT * FROM sensehat;\n\nsqlite\u003e SELECT MAX(humidity),\ndatetime(epoch, 'unixepoch', 'localtime') as date\nFROM sensehat;\n```\nctrl-d to exit sqlite3 console.   \n\n***Note*** Time is stored in the `epoch` column as time since epoch. \nColumn `temp_prs` stores temperature from pressure, not used in the web interface.\n\n### License and Authors\nCopyright 2016 Pavol Odlevak\n\nUsing \u003ca href=\"http://www.chartjs.org/\"\u003eChart.js\u003c/a\u003e     \nand \u003ca href=\"http://momentjs.com/\"\u003eMoment.js\u003c/a\u003e available under the MIT license.\n\nThe application was inspired by the following resources:\n\n* [Sense-hat API documentation](https://pythonhosted.org/sense-hat/)\n* [w3schools](https://pythonhosted.org/sense-hat/) - for HTML menus, templates and CSS.\n* [ChartJS](http://www.chartjs.org/docs) - Awesome charts used to display environment readings.\n* [Flask](http://flask.pocoo.org/) - Web server used to display data, inspired by [this](https://github.com/pallets/flask/tree/master/examples/flaskr) blog example.\n* [Python sqlite tutorial](http://zetcode.com/db/sqlitepythontutorial/)\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpageauc%2Fenviro-pi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpageauc%2Fenviro-pi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpageauc%2Fenviro-pi/lists"}