mkeymolen / DavisVantage.WeatherReader

Davis Vantage WeatherReader is a crossplatform .netcore library that reads weather data from a Davis Vantage weatherstation. It follows the official Davis Vantage Pro serial communication protocol
MIT License
4 stars 2 forks source link

Tutorial on How To Use #5

Open mogulman52 opened 6 years ago

mogulman52 commented 6 years ago

This appears to be well designed solution to get Davis Weather station data. I have an opportunity to use it. Is there a tutorial that describes the program and how to use it?

Background I consult with a small company that provides testing services for equipment. They need the temperature, pressure and humidity in the test environment (usually large warehouse). I want to record these values every hour. When they finish test they document results. A program will read test time and record values on document. I use C# but don't know much about Davis products.

mkeymolen commented 6 years ago

A complete tutorial not. You can find a sample how to use in the code with some information in the Readme Last months i didn't spend too much time on it, but i'm planning to upgrade to the latest NetStandard version and instead of using liblog, i want to migrate to ILogger from .NetCore, which has improved during the last months. Does this answer your question?

mogulman52 commented 6 years ago

Thanks! Couple of questions:

  1. Do you have any idea of the timeframe for the upgrade to the latest .Net Core.
  2. Are you available for some consulting?
mkeymolen commented 6 years ago

It is very busy for the moment, but maybe i can upgrade somewhere this week, but i can't promise. What do you mean with "available for consulting"? I have my own software company (info at hexiron.be ) but not sure if that's what you're looking for.

stumper66 commented 4 years ago

Here's is some basic code on how to get the current temperatures.

` WeatherLinkIpSettings settings = new WeatherLinkIpSettings("192.168.1.109", 22222); using (WeatherLinkIpDataLogger logger = new WeatherLinkIpDataLogger(new WeatherLinkIpByteReader(), settings)) { bool Connected = logger.Connect(); Console.WriteLine("Connected: " + Connected.ToString()); if (!Connected) return;

            Task<DavisVantage.WeatherReader.Models.CurrentWeather> task = logger.ReadCurrentWeather(false);
            task.Wait(30000);
            if (!task.IsCompleted)
            {
                Console.WriteLine("Task didn't complete");
                return;
            }

            DavisVantage.WeatherReader.Models.CurrentWeather result = task.Result;
            Console.WriteLine("outside: {0}, inside: {1}", result.TempOutside, result.TempInside);
        }

`