Skip to main content

A project to record weather observations from an AmbientWeather station over the local network - no API needed!

Project description

AmbientWeather to SQLite

PyPI Lint Ruff Code style: black Checked with pyrefly Ask DeepWiki

A project to record minute-by-minute weather observations from an AmbientWeather station over the local network - no API needed!

Key Features

  • Local Network Operation: Direct connection to weather stations without external API dependencies
  • Continuous Data Collection: Automated daemon process collecting data at 60-second intervals
  • Dynamic Schema Management: Automatic database schema evolution as new sensors are detected
  • HTTP JSON API: Optional web server providing live data access, Includes hourly and daily aggregation endpoints.
  • Interactive Configuration: Command-line setup wizard for initial configuration
  • Cross-Platform Distribution: Available via PyPI with pipx installation
  • Zero Dependencies: Pure Python with no (potentially) untrusted 3rd parties.

Installation

  • macOS: brew install pipx && pipx install ambientweather2sqlite
  • Ubuntu / Debian: sudo apt update && sudo apt install pipx && pipx install ambientweather2sqlite
  • Fedora: sudo dnf install pipx && pipx install ambientweather2sqlite

Setup

On the first run of ambientweather2sqlite you will be asked to provide the station's LiveData URL and the database path.

This config file is saved to your current directory by default but may be stored anywhere.

On subsequent runs, you can pass the file name as a command line argument or it will be automatically detected in your current directory or at ~/.aw2sqlite.toml

HTTP JSON API

The optional web server provides live data access and aggregation endpoints:

Endpoints

  • / - Live weather data
  • /daily - Daily aggregated data
  • /hourly - Hourly aggregated data for a specific date

Daily Aggregation

Query parameters:

  • q - Aggregation fields (e.g., avg_outHumi, max_gustspeed)
  • days - Number of prior days (default: 7)
  • tz - Timezone for timestamp conversion (required)

Examples:

/daily?tz=America/New_York&q=avg_outHumi&days=7
/daily?tz=Europe/London&q=min_outTemp&q=sum_eventrain

Hourly Aggregation

Query parameters:

  • date - Date in YYYY-MM-DD format (required)
  • q - Aggregation fields
  • tz - Timezone for timestamp conversion (required)

Examples:

/hourly?date=2025-06-27&tz=America/Chicago&q=avg_outHumi
/hourly?date=2025-06-27&tz=%2B05%3A30&q=max_gustspeed

Timezone Support

Timezone strings can be:

  • IANA timezone names: America/New_York, Europe/London, Asia/Tokyo
  • UTC offsets: +05:30, -08:00
  • URL-encoded when necessary: %2B05%3A30 for +05:30

Development

Pull requests and issue reports are welcome. For major changes, please open an issue first to discuss what you would like to change.

Core Architecture

Control Flow

Legal

© Harold Martin - released under GPLv3

AmbientWeather is a trademark of Ambient, LLC.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ambientweather2sqlite-0.6.1.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ambientweather2sqlite-0.6.1-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file ambientweather2sqlite-0.6.1.tar.gz.

File metadata

  • Download URL: ambientweather2sqlite-0.6.1.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ambientweather2sqlite-0.6.1.tar.gz
Algorithm Hash digest
SHA256 a233601e68910ba4daea5a17cde7e98aea385559b17ddafacf217f9e4611a709
MD5 ed0413b213db41021a2ba354eb08fe84
BLAKE2b-256 0aa8a2f9097c607dbb1a1c3653f01459816b83ef1befc7574270f4a0ef825ad4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ambientweather2sqlite-0.6.1.tar.gz:

Publisher: publish.yml on hbmartin/ambientweather2sqlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ambientweather2sqlite-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ambientweather2sqlite-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 85f933931cd8212fe1b7d081e5f6f655a784c7c20cef6b7f4dd5c3a653c28a4b
MD5 32c9ddb388caaca5f427043dcab9bdda
BLAKE2b-256 8e78df65bcd1cc042d4095fddca8dd8ba4d03c0dbe0614b0f6257206f4cdfa2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ambientweather2sqlite-0.6.1-py3-none-any.whl:

Publisher: publish.yml on hbmartin/ambientweather2sqlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page