{"id":16414628,"url":"https://github.com/mattlqx/poolpi","last_synced_at":"2025-10-26T19:31:15.435Z","repository":{"id":82169726,"uuid":"79751869","full_name":"mattlqx/poolpi","owner":"mattlqx","description":"A collection of scripts to provide readings on my pool temperature.","archived":false,"fork":false,"pushed_at":"2024-10-01T15:14:27.000Z","size":29,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T22:41:30.525Z","etag":null,"topics":["alexa-skill","ds18b20","i2c-sensors","python","raspberry-pi"],"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/mattlqx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-01-22T22:58:45.000Z","updated_at":"2024-10-01T15:14:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed627c96-6303-455a-970f-d61800b8f6fc","html_url":"https://github.com/mattlqx/poolpi","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/mattlqx%2Fpoolpi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattlqx%2Fpoolpi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattlqx%2Fpoolpi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattlqx%2Fpoolpi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattlqx","download_url":"https://codeload.github.com/mattlqx/poolpi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238386473,"owners_count":19463375,"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":["alexa-skill","ds18b20","i2c-sensors","python","raspberry-pi"],"created_at":"2024-10-11T06:54:39.802Z","updated_at":"2025-10-26T19:31:15.086Z","avatar_url":"https://github.com/mattlqx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# poolpi\nA collection of scripts that I'm using to monitor my pool's temperature via a Raspberry Pi and a 1-wire temperature probe. Specifically, a DS18B20 waterproof probe wired to a Pi-EzConnect GPIO hat.\n\n## Prerequisites\n\n* `rrdtool` - I'm just shelling out to rrdtool for now to do the actual data store work.\n* python 2.7 - Most of the scripts are Python.\n* OS packages for Raspian/Debian, in order to compile the pypi `python-rrdtool` module:\n  * `libpango1.0-dev`\n  * `libxml2-dev`\n  * `libcairo2-dev`\n  * `libglib2.0-dev`\n  * `python-dev`\n  * `librrd-dev`\n* python modules - Run `pip install -r requirements.txt`\n* php 5.x - The web frontend is hastily written in PHP. You'll need apache or another web server too.\n\n## Config\n### `location.py`\n\nA simple config so I don't have to put my home location into the public repo. It should look something like this:\n\n```\nfrom pytz import timezone\nimport collections\n\n# Location information\nlongitude = -5;\nlatitude = 22;\nlocaltz = timezone('UTC')\nwebpath = 'https://mywebserver.com/poolpi'\ncolor_start = 0xff0000\ncolor_offset = 12\ntemperature_probes = collections.OrderedDict()\ntemperature_probes['outdoor'] = '28-011620f667ff'\ntemperature_probes['probe'] = '28-011620f667ee'\n```\n\n**NOTE**: Weather Underground has shutdown. As a result, I've removed outdoor temperature scraping. Instead of\nhaving to deal with an external service, I've decided to just go with another temperature probe. So I've added\nthat to the config above. It's an ordered dictionary with the key being the name of the rrd gauge and value being\nthe serial number of the probe. The ordering is important for exporting the structure between Python and PHP.\n\n`color_start` and `color_offset` are used to override the stock colors. The first gauge starts at red and then\neach gauge after that shifts 12 bits.\n\n### RRD\n\nCreate an rrd at `temperature.rrd` with the `tools/create_rrd.py` script.\n\n### Cron\n\nJust add a crontab to take the temperature every minute and store it in rrd:\n```\n* * * * *   poolpi/update_rrd.py\n```\n\n### Web\n\nSymlink or document root the `web` directory. Then you can access `temps.php` for a rudimentary display of\nhourly, daily, weekly and yearly graphs. One graph for each time period will have ambient and probe\ntemperature overlaid and another graph will have just the probe temperature so it's easier to see\nits fluctuation without the scale of the ambient temperature zooming out the graph.\n\n### Alexa\n\nThe Alexa Skill is in the `alexa` directory. Run the `build_lambda_zip.sh` script to install python\ndependencies within the directory and zip it up. You can then place that zip in a Lambda function and\nconfigure an Alexa Skill to use its ARN. The `location.py` config is copied into the zip for configuration\nof the timezone and location of the web server that is hosting the `web` contents.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattlqx%2Fpoolpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattlqx%2Fpoolpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattlqx%2Fpoolpi/lists"}