Page 1 of 1

WH45 Values - Extra Sensors

Posted: Tue 28 Feb 2023 8:58 pm
by iandrews
Just got a Ecowitt WH45 to go with the gateway and lightning & soil temp and moisture sensors I got a few weeks ago.

The WH45 data is showing up on the Extra sensors page, but I have a question.

"CO₂ Current", "PM 2.5", "PM 10" are the current values.
"CO₂ 24h avg" is the same as the CO₂ 24 Hours Average value as shown on the ecowitt.net page and the Live Data page of the GW1100.
However what / where is the "PM 2.5 24h avg" and "PM 2.5 24h avg" taken from. The ecowitt.net page and the Live Data page of the GW1100 show a "Real-time AQI" and a "24H AQI" for 2.5 and 10, however that is a Index value and not a µg/m³ value as shown on the sensors page. Is this average being worked out by Cumulus from values over the last 24 hours, or is it a value that the GW1100 is sending (but not shown on the ecowitt.net page / Live Data page or even the /get_livedata_info URL).

Thanks.

Re: WH45 Values - Extra Sensors

Posted: Tue 28 Feb 2023 9:25 pm
by mcrossley
They are sent by the gateway.

Re: WH45 Values - Extra Sensors

Posted: Tue 28 Feb 2023 9:39 pm
by iandrews
OK, Thanks, Assume it must relate somehow to the 24H AQI value, but just in µg/m³ instead.

Also, I can't see that Cumulus shows (has a web tag for?) the 24H (or Real-time) AQI value, is that correct. (Though notice the AQI value seems to be the US standard, so is different to the UK AQI standard my Davis AirLink is showing).

Re: WH45 Values - Extra Sensors

Posted: Wed 01 Mar 2023 10:55 am
by mcrossley
Currently CMX does not calculate the AQI values for the Ecowitt devices - something to add to the ToDo list.
There is already an item to rationalise air quality readings across all sensors.

It does receive the US AQI for the WH41 when using the HTTP protocol station but does not do anything with it. Really it needs to calculate all the AQI values from the PM readings according to the scale selected by the user.

Re: WH45 Values - Extra Sensors

Posted: Wed 01 Mar 2023 11:32 am
by iandrews
Ok, thanks.

Also, may have found a bug with setting Extra Sensor values.

As per in another thread I have some Powershell code to read the temp / humidity of the GW1100 and send it to Cumulus to populate Sensor 9.

I create the data to send with:

Code: Select all

$body = @{
    'temp9f'=$wh25temp
    'humidity9'=$wh25hum
    }
And that works as expected.

I know the temp / humidity of the CO2 sensor is shown on the CO2 graph, but I was also trying to get it to show on the graph with all my other extra temp sensors.

I modified my powershell code to create the following data string to send:

Code: Select all

$body = @{
    'temp10f'=$co2temp
    'humidity10'=$co2hum
    }

however when I send it despite getting a 200 response the sensor 10 doesn't update.

Looking at the source code, in HttpStationEcowitt.cs the following code seems to indicate that 10 can be used:

Code: Select all

private void ProcessExtraTemps(NameValueCollection data, WeatherStation station, DateTime ts)
{
	for (var i = 1; i <= 10; i++)
	{
		if (data["temp" + i + "f"] != null)
		{
			if (i == cumulus.Gw1000PrimaryTHSensor)
			{
				station.DoOutdoorTemp(ConvertTempFToUser(Convert.ToDouble(data["temp" + i + "f"], invNum)), ts);
			}
			station.DoExtraTemp(ConvertTempFToUser(Convert.ToDouble(data["temp" + i + "f"], invNum)), i);
		}
	}
}

// === Extra Temperature ===
if (main || cumulus.EcowittExtraUseTempHum)
{
	try
	{
		// temp[1-10]f
		ProcessExtraTemps(data, thisStation, recDate);
	}
	catch (Exception ex)
	{
		cumulus.LogMessage($"{procName}: Error in extra temperature data - {ex.Message}");
	}
}
And in WeatherStation.cs you define the arrary for the extra sensors:

Code: Select all

ExtraTemp = new double[11];
But later in WeatherStation.cs you have this code:

Code: Select all

public void DoExtraTemp(double temp, int channel)
{
	if ((channel > 0) && (channel < ExtraTemp.Length - 1))
	{
		ExtraTemp[channel] = temp;
	}
}
Now, I may be reading the code wrong, but seeing as the array length is 11, then as ExtraTemp.Length - 1 = 10 then if someone has specified 10 as the channel number (using e.g. temp10f) then it will be ignored as 10 is not less than 10.

Re: WH45 Values - Extra Sensors

Posted: Wed 01 Mar 2023 12:28 pm
by mcrossley
Correct, the -1 should not be there.

Same for extra humidity and dew point too - now fixed in next release.

Re: WH45 Values - Extra Sensors

Posted: Thu 09 Mar 2023 11:13 am
by iandrews
mcrossley wrote: Wed 01 Mar 2023 12:28 pm Correct, the -1 should not be there.

Same for extra humidity and dew point too - now fixed in next release.
Thanks Mark, can confirm that my script can now update Sensor 10 for Temp and Humidity. I don't update the Dew Point of sensor 10, but can confirm that it does show a value now that sensor 10 temp / hum is updating.

Re: WH45 Values - Extra Sensors

Posted: Thu 09 Mar 2023 1:21 pm
by mcrossley
:thumbsup: