Page 1 of 2

ECOWITT CO2 Sensor data

Posted: Wed 01 Sep 2021 3:19 pm
by philpugh
I think this may be a problem in data collection from the WH45 Ecowitt CO2 monitor.

The data being sent to CumulusMX is :
2021-09-01 16:08:25.108 ProcessData: Payload = PASSKEY=********************&stationtype=GW1000A_V1.6.8&dateutc=2021-09-01+15:08:24&tempinf=64.4&humidityin=67&baromrelin=30.472&baromabsin=30.307&tempf=63.3&humidity=69&winddir=332&windspeedmph=2.24&windgustmph=4.47&maxdailygust=10.29&solarradiation=138.73&uv=1&rainratein=0.000&eventrainin=0.000&hourlyrainin=0.000&dailyrainin=0.000&weeklyrainin=0.000&monthlyrainin=0.000&yearlyrainin=30.079&totalrainin=30.079&temp1f=70.16&humidity1=57&temp2f=68.00&tf_co2=68.0&humi_co2=63&pm25_co2=3.0&pm25_24h_co2=3.1&pm10_co2=3.7&pm10_24h_co2=3.7&co2=447&co2_24h=487&wh65batt=0&batt1=0&batt2=0&co2_batt=6&freq=868M&model=GW1000_Pro
But the Extra Sensor shows:
CO2.png
Minor differences due to data cut/paste but it seems to miss the two values in red?

Re: ECOWITT CO2 Sensor data

Posted: Wed 01 Sep 2021 3:44 pm
by philpugh
A bit more info...

I suspect that this is one of the first WH45 units to be reported here? Having looked at the WIKI for the webtags (so I can store the data into my MariaDB) there is a lack of info which I can probably help with.

Interestingly the WS VIEW app reports the following:
view.jpg
Which shows the current values and the calculated AQI values for current and 24hrs average.

Re: ECOWITT CO2 Sensor data

Posted: Thu 02 Sep 2021 3:07 pm
by mcrossley
I think it is a case of what is documented (unofficially), not matching what is actually sent. I've fixed this in the next patch release, thanks.

Re: ECOWITT CO2 Sensor data

Posted: Thu 02 Sep 2021 9:54 pm
by philpugh
Thanks Mark

I will await the next release!

Re: ECOWITT CO2 Sensor data

Posted: Fri 03 Sep 2021 8:59 pm
by Phil23
mcrossley wrote: Thu 02 Sep 2021 3:07 pm I think it is a case of what is documented (unofficially), not matching what is actually sent. I've fixed this in the next patch release, thanks.
Don't have Debug diags turned on but mine looks Ok???
Screenshot 2021-09-04 065028.jpg

Screenshot 2021-09-04 065226.jpg

Re: ECOWITT CO2 Sensor data

Posted: Fri 03 Sep 2021 9:22 pm
by beteljuice
@phil23 ...

Am I missing something ?

Only the CO2 figures agree.

Re: ECOWITT CO2 Sensor data

Posted: Fri 03 Sep 2021 10:24 pm
by philpugh
I did a screen shot several minutes after the log file and the capture from the WS. View. App was about 10 mins later. The WH45 was placed by an open window and the 2.5 and 10 measures fluctuate noticeably. As it is new I am expecting it to settle down over time.

Re: ECOWITT CO2 Sensor data

Posted: Sat 04 Sep 2021 12:09 pm
by mcrossley
Phil23 wrote: Fri 03 Sep 2021 8:59 pm Don't have Debug diags turned on but mine looks Ok???
Hmm, so it could be different versions are sending different data?

Could you turn on debug and data logging for a while then post the log file please?

Also Phil & Phil, can you let me know the firmware versions of your GW1000's?

Re: ECOWITT CO2 Sensor data

Posted: Sat 04 Sep 2021 3:16 pm
by philpugh
Mark: My GW1000 is V1.6.8

However...

Looking at the code

private void ProcessCo2(NameValueCollection data, WeatherStation station)
{
// tf_co2
// humi_co2
// pm25_co2
// pm25_24_co2
// pm10_co2
// pm10_24h_co2
// co2
// co2_24

if (data["tf_co2"] != null)
{
station.CO2_temperature = Convert.ToDouble(data["tf_co2"], CultureInfo.InvariantCulture);
}
if (data["humi_co2"] != null)
{
station.CO2_humidity = Convert.ToInt32(data["humi_co2"], CultureInfo.InvariantCulture);
}
if (data["pm25_co2"] != null)
{
station.CO2_pm2p5 = Convert.ToDouble(data["pm25_co2"], CultureInfo.InvariantCulture);
}
if (data["pm25_24_co2"] != null)
{
station.CO2_pm2p5_24h = Convert.ToDouble(data["pm25_24_co2"], CultureInfo.InvariantCulture);
}
if (data["pm10_co2"] != null)
{
station.CO2_pm10 = Convert.ToDouble(data["pm10_co2"], CultureInfo.InvariantCulture);
}
if (data["pm10_24h_co2"] != null)
{
station.CO2_pm10_24h = Convert.ToDouble(data["pm10_24h_co2"], CultureInfo.InvariantCulture);
}
if (data["co2"] != null)
{
station.CO2 = Convert.ToInt32(data["co2"], CultureInfo.InvariantCulture);
}
if (data["co2_24"] != null)
{
station.CO2_24h = Convert.ToInt32(data["co2"], CultureInfo.InvariantCulture);
}
}


