2.1.1 • Published 11 months ago
vantjs v2.1.1
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 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!
- Getting realtime weather data (read more here)
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!
- Converting the weather data automatically to the desired units
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
- Stable connection management: On disconnect vantjs repeatedly tries to reconnect in the background, your application won't crash!
- 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.
2.1.1
11 months ago
2.0.2
11 months ago
2.1.0
11 months ago
2.0.1
11 months ago
2.0.0
11 months ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.10
2 years ago
1.0.4
2 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.3.0
3 years ago
0.2.0
3 years ago
1.0.3
3 years ago
0.1.0
4 years ago