Davis Vantage WeatherReader is a crossplatform .netstandard 1.6 and .NETFramework 4.5.1 library that reads weather data from a Davis Vantage weatherstation. It follows the official Vantage Pro, Pro2, and Vue Communications Reference which can be downloaded at http://www.davisnet.com/support/vantage-pro-pro2-and-vue-communications-reference/
- Connecting and reading live weatherdata from a Davis Vantage pro(2 plus) console
- Dynamic logging mechanism by using liblog
- Davis Vantage Weatherstation with console
- Davis Vantage Datalogger
Current supported dataloggers:
- Import the latest DavisVantage.WeatherReader package from nuget.
- Register the the implementations with your preferred IOC container.
Example with autofac:
builder.Register(c => weatherlinkIpSettings).As<IDataLoggerSettings>();
builder.RegisterType<WeatherLinkIpByteReader>().As<IByteReader>();
builder.RegisterType<WeatherLinkIpDataLogger>().As<IDataLogger<WeatherLinkIpSettings>>();
Connect to the console:
using (var dataLogger = scope.Resolve<IDataLogger<WeatherLinkIpSettings>>())
{
if (dataLogger.Connect())
{
var currentWeather = dataLogger.ReadCurrentWeather(true);
var weatherExtremes = dataLogger.ReadWeatherExtremes(true);
}
}
The included samples are working with a Weatherlink IP Data logger and a Davis Vantage Pro2 Plus weatherstation.
- Using NLog for logging.
- Using NLog for logging and autofac as IOC container.
- Settings are read from appsettings.json