{"id":48577809,"url":"https://github.com/realfatcat/raspiweather","last_synced_at":"2026-04-08T16:03:37.273Z","repository":{"id":333350868,"uuid":"1129254376","full_name":"RealFatCat/raspiweather","owner":"RealFatCat","description":"Weather monitoring service for Raspberry Pi that reads temperature, humidity, and pressure data from a BME280 sensor.","archived":false,"fork":false,"pushed_at":"2026-01-25T18:29:07.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-26T09:18:28.981Z","etag":null,"topics":["bme280","golang","lcd1602","raspberry-pi","weather"],"latest_commit_sha":null,"homepage":"","language":"Go","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/RealFatCat.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-06T20:40:52.000Z","updated_at":"2026-01-25T16:44:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/RealFatCat/raspiweather","commit_stats":null,"previous_names":["realfatcat/raspiweather"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/RealFatCat/raspiweather","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealFatCat%2Fraspiweather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealFatCat%2Fraspiweather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealFatCat%2Fraspiweather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealFatCat%2Fraspiweather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RealFatCat","download_url":"https://codeload.github.com/RealFatCat/raspiweather/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealFatCat%2Fraspiweather/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31562697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["bme280","golang","lcd1602","raspberry-pi","weather"],"created_at":"2026-04-08T16:03:36.198Z","updated_at":"2026-04-08T16:03:37.267Z","avatar_url":"https://github.com/RealFatCat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RaspiWeather\n\nA lightweight weather monitoring service for Raspberry Pi that reads temperature, humidity, and pressure data from a BME280 sensor and exposes it via simple HTTP API and Prometheus metrics.\n\n## Features\n\n- Reads temperature, humidity, and pressure from BME280 sensor(s) via I2C\n- Supports multiple BME280 sensors simultaneously\n- Exposes Prometheus metrics at `/metrics`\n- Provides JSON endpoint at `/sensor-data`\n- LCD1602 display support with backlight control\n- Configurable data collection interval\n- Cross-platform builds for multiple architectures\n\n## Requirements\n\n- Go 1.25.5 or later\n- BME280 sensor(s) connected via I2C\n- Raspberry Pi (tested on old Model 1B)\n- LCD1602 (Optional, for display output)\n\n## Building\n\n```bash\n# Build for current platform\nmake build\n\n# Build for specific architecture\nmake build-linux-arm5\nmake build-linux-arm6\nmake build-linux-arm7\nmake build-linux-arm64\nmake build-linux-amd64\n\n# Build for all architectures\nmake build-all\n\n# Clean build artifacts\nmake clean\n```\n\n## Installation\n\n1. Copy the binary to your Raspberry Pi:\n   ```bash\n   scp raspiweather-linux-arm7 pi@raspberrypi:/usr/bin/raspiweather\n   ```\n\n2. Make it executable (just in case):\n   ```bash\n   chmod +x /usr/bin/raspiweather\n   ```\n\n3. Enable I2C on your Raspberry Pi (if not already enabled):\n   ```bash\n   sudo raspi-config\n   # Navigate to: Interfacing Options -\u003e I2C -\u003e Enable\n   ```\n\n## Usage\n\n```bash\n# Run with default settings (reads from /dev/i2c-1:0x76 every minute)\n./raspiweather\n\n# Run with multiple sensors\n./raspiweather -bmeSensors \"out:/dev/i2c-1:0x76,in:/dev/i2c-1:0x77\"\n\n# Run with LCD display enabled\n./raspiweather -lcd -lcdBacklight\n\n# Run with custom interval and HTTP address\n./raspiweather -interval 30s -httpAddress \":8080\"\n```\n\n### Command Line Options\n\n```\n$ raspiweather -h\nUsage of raspiweather:\n  -bmeSensors string\n        Comma-separated list of BME280 sensors in format id:devPath:address \n        (e.g., 'out:/dev/i2c-1:0x76,sensor2:/dev/i2c-1:0x77') (default \"out:/dev/i2c-1:0x76\")\n  -httpAddress string\n        Address for HTTP Server (default \":9111\")\n  -interval duration\n        Interval of collecting sensors data (default 1m0s)\n  -lcd\n        Enable LCD1602\n  -lcdAddr int\n        Address of lcd1602 (default 39)\n  -lcdBacklight\n        Turn on LCD backlight\n  -lcdCols int\n        Number of LCD columns (default 16)\n  -lcdDevPath string\n        Path to i2c lcd device (default \"/dev/i2c-1\")\n  -lcdRows int\n        Number of LCD rows (default 2)\n  -v    Show version and exit\n```\n\n#### Sensor Configuration Format\n\nThe `-bmeSensors` flag accepts a comma-separated list of sensors in the format `id:devPath:address`:\n- `id`: Unique identifier for the sensor (e.g., \"out\", \"in\", \"sensor1\")\n- `devPath`: Path to the I2C device (e.g., \"/dev/i2c-1\")\n- `address`: I2C address in decimal or hexadecimal format (e.g., \"0x76\" or \"118\")\n\nExamples:\n- Single sensor: `-bmeSensors \"out:/dev/i2c-1:0x76\"`\n- Multiple sensors: `-bmeSensors \"out:/dev/i2c-1:0x76,in:/dev/i2c-1:0x77\"`\n\n## API Endpoints\n\n### GET /sensor-data\n\nReturns current sensor readings from all configured sensors in JSON format:\n\n```json\n[\n  {\n    \"sensor_id\": \"out\",\n    \"temperature\": 25.0,\n    \"humidity\": 44.0,\n    \"pressure\": 1000.0\n  },\n  {\n    \"sensor_id\": \"in\",\n    \"temperature\": 22.5,\n    \"humidity\": 50.0,\n    \"pressure\": 1001.2\n  }\n]\n```\n\n### GET /metrics\n\nPrometheus metrics endpoint with the following metrics:\n\n- `sensor_temperature` - Current temperature in Celsius (labeled by sensor_id)\n- `sensor_humidity` - Current humidity in percent (labeled by sensor_id)\n- `sensor_pressure` - Current pressure in hPa (labeled by sensor_id)\n\n### GET /toggle-leds\n\nToggles the LCD backlight on/off. Returns \"OK\" on success. Requires LCD to be enabled.\n\n## Examples\n\nThe [examples](examples) directory contains configuration files and templates to help you get started:\n\n- [examples/systemd/raspiweather.service](examples/systemd/raspiweather.service) - Systemd service file for running raspiweather as a system service. \n\n- [examples/grafana/dashboard.json](examples/grafana/dashboard.json) - Grafana dashboard configuration for visualizing temperature, humidity, and pressure metrics from Prometheus.\n\n## Misc\n\nThere is a simple telegram bot for this project: https://github.com/RealFatCat/raspiweatherbot\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealfatcat%2Fraspiweather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealfatcat%2Fraspiweather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealfatcat%2Fraspiweather/lists"}