{"id":16419577,"url":"https://github.com/wurstbroteater/hometemp","last_synced_at":"2025-07-11T15:17:56.445Z","repository":{"id":195342388,"uuid":"686064311","full_name":"wurstbroteater/HomeTemp","owner":"wurstbroteater","description":"Measure temperature and humdity of a room, retrieve online weather data, visualize it, analyse it and send it via email.","archived":false,"fork":false,"pushed_at":"2025-07-06T18:01:32.000Z","size":10867,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T18:44:50.236Z","etag":null,"topics":["apartment-management-system","data-visualization","raspberry-pi","scraped-data","temperature","temperature-monitoring","temperature-sensor"],"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/wurstbroteater.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-01T16:48:31.000Z","updated_at":"2025-02-10T19:37:05.000Z","dependencies_parsed_at":"2023-10-03T12:44:13.999Z","dependency_job_id":"8e9999e4-f728-4bd5-841c-bb9167c8c0eb","html_url":"https://github.com/wurstbroteater/HomeTemp","commit_stats":{"total_commits":83,"total_committers":3,"mean_commits":"27.666666666666668","dds":"0.048192771084337394","last_synced_commit":"c80cc58386edd2a3ac0f4009bfd8e7a64a3ab92f"},"previous_names":["wurstbroteater/hometemp"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/wurstbroteater/HomeTemp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wurstbroteater%2FHomeTemp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wurstbroteater%2FHomeTemp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wurstbroteater%2FHomeTemp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wurstbroteater%2FHomeTemp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wurstbroteater","download_url":"https://codeload.github.com/wurstbroteater/HomeTemp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wurstbroteater%2FHomeTemp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264837958,"owners_count":23671126,"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":["apartment-management-system","data-visualization","raspberry-pi","scraped-data","temperature","temperature-monitoring","temperature-sensor"],"created_at":"2024-10-11T07:25:11.006Z","updated_at":"2025-07-11T15:17:56.416Z","avatar_url":"https://github.com/wurstbroteater.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project: HomeTemp v0.5\n\nThe original idea of `HomeTemp` was to automatically measure the temperature and humidity of a room and create plots\nvisualizing the data. Currently supported temperature and humidity sensors are `AM2302`. `DHT11` and `DHT22` sensor,\nconnected to a Raspberry Pi 4 Model B or Raspberry Pi 5.\nThe fork `BaseTemp` was created to periodically measure and save the temperature and humidity of my basement. It also\ntakes pictures using a `5MP Raspberry Pi camera module` with an OV5647 sensor and is able to take and send a live\npicture via commanding.\n\n## Requirements\n\n- screen\n- Docker\n- libpq-dev\n- xvfb\n- Python \u003e= 3.9\n- Everything in `requirements.txt` for pip\n\n## Current Features\n\n- Initializing Docker container for Postgres database or reuse existing\n- Connecting to postgres database\n- CRUD operations for tables and columns\n- Creating data visualizations using seaborn and matplot\n- Sending emails containing statistic data as text and visualizations as pdf\n- Data fetching from various API endpoints/websites\n- Commanding via email\n- Taking pictures (timed or commanded) via camera module (only tested on **Raspberry Pi 4 Model B**)\n- Create timelapse video of a set of pictures\n\n## Installation Instructions\n\nThe following steps needs to be performed once to assure correct driver setup.\n\n### Install Dependencies\n\nUse this code snippet to install the required dependencies. Either use pip install with module name or use the\nrequirements file.\n\n#### Install System Dependencies\n\nInstall **docker**, e.g., as described [here for raspberry-pi](https://docs.docker.com/engine/install/raspberry-pi-os/).\n\n```sh\nsudo apt update\nsudo apt install screen libpq-dev xvfb\n```\n\nIn case data fetching from endpoints is a desired feature, chromedriver has to be installed as well (see below).\n\n#### Setup Virtual Environment\n\nFor venv setup, use `--system-site-package` parameter. The following snippets creates the environment in the folder\n`.venv`.\n\n```shell\npython -m venv --system-site-packages .venv\n```\n\n#### Install Python Dependencies\n\nIt is recommended to install the dependencies via `requirements.txt`. Using the latest dependencies via modules names\nmight cause problems.\n\n```sh\n# Recommended\npip install -r requirements.txt\n# or at own risk Module names\npip install opencv-python pillow rpi-lgpio RPI.GPIO lgpio psycopg2 gpiozero docker seaborn SQLAlchemy requests selenium schedule pyvirtualdisplay bs4 jupyter_client jupyter_core\n\n```\n\n### Create config.ini\n\nAt first, rename `default_config.ini` to `config.ini` and assign values to all variables. The field `instance` defines\nto start `HomeTemp` (hometemp) or `BaseTemp` (basetemp).\n\n### Install Chromedriver\n\nSelenium is used to fetch data from endpoints which rely on Javascript.\nOn a raspberry pi, install chromium driver with the following command and set permissions:\n\n```sh\nsudo apt-get install chromium-chromedriver\nsudo chmod -R 755 /usr/lib/chromium-browser\n# or if not existing\nsudo chmod -R 755 /usr/bin/chromedriver\n\n```\n\n## Start Instructions\n\nWhen everything is set up as intended, it should be enough to run `./start.sh [basetemp|hometemp]`. In case it didn't\nwork, the following sections provide information and tips for starting the related services and dependencies.\n\n### Start Docker Container\n\nImages and containers should be pulled or created/reused automatically. However, for this to work, the user needs to be\nadded to the docker group:\n\n```sh\nsudo usermod -aG docker $USER\n```\n\nAfterward, a reboot is required otherwise the following error will occur:\n\n```\ndocker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))\n```\n\nIt is also possible to start the container via the following command. HomeTemp will use this container if the name of\nthe container matches the name specified in `config.ini`.\n\n```sh\ndocker run --name postgres-db -e POSTGRES_PASSWORD=\u003cENTER PASSWORD HERE\u003e -d -p 5432:5432 postgres:latest\n```\n\nafter a restart, use `docker ps -a` to get the container ID and then `docker start \u003ccontainerID\u003e` to start the old\ndatabase.\n\n## Update/Restore Instructions\n\nUse the following commands to import and export database:\n\n```sh\n# Just open pqsql console (leave \\q)\ndocker exec -it postgres-db bash -c \"PGPASSWORD='\u003cDB_PASSWORD\u003e' psql -U \u003cDB_USER\u003e -d \u003cDB_NAME\u003e\"\n# Export\ndocker exec -t postgres-db sh -c 'PGPASSWORD=\u003cDB_PASSWORD\u003e pg_dump -U \u003cDB_USER\u003e \u003cDB_NAME\u003e' \u003e backup.sql\n\n# Import\n# start container\ndocker cp backup.sql postgres-db:/backup.sql\ndocker exec -i postgres-db sh -c 'PGPASSWORD=\u003cDB_PASSWORD\u003e psql -U \u003cDB_USER\u003e -d \u003cDB_NAME\u003e' \u003c backup.sql\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwurstbroteater%2Fhometemp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwurstbroteater%2Fhometemp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwurstbroteater%2Fhometemp/lists"}