{"id":24962979,"url":"https://github.com/pixelweatherproject/pw-hassgen","last_synced_at":"2025-07-31T22:03:22.174Z","repository":{"id":274229136,"uuid":"736386736","full_name":"PixelWeatherProject/pw-hassgen","owner":"PixelWeatherProject","description":"PixelWeather configuration generator tool for Home Assistant's SQL integration.","archived":false,"fork":false,"pushed_at":"2025-05-17T14:48:57.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-03T12:45:03.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/PixelWeatherProject.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,"zenodo":null}},"created_at":"2023-12-27T19:00:02.000Z","updated_at":"2025-05-17T14:48:12.000Z","dependencies_parsed_at":"2025-05-17T15:37:40.270Z","dependency_job_id":null,"html_url":"https://github.com/PixelWeatherProject/pw-hassgen","commit_stats":null,"previous_names":["pixelweatherproject/pw-hassgen"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/PixelWeatherProject/pw-hassgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelWeatherProject%2Fpw-hassgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelWeatherProject%2Fpw-hassgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelWeatherProject%2Fpw-hassgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelWeatherProject%2Fpw-hassgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PixelWeatherProject","download_url":"https://codeload.github.com/PixelWeatherProject/pw-hassgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelWeatherProject%2Fpw-hassgen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268125634,"owners_count":24200284,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-02-03T09:54:26.160Z","updated_at":"2025-07-31T22:03:22.167Z","avatar_url":"https://github.com/PixelWeatherProject.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PixelWeather Configuration Generator for Home Assistant\n\nA tool for easily generating configuration files containing entity configurations all of your PixelWeather nodes. This allows you to integrate your PixelWeather nodes with [Home Assistant](https://www.home-assistant.io/), a FOSS home automation system. All sensor data is pulled from the same database as the one used by the [PWMP server](https://github.com/PixelWeatherProject/pwmp-server).\n\nThis tool requires a pre-configured database (see [this](https://github.com/PixelWeatherProject/pwmp-server)). Since the PWMP server only supports PostgreSQL, this tool also has the same restriction.\n\n## CLI\n```\nHome Assistant configuration generator for PixelWeather.\n\nUsage: pw-hassgen [OPTIONS] --username \u003cUSERNAME\u003e --password \u003cPASSWORD\u003e --database \u003cDATABASE\u003e \u003cHOST\u003e \u003cCOMMAND\u003e\n\nCommands:\n  generate  Generate YAML configuration\n  help      Print this message or the help of the given subcommand(s)\n\nArguments:\n  \u003cHOST\u003e  Database Host\n\nOptions:\n      --port \u003cPORT\u003e          Database Port [default: 5432]\n  -u, --username \u003cUSERNAME\u003e  Database username\n  -p, --password \u003cPASSWORD\u003e  Database password\n  -d, --database \u003cDATABASE\u003e  Database name\n  -h, --help                 Print help\n  -V, --version              Print version\n```\nThe `generate` command provides additional options for more customization.\n\n## Example output\n```yml\n- name: Node 1 Temperature\n  query: SELECT CAST(temperature AS DECIMAL(4, 2)) FROM measurements WHERE node = 1 ORDER BY \"when\" DESC LIMIT 1;\n  column: temperature\n  db_url: postgresql://user:pass@192.168.0.111:5432/pixelweather\n  unit_of_measurement: °C\n  device_class: temperature\n  state_class: MEASUREMENT\n  icon: mdi:thermometer\n- name: Node 1 Humidity\n  query: SELECT humidity FROM measurements WHERE node = 1 ORDER BY \"when\" DESC LIMIT 1;\n  column: humidity\n  db_url: postgresql://user:pass@192.168.0.111:5432/pixelweather\n  unit_of_measurement: '%'\n  device_class: humidity\n  state_class: MEASUREMENT\n  icon: mdi:water-percent\n- name: Node 1 Battery\n  query: SELECT CAST(battery AS DECIMAL(3, 2)) FROM statistics JOIN measurements ON measurements.id = statistics.measurement WHERE measurements.node = 1 ORDER BY \"when\" DESC LIMIT 1;\n  column: battery\n  db_url: postgresql://user:pass@192.168.0.111:5432/pixelweather\n  unit_of_measurement: V\n  device_class: voltage\n  state_class: MEASUREMENT\n  icon: mdi:battery\n- name: Node 1 WiFi ESSID\n  query: SELECT wifi_ssid FROM statistics JOIN measurements ON measurements.id = statistics.measurement WHERE measurements.node = 1 ORDER BY \"when\" DESC LIMIT 1;\n  column: wifi_ssid\n  db_url: postgresql://user:pass@192.168.0.111:5432/pixelweather\n  icon: mdi:wifi\n- name: Node 1 WiFi Signal Strength\n  query: SELECT wifi_rssi FROM statistics JOIN measurements ON measurements.id = statistics.measurement WHERE measurements.node = 1 ORDER BY \"when\" DESC LIMIT 1;\n  column: wifi_rssi\n  db_url: postgresql://user:pass@192.168.0.111:5432/pixelweather\n  unit_of_measurement: dBm\n  device_class: signal_strength\n  state_class: MEASUREMENT\n  icon: mdi:signal-cellular-2\n```\n\n## Caveats\n- **All database connection info (incl. username and password) are stored in plain-text! Unfortunately, as of now, Home Assistant does NOT provide an alternative solution.**\n- Currently, it's not possible to read **nor** change node settings.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelweatherproject%2Fpw-hassgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelweatherproject%2Fpw-hassgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelweatherproject%2Fpw-hassgen/lists"}