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.2.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ecowitt_wn90lp-1.2.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.15.9-arch1-1

File hashes

Hashes for ecowitt_wn90lp-1.2.0.tar.gz
Algorithm Hash digest
SHA256 4e584b5affadf228761d9f5dc9b893775126b3c718da3be4f2b43237c90820b3
MD5 f88d05abaae38f040f08be8e6ed79beb
BLAKE2b-256 7511348db4c264572018c503da7c1e2b5b09817dd660a5c7df942c9fe70f2a2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ecowitt_wn90lp-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.15.9-arch1-1

File hashes

Hashes for ecowitt_wn90lp-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbc51bdb3808d99f122f0defdb2cb4bd04551252fcc9a33e44b27ec85574426b
MD5 622ac9ce9f813b60fde2910d89ad463f
BLAKE2b-256 33aa6519f3a3d234d1d92f99c1ab4fadccfa5dac9c6419057c485e233ab41794

See more details on using hashes here.

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