npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pimatic-metar-weather

v0.9.2

Published

Pimatic plugin to obtain weather data from METAR reports

Downloads

42

Readme

pimatic-metar-weather

Npm Version Build Status Dependency Status Greenkeeper badge

Pimatic plugin to obtain weather data from METAR reports.

Introduction

METAR is the abbreviation for METeorological Aerodrome Reports standardized by the ICAO. It was introduced in 1968 to provide pilots with observational weather data to be used for pre-flight weather briefings, for example. Nowadays, METAR data can be obtained for about 9000 airport sites around the world. Typically, the accuracy of the measurement data is better than the data provided by the numerous public weather services.

Currently, the plugin is able to provide data for

  • air temperature at ground-level
  • dew point temperature
  • relative humidity
  • barometric pressure
  • wind speed, direction, and gust
  • generalized cloud cover in percent based on octas where cover for different heights is accumulated
  • precipitation (rain and snow if available)

Additionally, it possible to obtain the observation time, that is the UTC time stamp at which the measured data has been recorded.

Future work

There are a couple of things on my list:

  • ~~add information on precipitation (rain and snow if available)~~
  • add switch to support imperial measures
  • provide a textual report on visibility, clouds and precipitation
  • add support for TAF forecasts
  • localization

Contributions

Contributions to the project are welcome. You can simply fork the project and create a pull request with your contribution to start with. If you like this plugin, please consider ★ starring the project on github.

Plugin Configuration

{
      "plugin": "metar-weather",
      "debug": false,
}

The plugin has the following configuration properties:

| Property | Default | Type | Description | |:------------------|:---------|:--------|:--------------------------------------------| | debug | false | Boolean | Debug mode. Writes debug messages to the pimatic log, if set to true |

Device Configuration

MetarWeather Device Type

Screenshot

The Metar Weather device is provided to obtain weather data for a single location.

{
      "id": "metar-1",
      "name": "TXL",
      "class": "MetarWeather",
      "attributes": [
        "temperature",
        "dewPoint",
        "humidity",
        "pressure",
        "windSpeed",
        "windGust",
        "windDirection",
        "clouds"
      ],
      "stationCode": "EDDT",
      "interval": 30
}

The location is identified by four letter station code. It can be looked up as follows:

The device has the following configuration properties:

| Property | Default | Type | Description | |:------------------|:---------|:--------|:--------------------------------------------| | interval | 30 | Number | The data acquisition time interval in minutes (minimum 30) | | stationCode | - | String | The 4-letter station code for the weather station | | attributes | "temperature" | Enum | The attribute to be exhibited by the device |

MetarWeatherTimeBased Device Type

This device type has the same configuration properties as MetarWeather and provides additional properties to query the weather data at the given local time of day being transformed to a given target timezone. In other words, it is possible to get the weather data at the same time of day in the target timezone as the local time of day.

Depending on the timezones used the current time of day in the target timezone may be less than requested time of day. In this case the data of the previous day will be used. If daylight savings shall be ignored it is suggested to use universal time UTC along with a given offset time. The following configuration properties are provided:

| Property | Default | Type | Description | |:------------------|:---------|:--------|:--------------------------------------------| | interval | 30 | Number | The data acquisition time interval in minutes (minimum 30) | | stationCode | - | String | The 4-letter station code for the weather station | | attributes | "temperature" | Enum | The attribute to be exhibited by the device | | localTimezone | "" | String | The local time zone to be applied. If empty the timezone derived from the system will be used | | localUtcOffset | 0 | Number | Local timezone offset to be added localTimezone. Useful if local timezone is UTC | | targetTimezone | "UTC | String | The target time zone to be applied. If the timezone is running behind UTC the data of the previous day will be used | | targetUtcOffset | 0 | Number | Target timezone offset to be added targetTimezone. Useful if target timezone is UTC |

Links