diff --git a/CumulusMX/Alarm.cs b/CumulusMX/Alarm.cs
index 8ac7a461..75324d8a 100644
--- a/CumulusMX/Alarm.cs
+++ b/CumulusMX/Alarm.cs
@@ -68,7 +68,7 @@ private void doTriggered(bool value)
// If we were not set before, so we need to send an email?
if (!triggered && Enabled)
{
- cumulus.LogMessage($"Alarm ({Name}): Triggered");
+ cumulus.LogMessage($"Alarm ({Name}): Triggered, value = {Value}");
if (Email && cumulus.SmtpOptions.Enabled && cumulus.emailer != null)
{
@@ -202,7 +202,7 @@ private void doUpTriggered(bool value)
// If we were not set before, so we need to send an email etc?
if (!upTriggered && Enabled)
{
- cumulus.LogMessage($"Alarm ({Name}): Up triggered");
+ cumulus.LogMessage($"Alarm ({Name}): Up triggered, value = {Value}");
if (Email && cumulus.SmtpOptions.Enabled && cumulus.emailer != null)
{
@@ -268,7 +268,7 @@ private void doDownTriggered(bool value)
// If we were not set before, so we need to send an email?
if (!downTriggered && Enabled)
{
- cumulus.LogMessage($"Alarm ({Name}): Down triggered");
+ cumulus.LogMessage($"Alarm ({Name}): Down triggered, value = {Value}");
if (Email && cumulus.SmtpOptions.Enabled && cumulus.emailer != null)
{
diff --git a/CumulusMX/Api.cs b/CumulusMX/Api.cs
index ac55547a..4a84bf07 100644
--- a/CumulusMX/Api.cs
+++ b/CumulusMX/Api.cs
@@ -383,25 +383,25 @@ public async Task GetGraphData(string req)
switch (req)
{
case "tempdata.json":
- await writer.WriteAsync(Station.GetTempGraphData());
+ await writer.WriteAsync(Station.GetTempGraphData(DateTime.Now));
break;
case "winddata.json":
- await writer.WriteAsync(Station.GetWindGraphData());
+ await writer.WriteAsync(Station.GetWindGraphData(DateTime.Now));
break;
case "raindata.json":
- await writer.WriteAsync(Station.GetRainGraphData());
+ await writer.WriteAsync(Station.GetRainGraphData(DateTime.Now));
break;
case "pressdata.json":
- await writer.WriteAsync(Station.GetPressGraphData());
+ await writer.WriteAsync(Station.GetPressGraphData(DateTime.Now));
break;
case "wdirdata.json":
- await writer.WriteAsync(Station.GetWindDirGraphData());
+ await writer.WriteAsync(Station.GetWindDirGraphData(DateTime.Now));
break;
case "humdata.json":
- await writer.WriteAsync(Station.GetHumGraphData());
+ await writer.WriteAsync(Station.GetHumGraphData(DateTime.Now));
break;
case "solardata.json":
- await writer.WriteAsync(Station.GetSolarGraphData());
+ await writer.WriteAsync(Station.GetSolarGraphData(DateTime.Now));
break;
case "dailyrain.json":
await writer.WriteAsync(Station.GetDailyRainGraphData());
@@ -419,7 +419,7 @@ public async Task GetGraphData(string req)
await writer.WriteAsync(Station.GetGraphConfig());
break;
case "airqualitydata.json":
- await writer.WriteAsync(Station.GetAqGraphData());
+ await writer.WriteAsync(Station.GetAqGraphData(DateTime.Now));
break;
case "availabledata.json":
await writer.WriteAsync(Station.GetAvailGraphData());
diff --git a/CumulusMX/Cumulus.cs b/CumulusMX/Cumulus.cs
index 1bd5fef6..635269fa 100644
--- a/CumulusMX/Cumulus.cs
+++ b/CumulusMX/Cumulus.cs
@@ -2185,6 +2185,8 @@ private void WebTimerTick(object sender, ElapsedEventArgs e)
return;
}
+ var now = DateTime.Now;
+
if (WebUpdating == 1)
{
LogMessage("Warning, previous web update is still in progress, first chance, skipping this interval");
@@ -2197,13 +2199,13 @@ private void WebTimerTick(object sender, ElapsedEventArgs e)
ftpThread.Abort();
LogMessage("Trying new web update");
WebUpdating = 1;
- ftpThread = new Thread(DoHTMLFiles) { IsBackground = true };
+ ftpThread = new Thread(() => DoHTMLFiles(now)) { IsBackground = true };
ftpThread.Start();
}
else
{
WebUpdating = 1;
- ftpThread = new Thread(DoHTMLFiles) { IsBackground = true };
+ ftpThread = new Thread(() => DoHTMLFiles(now)) { IsBackground = true };
ftpThread.Start();
}
}
@@ -8317,7 +8319,7 @@ public void ExecuteProgram(string externalProgram, string externalParams)
Process.Start(start);
}
- public void DoHTMLFiles()
+ public void DoHTMLFiles(DateTime ts)
{
try
{
@@ -8339,7 +8341,7 @@ public void DoHTMLFiles()
LogDebugMessage("Done creating standard Data file");
LogDebugMessage("Creating graph data files");
- station.CreateGraphDataFiles();
+ station.CreateGraphDataFiles(ts);
LogDebugMessage("Done creating graph data files");
//LogDebugMessage("Creating extra files");
diff --git a/CumulusMX/CumulusMX.csproj b/CumulusMX/CumulusMX.csproj
index 3daad496..163409db 100644
--- a/CumulusMX/CumulusMX.csproj
+++ b/CumulusMX/CumulusMX.csproj
@@ -110,8 +110,8 @@
..\packages\MimeKit.3.4.1\lib\net48\MimeKit.dll
-
- ..\packages\MQTTnet.4.1.0.247\lib\net461\MQTTnet.dll
+
+ ..\packages\MQTTnet.4.1.1.318\lib\net461\MQTTnet.dll
..\packages\MySqlConnector.2.1.13\lib\net471\MySqlConnector.dll
diff --git a/CumulusMX/DataEditor.cs b/CumulusMX/DataEditor.cs
index 9257f23d..489173b0 100644
--- a/CumulusMX/DataEditor.cs
+++ b/CumulusMX/DataEditor.cs
@@ -812,13 +812,13 @@ internal string GetRecordsLogFile(string recordType)
}
// low chill
- if (rec.WindChill > Cumulus.DefaultHiVal && rec.WindChill < lowWindChill.Value)
+ if (rec.WindChill < lowWindChill.Value)
{
lowWindChill.Value = rec.WindChill;
lowWindChill.Ts = rec.Date;
}
// hi heat
- if (rec.HeatIndex > Cumulus.DefaultHiVal && rec.HeatIndex > highHeatInd.Value)
+ if (rec.HeatIndex > highHeatInd.Value)
{
highHeatInd.Value = rec.HeatIndex;
highHeatInd.Ts = rec.Date;
@@ -853,13 +853,10 @@ internal string GetRecordsLogFile(string recordType)
}
// hi/low humidex
- if (rec.Humidex > Cumulus.DefaultHiVal)
+ if (rec.Humidex > highHumidex.Value)
{
- if (rec.Humidex > highHumidex.Value)
- {
- highHumidex.Value = rec.Humidex;
- highHumidex.Ts = rec.Date;
- }
+ highHumidex.Value = rec.Humidex;
+ highHumidex.Ts = rec.Date;
}
// hi temp
@@ -2321,19 +2318,19 @@ internal string GetMonthlyRecLogFile()
}
// low chill
- if (rec.WindChill > -9999 && rec.WindChill < lowWindChill[monthOffset].Value)
+ if (rec.WindChill < lowWindChill[monthOffset].Value)
{
lowWindChill[monthOffset].Value = rec.WindChill;
lowWindChill[monthOffset].Ts = rec.Date;
}
// hi heat
- if (rec.HeatIndex > -9999 && rec.HeatIndex > highHeatInd[monthOffset].Value)
+ if (rec.HeatIndex > highHeatInd[monthOffset].Value)
{
highHeatInd[monthOffset].Value = rec.HeatIndex;
highHeatInd[monthOffset].Ts = rec.Date;
}
- if (rec.ApparentTemperature > -9999)
+ if (rec.ApparentTemperature > Cumulus.DefaultHiVal)
{
// hi appt
if (rec.ApparentTemperature > highAppTemp[monthOffset].Value)
@@ -2349,7 +2346,7 @@ internal string GetMonthlyRecLogFile()
}
}
- if (rec.FeelsLike > -9999)
+ if (rec.FeelsLike > Cumulus.DefaultHiVal)
{
// hi feels like
if (rec.FeelsLike > highFeelsLike[monthOffset].Value)
@@ -2366,7 +2363,7 @@ internal string GetMonthlyRecLogFile()
}
// hi humidex
- if (rec.Humidex > -9999 && rec.Humidex > highHumidex[monthOffset].Value)
+ if (rec.Humidex > highHumidex[monthOffset].Value)
{
highHumidex[monthOffset].Value = rec.Humidex;
highHumidex[monthOffset].Ts = rec.Date;
diff --git a/CumulusMX/DavisWllStation.cs b/CumulusMX/DavisWllStation.cs
index 5b7853a7..e40d8d36 100644
--- a/CumulusMX/DavisWllStation.cs
+++ b/CumulusMX/DavisWllStation.cs
@@ -3258,6 +3258,7 @@ private void GetAvailableSensors()
catch (Exception ex)
{
cumulus.LogDebugMessage("GetAvailableSensors: WeatherLink API exception: " + ex.Message);
+ return;
}
// Sensor types we are interested in...
diff --git a/CumulusMX/Properties/AssemblyInfo.cs b/CumulusMX/Properties/AssemblyInfo.cs
index e1ca4751..ec832c0d 100644
--- a/CumulusMX/Properties/AssemblyInfo.cs
+++ b/CumulusMX/Properties/AssemblyInfo.cs
@@ -6,7 +6,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Cumulus MX")]
-[assembly: AssemblyDescription("Version 3.22.2 - Build 3213")]
+[assembly: AssemblyDescription("Version 3.22.3 - Build 3214")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Cumulus MX")]
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.22.2.3213")]
-[assembly: AssemblyFileVersion("3.22.2.3213")]
+[assembly: AssemblyVersion("3.22.3.3214")]
+[assembly: AssemblyFileVersion("3.22.3.3214")]
diff --git a/CumulusMX/StationSettings.cs b/CumulusMX/StationSettings.cs
index 1b30fa56..505991e6 100644
--- a/CumulusMX/StationSettings.cs
+++ b/CumulusMX/StationSettings.cs
@@ -1373,6 +1373,7 @@ internal string FtpNow(IHttpContext context)
{
var data = new StreamReader(context.Request.InputStream).ReadToEnd();
var json = WebUtility.UrlDecode(data);
+ var now = DateTime.Now;
// Dead simple (dirty), there is only one setting at present!
var includeGraphs = json.Contains("true");
@@ -1401,7 +1402,7 @@ internal string FtpNow(IHttpContext context)
cumulus.GraphDataFiles[i].CopyRequired = true;
}
cumulus.LogDebugMessage("FTP Now: Re-Generating the graph data files, if required");
- station.CreateGraphDataFiles();
+ station.CreateGraphDataFiles(now);
// (re)generate the daily graph data files, and upload if required
cumulus.LogDebugMessage("FTP Now: Generating the daily graph data files, if required");
@@ -1409,7 +1410,7 @@ internal string FtpNow(IHttpContext context)
cumulus.LogMessage("FTP Now: Trying new web update");
cumulus.WebUpdating = 1;
- cumulus.ftpThread = new Thread(cumulus.DoHTMLFiles) { IsBackground = true };
+ cumulus.ftpThread = new Thread(() => cumulus.DoHTMLFiles(now)) { IsBackground = true };
cumulus.ftpThread.Start();
return "An existing FTP process was aborted, and a new FTP process invoked";
}
@@ -1422,14 +1423,14 @@ internal string FtpNow(IHttpContext context)
cumulus.GraphDataFiles[i].CopyRequired = true;
}
cumulus.LogDebugMessage("FTP Now: Re-Generating the graph data files, if required");
- station.CreateGraphDataFiles();
+ station.CreateGraphDataFiles(now);
// (re)generate the daily graph data files, and upload if required
cumulus.LogDebugMessage("FTP Now: Generating the daily graph data files, if required");
station.CreateEodGraphDataFiles();
cumulus.WebUpdating = 1;
- cumulus.ftpThread = new Thread(cumulus.DoHTMLFiles) { IsBackground = true };
+ cumulus.ftpThread = new Thread(() => cumulus.DoHTMLFiles(now)) { IsBackground = true };
cumulus.ftpThread.Start();
return "FTP process invoked";
}
diff --git a/CumulusMX/WeatherStation.cs b/CumulusMX/WeatherStation.cs
index cbe530ec..473d86a5 100644
--- a/CumulusMX/WeatherStation.cs
+++ b/CumulusMX/WeatherStation.cs
@@ -1807,14 +1807,14 @@ private void MinuteChanged(DateTime now)
cumulus.ftpThread.Abort();
cumulus.LogMessage("Trying new web update");
cumulus.WebUpdating = 1;
- cumulus.ftpThread = new Thread(cumulus.DoHTMLFiles);
+ cumulus.ftpThread = new Thread(() => cumulus.DoHTMLFiles(now));
cumulus.ftpThread.IsBackground = true;
cumulus.ftpThread.Start();
}
else
{
cumulus.WebUpdating = 1;
- cumulus.ftpThread = new Thread(cumulus.DoHTMLFiles);
+ cumulus.ftpThread = new Thread(() => cumulus.DoHTMLFiles(now));
cumulus.ftpThread.IsBackground = true;
cumulus.ftpThread.Start();
}
@@ -1822,7 +1822,7 @@ private void MinuteChanged(DateTime now)
// We also want to kick off DoHTMLFiles if local copy is enabled
else if (cumulus.FtpOptions.LocalCopyEnabled && cumulus.SynchronisedWebUpdate && (now.Minute % cumulus.UpdateInterval == 0))
{
- cumulus.ftpThread = new Thread(cumulus.DoHTMLFiles);
+ cumulus.ftpThread = new Thread(() =>cumulus.DoHTMLFiles(now));
cumulus.ftpThread.IsBackground = true;
cumulus.ftpThread.Start();
}
@@ -2158,7 +2158,7 @@ public void CalculateEvaoptranspiration(DateTime date)
DoET(AnnualETTotal + newET, date);
}
- public void CreateGraphDataFiles()
+ public void CreateGraphDataFiles(DateTime ts)
{
// Chart data for Highcharts graphs
string json = "";
@@ -2178,22 +2178,22 @@ public void CreateGraphDataFiles()
json = GetAvailGraphData();
break;
case "tempdata.json":
- json = GetTempGraphData();
+ json = GetTempGraphData(ts);
break;
case "pressdata.json":
- json = GetPressGraphData();
+ json = GetPressGraphData(ts);
break;
case "winddata.json":
- json = GetWindGraphData();
+ json = GetWindGraphData(ts);
break;
case "wdirdata.json":
- json = GetWindDirGraphData();
+ json = GetWindDirGraphData(ts);
break;
case "humdata.json":
- json = GetHumGraphData();
+ json = GetHumGraphData(ts);
break;
case "raindata.json":
- json = GetRainGraphData();
+ json = GetRainGraphData(ts);
break;
case "dailyrain.json":
json = GetDailyRainGraphData();
@@ -2202,13 +2202,13 @@ public void CreateGraphDataFiles()
json = GetDailyTempGraphData();
break;
case "solardata.json":
- json = GetSolarGraphData();
+ json = GetSolarGraphData(ts);
break;
case "sunhours.json":
json = GetSunHoursGraphData();
break;
case "airquality.json":
- json = GetAqGraphData();
+ json = GetAqGraphData(ts);
break;
}
@@ -2290,7 +2290,7 @@ public void CreateEodGraphDataFiles()
}
}
- public string GetSolarGraphData()
+ public string GetSolarGraphData(DateTime ts)
{
var InvC = new CultureInfo("");
var sb = new StringBuilder("{");
@@ -2298,7 +2298,7 @@ public string GetSolarGraphData()
var sbSol = new StringBuilder("\"SolarRad\":[");
var sbMax = new StringBuilder("\"CurrentSolarMax\":[");
- var dataFrom = DateTime.Now.AddHours(-cumulus.GraphHours);
+ var dataFrom = ts.AddHours(-cumulus.GraphHours);
var data = RecentDataDb.Query("select * from RecentData where Timestamp >=?", dataFrom);
@@ -2350,14 +2350,14 @@ public string GetSolarGraphData()
}
- public string GetRainGraphData()
+ public string GetRainGraphData(DateTime ts)
{
var InvC = new CultureInfo("");
var sb = new StringBuilder("{");
var sbRain = new StringBuilder("\"rfall\":[");
var sbRate = new StringBuilder("\"rrate\":[");
- var dataFrom = DateTime.Now.AddHours(-cumulus.GraphHours);
+ var dataFrom = ts.AddHours(-cumulus.GraphHours);
var data = RecentDataDb.Query("select * from RecentData where Timestamp >=?", dataFrom);
@@ -2381,13 +2381,13 @@ public string GetRainGraphData()
return sb.ToString();
}
- public string GetHumGraphData()
+ public string GetHumGraphData(DateTime ts)
{
var sb = new StringBuilder("{", 10240);
var sbOut = new StringBuilder("\"hum\":[");
var sbIn = new StringBuilder("\"inhum\":[");
- var dataFrom = DateTime.Now.AddHours(-cumulus.GraphHours);
+ var dataFrom = ts.AddHours(-cumulus.GraphHours);
var data = RecentDataDb.Query("select * from RecentData where Timestamp >=?", dataFrom);
@@ -2430,11 +2430,11 @@ public string GetHumGraphData()
return sb.ToString();
}
- public string GetWindDirGraphData()
+ public string GetWindDirGraphData(DateTime ts)
{
var sb = new StringBuilder("{\"bearing\":[");
var sbAvg = new StringBuilder("\"avgbearing\":[");
- var dataFrom = DateTime.Now.AddHours(-cumulus.GraphHours);
+ var dataFrom = ts.AddHours(-cumulus.GraphHours);
var data = RecentDataDb.Query("select * from RecentData where Timestamp >=?", dataFrom);
@@ -2458,12 +2458,12 @@ public string GetWindDirGraphData()
return sb.ToString();
}
- public string GetWindGraphData()
+ public string GetWindGraphData(DateTime ts)
{
var InvC = new CultureInfo("");
var sb = new StringBuilder("{\"wgust\":[");
var sbSpd = new StringBuilder("\"wspeed\":[");
- var dataFrom = DateTime.Now.AddHours(-cumulus.GraphHours);
+ var dataFrom = ts.AddHours(-cumulus.GraphHours);
var data = RecentDataDb.Query("select * from RecentData where Timestamp >=?", dataFrom);
@@ -2487,11 +2487,11 @@ public string GetWindGraphData()
return sb.ToString();
}
- public string GetPressGraphData()
+ public string GetPressGraphData(DateTime ts)
{
var InvC = new CultureInfo("");
StringBuilder sb = new StringBuilder("{\"press\":[");
- var dataFrom = DateTime.Now.AddHours(-cumulus.GraphHours);
+ var dataFrom = ts.AddHours(-cumulus.GraphHours);
var data = RecentDataDb.Query("select * from RecentData where Timestamp >=?", dataFrom);
@@ -2507,7 +2507,7 @@ public string GetPressGraphData()
return sb.ToString();
}
- public string GetTempGraphData()
+ public string GetTempGraphData(DateTime ts)
{
bool append = false;
var InvC = new CultureInfo("");
@@ -2520,7 +2520,7 @@ public string GetTempGraphData()
var sbHeat = new StringBuilder("\"heatindex\":[");
var sbTemp = new StringBuilder("\"temp\":[");
var sbHumidex = new StringBuilder("\"humidex\":[");
- var dataFrom = DateTime.Now.AddHours(-cumulus.GraphHours);
+ var dataFrom = ts.AddHours(-cumulus.GraphHours);
var data = RecentDataDb.Query("select * from RecentData where Timestamp >=?", dataFrom);
@@ -2634,14 +2634,14 @@ public string GetTempGraphData()
return sb.ToString();
}
- public string GetAqGraphData()
+ public string GetAqGraphData(DateTime ts)
{
bool append = false;
var InvC = new CultureInfo("");
var sb = new StringBuilder("{");
var sb2p5 = new StringBuilder("\"pm2p5\":[");
var sb10 = new StringBuilder(",\"pm10\":[");
- var dataFrom = DateTime.Now.AddHours(-cumulus.GraphHours);
+ var dataFrom = ts.AddHours(-cumulus.GraphHours);
// Check if we are to generate AQ data at all. Only if a primary sensor is defined and it isn't the Indoor AirLink
@@ -7257,16 +7257,9 @@ public logfilerec ParseLogFileRec(string data, bool minMax)
try
{
- var notPresent = 0.0;
-
- // is the record going to be used for min/max record determination?
- if (minMax)
- {
- notPresent = Cumulus.DefaultHiVal;
- }
var st = new List(Regex.Split(data, CultureInfo.CurrentCulture.TextInfo.ListSeparator));
- // We allow int values to have a decimal point becuase log files sometimes get mangled by Excel etc!
+ // We allow int values to have a decimal point because log files sometimes get mangled by Excel etc!
var rec = new logfilerec()
{
Date = Utils.ddmmyyhhmmStrToDate(st[0], st[1]),
@@ -7282,23 +7275,80 @@ public logfilerec ParseLogFileRec(string data, bool minMax)
Raincounter = Convert.ToDouble(st[11]),
IndoorTemperature = Convert.ToDouble(st[12]),
IndoorHumidity = Convert.ToInt32(Convert.ToDouble(st[13])),
- WindLatest = Convert.ToDouble(st[14]),
- WindChill = st.Count > 15 ? Convert.ToDouble(st[15]) : notPresent,
- HeatIndex = st.Count > 16 ? Convert.ToDouble(st[16]) : notPresent,
- UV = st.Count > 17 ? Convert.ToDouble(st[17]) : notPresent,
- SolarRad = st.Count > 18 ? Convert.ToDouble(st[18]) : notPresent,
- ET = st.Count > 19 ? Convert.ToDouble(st[19]) : notPresent,
- AnnualETTotal = st.Count > 20 ? Convert.ToDouble(st[20]) : notPresent,
- ApparentTemperature = st.Count > 21 ? Convert.ToDouble(st[21]) : notPresent,
- CurrentSolarMax = st.Count > 22 ? Convert.ToDouble(st[22]) : notPresent,
- SunshineHours = st.Count > 23 ? Convert.ToDouble(st[23]) : notPresent,
- Bearing = st.Count > 24 ? Convert.ToInt32(Convert.ToDouble(st[24])) : 0,
- RG11RainToday = st.Count > 25 ? Convert.ToDouble(st[25]) : notPresent,
- RainSinceMidnight = st.Count > 26 ? Convert.ToDouble(st[26]) : notPresent,
- FeelsLike = st.Count > 27 ? Convert.ToDouble(st[27]) : notPresent,
- Humidex = st.Count > 28 ? Convert.ToDouble(st[28]) : notPresent
+ WindLatest = Convert.ToDouble(st[14])
};
+
+ if (st.Count > 15 && !string.IsNullOrWhiteSpace(st[15]))
+ rec.WindChill = Convert.ToDouble(st[15]);
+ else
+ rec.WindChill = minMax ? Cumulus.DefaultLoVal : 0.0;
+
+ if (st.Count > 16 && !string.IsNullOrWhiteSpace(st[16]))
+ rec.HeatIndex = Convert.ToDouble(st[16]);
+ else
+ rec.HeatIndex = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 17 && !string.IsNullOrWhiteSpace(st[17]))
+ rec.UV = Convert.ToDouble(st[17]);
+ else
+ rec.UV = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 18 && !string.IsNullOrWhiteSpace(st[18]))
+ rec.SolarRad = Convert.ToDouble(st[18]);
+ else
+ rec.SolarRad = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 19 && !string.IsNullOrWhiteSpace(st[19]))
+ rec.ET = Convert.ToDouble(st[19]);
+ else
+ rec.ET = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 20 && !string.IsNullOrWhiteSpace(st[20]))
+ rec.AnnualETTotal = Convert.ToDouble(st[20]);
+ else
+ rec.AnnualETTotal = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 21 && !string.IsNullOrWhiteSpace(st[21]))
+ rec.ApparentTemperature = Convert.ToDouble(st[21]);
+ else
+ rec.ApparentTemperature = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 22 && !string.IsNullOrWhiteSpace(st[22]))
+ rec.CurrentSolarMax = Convert.ToDouble(st[22]);
+ else
+ rec.CurrentSolarMax = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 23 && !string.IsNullOrWhiteSpace(st[23]))
+ rec.SunshineHours = Convert.ToDouble(st[23]);
+ else
+ rec.SunshineHours = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 24 && !string.IsNullOrWhiteSpace(st[24]))
+ rec.Bearing = Convert.ToInt32(Convert.ToDouble(st[24]));
+ else
+ rec.Bearing = 0;
+
+ if (st.Count > 25 && !string.IsNullOrWhiteSpace(st[25]))
+ rec.RG11RainToday = Convert.ToDouble(st[25]);
+ else
+ rec.RG11RainToday = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 26 && !string.IsNullOrWhiteSpace(st[26]))
+ rec.RainSinceMidnight = Convert.ToDouble(st[26]);
+ else
+ rec.RainSinceMidnight = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 27 && !string.IsNullOrWhiteSpace(st[27]))
+ rec.FeelsLike = Convert.ToDouble(st[27]);
+ else
+ rec.FeelsLike = minMax ? Cumulus.DefaultHiVal : 0.0;
+
+ if (st.Count > 28 && !string.IsNullOrWhiteSpace(st[28]))
+ rec.Humidex = Convert.ToDouble(st[28]);
+ else
+ rec.Humidex = minMax ? Cumulus.DefaultHiVal : 0.0;
+
return rec;
}
catch (Exception ex)
diff --git a/CumulusMX/packages.config b/CumulusMX/packages.config
index 8ebf620a..e7179fbb 100644
--- a/CumulusMX/packages.config
+++ b/CumulusMX/packages.config
@@ -5,7 +5,7 @@
-
+
diff --git a/Updates.txt b/Updates.txt
index bc447552..0af9b78b 100644
--- a/Updates.txt
+++ b/Updates.txt
@@ -1,3 +1,15 @@
+3.22.3 - b3214
+——————————————
+Fixed
+- Updates and fixes to the MQTT library
+- Crash in the WLL station fetching Available Sensors from wl.com when it is unreachable
+- Recent data graph JSON files may contain differing numbers of records
+
+Changed
+- The records editors now cope with blank fields (above field 15 - Current Gust) in the monthly log files
+
+
+
3.22.2 - b3213
——————————————
Fixed