The RED variables are at odds with what the station is reporting (i.e. missing the "h" from 2p5 24 hr average and "24h" from C02 )?

I am using the HTTP ECOWITT Device

Re: ECOWITT CO2 Sensor data

Posted: Sat 04 Sep 2021 3:38 pm
by philpugh
Ahhh.....

Changing the station to GW1000 It works!

Now...

Should I expect the Trends graph to work? Adding the Ecowitt CO2 Sensor causes the button to be displayed but there is no json file data.

Re: ECOWITT CO2 Sensor data

Posted: Sat 04 Sep 2021 4:56 pm
by mcrossley
philpugh wrote: Sat 04 Sep 2021 3:16 pm Mark: My GW1000 is V1.6.8

However...

Looking at the code...
Yep, that is what I have changed.
philpugh wrote: Sat 04 Sep 2021 3:38 pm Ahhh.....

Changing the station to GW1000 It works!
The GW1000 uses a completely different API.

The puzzle is @Phil23 is working - who I assume is using the HTTP Station (Ecowitt) as his profile says the main station is a Davis. Phil23?

A log file from @Phil23 will be a great help.

Re: ECOWITT CO2 Sensor data

Posted: Sat 04 Sep 2021 6:48 pm
by philpugh
Mark. Unless I misread the code it would appear you have two different procedures for handling the WH45. One in the GW1000 and one in the Ecowitt HTTP area?

Re: ECOWITT CO2 Sensor data

Posted: Sat 04 Sep 2021 7:35 pm
by Phil23
mcrossley wrote: Sat 04 Sep 2021 4:56 pm The puzzle is @Phil23 is working - who I assume is using the HTTP Station (Ecowitt) as his profile says the main station is a Davis. Phil23?
Hi Mark,

Mine appears to be working fine on occasions, but it has been pointed out that there is a glitch in the 24 Hr data at times.

Firmware is 1.6.8 & this station has no association with my main Davis.
It runs separately on a Pi of it's own.

Have just enabled Debug & will grab some diags files once I'm Up.

Phil.

Edit:- Diags Attached

Re: ECOWITT CO2 Sensor data

Posted: Sun 05 Sep 2021 2:15 am
by Phil23
Was going to comment on the number of high number of realtime entries the the log & the option to reduce these for readability,
but on going a step forward found they here easily removed in notepad with another Dreaded REGEX,
^.{24}Realtime\[\d{1,3}\].*\n?

https://regex101.com/r/yghwW2/3

A thanks to @beteljuice for pointing out the regex101 site, it's excellent.
Also discovered there this morning there is a chat, where some helpful individual assisted me with the above expression.
(Translation, more like wrote it for me).....

Cheers.

Yet Another Regex
^.{24}WH45 CO.*\n?

Easily turn the log file into this....

Code: Select all

2021-09-05 05:29:18.624 WH45 CO₂: Decoding...
2021-09-05 05:29:18.625 WH45 CO₂: temp=19.0, hum=62, pm10=1.2, pm10_24h=4.0, pm2.5=1.0, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645, Battery=OK
2021-09-05 05:29:28.719 WH45 CO₂: Decoding...
2021-09-05 05:29:28.719 WH45 CO₂: temp=19.0, hum=62, pm10=1.2, pm10_24h=4.0, pm2.5=1.0, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645
2021-09-05 05:29:38.742 WH45 CO₂: Decoding...
2021-09-05 05:29:38.742 WH45 CO₂: temp=19.0, hum=62, pm10=1.2, pm10_24h=4.0, pm2.5=1.0, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645
2021-09-05 05:29:48.765 WH45 CO₂: Decoding...
2021-09-05 05:29:48.766 WH45 CO₂: temp=19.0, hum=62, pm10=1.2, pm10_24h=4.0, pm2.5=1.0, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645
2021-09-05 05:29:58.789 WH45 CO₂: Decoding...
2021-09-05 05:29:58.789 WH45 CO₂: temp=19.0, hum=62, pm10=1.8, pm10_24h=4.0, pm2.5=1.5, pm2.5_24h=3.2, CO₂=888, CO₂_24h=645
2021-09-05 05:30:08.812 WH45 CO₂: Decoding...
2021-09-05 05:30:08.812 WH45 CO₂: temp=19.0, hum=62, pm10=1.8, pm10_24h=4.0, pm2.5=1.5, pm2.5_24h=3.2, CO₂=888, CO₂_24h=645, Battery=OK
2021-09-05 05:30:18.838 WH45 CO₂: Decoding...
2021-09-05 05:30:18.838 WH45 CO₂: temp=19.0, hum=62, pm10=1.8, pm10_24h=4.0, pm2.5=1.5, pm2.5_24h=3.2, CO₂=888, CO₂_24h=645
2021-09-05 05:30:28.862 WH45 CO₂: Decoding...
2021-09-05 05:30:28.862 WH45 CO₂: temp=19.0, hum=62, pm10=1.8, pm10_24h=4.0, pm2.5=1.5, pm2.5_24h=3.2, CO₂=888, CO₂_24h=645
2021-09-05 05:30:38.885 WH45 CO₂: Decoding...
2021-09-05 05:30:38.885 WH45 CO₂: temp=19.0, hum=62, pm10=1.8, pm10_24h=4.0, pm2.5=1.5, pm2.5_24h=3.2, CO₂=888, CO₂_24h=645
2021-09-05 05:30:48.908 WH45 CO₂: Decoding...
2021-09-05 05:30:48.908 WH45 CO₂: temp=19.0, hum=62, pm10=1.8, pm10_24h=4.0, pm2.5=1.5, pm2.5_24h=3.2, CO₂=888, CO₂_24h=645
2021-09-05 05:30:58.932 WH45 CO₂: Decoding...
2021-09-05 05:30:58.932 WH45 CO₂: temp=19.0, hum=62, pm10=2.1, pm10_24h=4.1, pm2.5=1.8, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645
2021-09-05 05:31:08.955 WH45 CO₂: Decoding...
2021-09-05 05:31:08.955 WH45 CO₂: temp=19.0, hum=62, pm10=2.1, pm10_24h=4.1, pm2.5=1.8, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645
2021-09-05 05:31:18.978 WH45 CO₂: Decoding...
2021-09-05 05:31:18.979 WH45 CO₂: temp=19.0, hum=62, pm10=2.1, pm10_24h=4.1, pm2.5=1.8, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645
2021-09-05 05:31:29.003 WH45 CO₂: Decoding...
2021-09-05 05:31:29.003 WH45 CO₂: temp=19.0, hum=62, pm10=2.1, pm10_24h=4.1, pm2.5=1.8, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645
2021-09-05 05:31:39.031 WH45 CO₂: Decoding...
2021-09-05 05:31:39.031 WH45 CO₂: temp=19.0, hum=62, pm10=2.1, pm10_24h=4.1, pm2.5=1.8, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645
2021-09-05 05:31:49.055 WH45 CO₂: Decoding...
2021-09-05 05:31:49.055 WH45 CO₂: temp=19.0, hum=62, pm10=2.1, pm10_24h=4.1, pm2.5=1.8, pm2.5_24h=3.2, CO₂=890, CO₂_24h=645
2021-09-05 05:31:59.079 WH45 CO₂: Decoding...
2021-09-05 05:31:59.079 WH45 CO₂: temp=19.0, hum=62, pm10=3.4, pm10_24h=4.1, pm2.5=2.5, pm2.5_24h=3.2, CO₂=892, CO₂_24h=645
2021-09-05 05:32:09.105 WH45 CO₂: Decoding...
2021-09-05 05:32:09.105 WH45 CO₂: temp=19.0, hum=62, pm10=3.4, pm10_24h=4.1, pm2.5=2.5, pm2.5_24h=3.2, CO₂=892, CO₂_24h=645
2021-09-05 05:32:19.129 WH45 CO₂: Decoding...
2021-09-05 05:32:19.129 WH45 CO₂: temp=19.0, hum=62, pm10=3.4, pm10_24h=4.1, pm2.5=2.5, pm2.5_24h=3.2, CO₂=892, CO₂_24h=645
2021-09-05 05:32:29.153 WH45 CO₂: Decoding...
2021-09-05 05:32:29.154 WH45 CO₂: temp=19.0, hum=62, pm10=3.4, pm10_24h=4.1, pm2.5=2.5, pm2.5_24h=3.2, CO₂=892, CO₂_24h=645
2021-09-05 05:32:39.178 WH45 CO₂: Decoding...
2021-09-05 05:32:39.178 WH45 CO₂: temp=19.0, hum=62, pm10=3.4, pm10_24h=4.1, pm2.5=2.5, pm2.5_24h=3.2, CO₂=892, CO₂_24h=645
2021-09-05 05:32:49.202 WH45 CO₂: Decoding...
2021-09-05 05:32:49.202 WH45 CO₂: temp=19.0, hum=62, pm10=3.4, pm10_24h=4.1, pm2.5=2.5, pm2.5_24h=3.2, CO₂=892, CO₂_24h=645
2021-09-05 05:32:59.226 WH45 CO₂: Decoding...
2021-09-05 05:32:59.227 WH45 CO₂: temp=19.0, hum=62, pm10=3.4, pm10_24h=4.1, pm2.5=2.5, pm2.5_24h=3.2, CO₂=887, CO₂_24h=645

Re: ECOWITT CO2 Sensor data

Posted: Sun 05 Sep 2021 5:17 pm
by philpugh
Phil23: According to the manual the WH45 only gathers data every 1 minute on "mains" (i.e. external 5V) or every 10 mins on battery power. I notice you are polling every 10 seconds are you seeing changes in less than 1 minute intervals?