Skip to main content

Python client library for parsing ARWN weather station MQTT messages

Project description

arwn-client

Python client library for parsing ARWN weather station MQTT messages.

Installation

pip install arwn-client

Usage

from arwn_client import parse_message

device = parse_message("arwn/temperature/BackYard", {"temp": 72.5, "units": "F"})
if device:
    print(f"{device.device_name}")
    for r in device.readings:
        print(f"  {r.sensor_name}: {r.value} {r.unit}")
# BackYard
#   BackYard Temperature: 72.5 °F

CLI

arwn listen                          # connect to localhost:1883
arwn listen --host 192.168.1.10      # custom broker host
arwn listen --port 1884              # custom broker port
arwn listen --count 5                # stop after 5 messages
arwn listen --json                   # output as JSON

API

parse_message(topic, payload) -> ArwnDevice | None

Parse an ARWN MQTT message. Returns None for unknown topics.

ArwnDevice

Field Type Description
device_key str Unique key e.g. "temperature_BackYard"
device_name str e.g. "BackYard", "Weather Station"
readings list[ArwnReading] Sensor readings for this device

ArwnReading

Field Type Description
sensor_key str e.g. "temp", "speed"
sensor_name str e.g. "BackYard Temperature"
value float | int The reading value
unit str Unit string e.g. "°F", "mph"

License

Apache 2.0

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

arwn_client-0.2.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

arwn_client-0.2.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file arwn_client-0.2.1.tar.gz.

File metadata

  • Download URL: arwn_client-0.2.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arwn_client-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a7440aa2bc352b5a8ce3706995a548373fbc79343fad34bf628217e18a7d3e37
MD5 2b263d99704720487b72fd58a0284746
BLAKE2b-256 4763781ee8a4e9ded45492b6128effb6b2cd4f3feef478e018a83916d2292d1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for arwn_client-0.2.1.tar.gz:

Publisher: release.yml on sdague/arwn-client

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

File details

Details for the file arwn_client-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: arwn_client-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arwn_client-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c53372c7a0794982fc51b54c5487ebb4ca71f5d27133807a04f29581748f6973
MD5 4885ce4be0d3d3731d5e7673d7e11705
BLAKE2b-256 2a595ebc0801644f5e0873437d29cf58d0d00eda59223eedcacfc109a6a6fdb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for arwn_client-0.2.1-py3-none-any.whl:

Publisher: release.yml on sdague/arwn-client

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