open-weather-vision / vantjs

platform-independent javascript/typescript interface to Davis Vantage Pro, Davis VantagePro 2 and Davis Vantage Vue
https://open-weather-vision.github.io/vantjs/
7 stars 0 forks source link
davis-vantage davis-weather interface nodejs serialport typescript vantage vantage-pro vantage-pro2 vantage-vue weather weather-data weather-station

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

const highsAndLows = await station.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!
const realtime = await station.getDetailedRealtimeData();

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!
const station = await WeatherStation.connect({
    units: {
        temperature: "°C",
        wind: "km/h",
        rain: "mm",
        ...
    },
    ....
});

const realtime = await station.getDetailedRealtimeData();
console.log(`It's ${realtime.tempIn} °C`);
// Output: It's 23.1233 °C

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.