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

vantjs

v1.0.10

Published

platform independent javascript/typescript interface to Davis Vantage Pro, Pro 2 and Vue

Downloads

510

Readme

vantjs

vantjs is a platform-independent javascript and typescript interface to the Davis Vantage Pro, Pro 2 and Vue. It works on any linux, windows or osx device!

Features

  • Getting hourly, daily, monthly and yearly highs and lows (read more here)
const highsAndLows = await device.getHighsAndLows();

console.log(
    `Todays minimum temperature was ${highsAndLows.tempOut.day.low} °F!`
);
// Output: Today's minimum temperature was 25.3 °F!

console.log(
    `The maximum rain rate in the current hour was ${highsAndLows.rainRate.hour} in/h!`
);
// Output: The maximum rain rate in the current hour was 0.2 in/h!
  • Getting realtime weather data (read more here)
const realtime = await device.getRichRealtimeData();

console.log(`Currently it's ${realtime.tempOut} °F!`);
// Output: Currently it's 45.2 °F!

console.log(
    `The wind blows from ${realtime.windDir} with an average speed of ${realtime.windAvg10m} mph!`
);
// Output: The wind blows from SW with an average speed of 23.12 mph!
  • Converting the weather data automatically to the desired units
const device = await VantPro2Interface.create({
    units: {
        temperature: "°C",
        wind: "km/h",
        rain: "mm",
        ...
    },
    ....
});

const realtime = await device.getRichRealtimeData();
console.log(`It's ${realtime.tempIn} °C`);
// Output: It's 23.1233 °C
  • and more (read the docs!)

Installation

npm install vantjs

Getting Started

Read an introductory guide here. Read a guide about realtime data containers here.

Documentation

Read the full documentation here.

Community

This project is updated on demand. If you have discovered a bug or want to suggest a feature🚀, please create an issue here.

Beyond vantjs

vantjs is only a small part of the Vantage Environment.

While vantjs provides the direct serial connection to the weather station, the vant-api provides a convenient interface for this data in the form of a RESTful API for any kind of application. In the background it utilizes vant-db that manages a database that allows long-term storage and archiving of weather data. The vant-api package also includes a recorder that utilizes vantjs to repeatedly send weather data to the running REST API. These programs together form a robust platform that allows you to use your weather data pretty much anywhere.

⚠️ The Vantage Environment is still in active development. Once it is finished multiple guides will guide you through the process of setting up your very own vantage environment.