Skip to main content

Ecowitt WN90LP (WS90 RS485 Modbus) client

Project description

ecowitt-wn90lp

The Ecowitt WN90LP is an RS485 Modbus RTU variant of the Ecowitt WS90 outdoor weather sensor:

This package provides an asyncio client using pymodbus to access the registers of the WN90LP device, primarily for reading weather data. It aims to be fairly comprehensive and specification-compliant, though is missing some features supported by the sensor.

This package is not provided by or affiliated with Ecowitt or Fine Offset or any related entities or brands that sell the WN90LP.

About Us

This package is freely provided by Hextronics to give back to the open source community. We produce battery-swapping drone-in-a-box hardware and solutions to enable aerial autonomy. Consider checking out our drone stations at https://hextronics.com/

We use this package to integrate a weather station into our stations so our customers can always know when weather permits flight operations!

Example

async def main() -> None:
    client = WS90Client('/dev/ttyUSB0')
    await client.connect()
    print(await client.read_all())
    client.close()

Light: 27600 lux
UV Index: 2.0
Temperature: 26.4 °C
Humidity: 91 %
Wind Speed: 0.0 m/s
Gust Speed: 1.0 m/s
Wind Direction: 213 °
Abs. Pressure: 101860 Pa
Rainfall: 0.0 mm

Future Work

  • Support measurement commands, registers 0x9C92–0x9C9A excl. 0x9C99
    • Per documentation: "9C92H~9C9AH are commands for start a measurement. Time for solar reading needs 113ms; temperature and wind measurement needs 31ms before data can be read. Barometer reading needs 136ms."
    • Client methods for individual measurements.
    • Bulk measurement of all, and return a WS90Measurement.
  • Support alternate baudrates and changing baudrate while connected.
  • Support values with units and measurement uncertainty (see manual § 8).
  • 0xFDFDFD recovery mode.

Contributing

  • Ensure your editor respects EditorConfig files.
  • 80 character hard ruler.
  • Use PEP 8 as a baseline for style.
  • Always have zero Pyright errors from poetry run pyright. We may need to stub pymodbus eventually.
  • We do not accept contributions under alternate licenses.

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

ecowitt_wn90lp-1.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

ecowitt_wn90lp-1.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file ecowitt_wn90lp-1.1.0.tar.gz.

File metadata

  • Download URL: ecowitt_wn90lp-1.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for ecowitt_wn90lp-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b42f06dc16e19ec5227e5739fc28ef687316b921cc4e8a0b1b4770c1478544a1
MD5 4eb32377216eab8e7615c83e8a51edff
BLAKE2b-256 58a5fdbfa4b3e1c95af3d6e6cb93ac32d13c09f094c7d5c7a51d2eb1d207d949

See more details on using hashes here.

File details

Details for the file ecowitt_wn90lp-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ecowitt_wn90lp-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e8834c49ac69ee2531244416ce8e3b470e2a12d960511e033bbd005b6dd242d
MD5 d481013c7e34cfcfa438b0adf3d71f64
BLAKE2b-256 e1bf53879375cb7ca09ae4f2323adf95c37bc93ccb4f89a1f8c0494177f28148

See more details on using hashes here.

Supported by

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