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.0.tar.gz (33.5 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.0-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ambientweather2sqlite-0.6.0.tar.gz
  • Upload date:
  • Size: 33.5 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.0.tar.gz
Algorithm Hash digest
SHA256 999c5c54a3d6b3db81712f84b7f1310360f9f546665ea0aff0007782b35403d2
MD5 6df0b26cddcac1f8097e7d362cf92111
BLAKE2b-256 77711ed9aac5150b34065d89d8e45b5b9986fd9cfb5500a64c92261ec547a0e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ambientweather2sqlite-0.6.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ambientweather2sqlite-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15d39d0c1cd0e62a4401bb1d7b1300f533bec40823e2df88ca14cb98b27d5597
MD5 c423cdfcda67be903c6d4cd627d1a4e7
BLAKE2b-256 84665b15f80f480c6ae733402f02e14f8ff298665760808eef0920708ad00039

See more details on using hashes here.

Provenance

The following attestation bundles were made for ambientweather2sqlite-0.6.0-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