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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7440aa2bc352b5a8ce3706995a548373fbc79343fad34bf628217e18a7d3e37
|
|
| MD5 |
2b263d99704720487b72fd58a0284746
|
|
| BLAKE2b-256 |
4763781ee8a4e9ded45492b6128effb6b2cd4f3feef478e018a83916d2292d1f
|
Provenance
The following attestation bundles were made for arwn_client-0.2.1.tar.gz:
Publisher:
release.yml on sdague/arwn-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arwn_client-0.2.1.tar.gz -
Subject digest:
a7440aa2bc352b5a8ce3706995a548373fbc79343fad34bf628217e18a7d3e37 - Sigstore transparency entry: 1633492098
- Sigstore integration time:
-
Permalink:
sdague/arwn-client@929b7b7ee0f09a36600d010118e5d382749b9451 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sdague
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@929b7b7ee0f09a36600d010118e5d382749b9451 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c53372c7a0794982fc51b54c5487ebb4ca71f5d27133807a04f29581748f6973
|
|
| MD5 |
4885ce4be0d3d3731d5e7673d7e11705
|
|
| BLAKE2b-256 |
2a595ebc0801644f5e0873437d29cf58d0d00eda59223eedcacfc109a6a6fdb0
|
Provenance
The following attestation bundles were made for arwn_client-0.2.1-py3-none-any.whl:
Publisher:
release.yml on sdague/arwn-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arwn_client-0.2.1-py3-none-any.whl -
Subject digest:
c53372c7a0794982fc51b54c5487ebb4ca71f5d27133807a04f29581748f6973 - Sigstore transparency entry: 1633492116
- Sigstore integration time:
-
Permalink:
sdague/arwn-client@929b7b7ee0f09a36600d010118e5d382749b9451 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sdague
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@929b7b7ee0f09a36600d010118e5d382749b9451 -
Trigger Event:
workflow_dispatch
-
Statement type: