Page 1 of 1

Adding in the Air Quality sensor & graphs

Posted: Tue 26 Oct 2021 12:22 pm
by profzarkov
Hi
Very impressed with th4e Ecowitt kit . . .so far.
Amazon were selling a lot of the extra sensors at half price - so I bought the PM2.5 sensor. I used to work in Air Quality (Bristol) and am amazed at the compactness of this gadget.
Also amazed at how from just plugging in the batteries my HP2551 console picked it up....no need to pair or whatever. Brilliant.
I can see on the trends option for graphs an Air Quality graph but I would like the Air Quality value to appear on all the main pages, inc gauges - is this possible.
I think I've ticked all the boxes to allow the upload of the extra sensor - and it does appear on one of the graphs but no where else . . .maybe a future template??
Thanks
Steve

Re: Adding in the Air Quality sensor & graphs

Posted: Tue 26 Oct 2021 2:08 pm
by mcrossley
I think you may have to look at a third party option for now. There are lots of things to work on with CMX now, and I'm afraid I don't see AQ graphing as a priority at the moment. I think Han's CUtils (see it's own sub-forum) may do more with them?

Re: Adding in the Air Quality sensor & graphs

Posted: Wed 27 Oct 2021 11:04 am
by profzarkov
Hi
Actually, the website does display air quality on the Trends page, which is good enough.
Maybe in future updates in can be present on other pages too
Thanks
Steve

Re: Adding in the Air Quality sensor & graphs

Posted: Thu 28 Oct 2021 12:17 am
by grwkak
Do you mean the interface pages or the website - I can see my Ecowitt AQI on the CMX interface graphs, not the website. Not sure why.

Guy

Re: Adding in the Air Quality sensor & graphs

Posted: Thu 28 Oct 2021 1:36 am
by beteljuice
... not the website. Not sure why.
The website template(s), old or new are basically driven by <#webtags> one way or another.

AQ paraphernalia being relatively new are both vendor specific (currently Davis or Ecowitt) and an 'Extra Sensor', of which there could be multiple number quantities and / or different variable : value pairs.
... and are only available to CuMX - So no generic template !

The Ecowitt AQ sensor has only two <#webtags> available per unit https://cumuluswiki.org/a/Webtags#Extra ... re_sensors

<#AirQuality1> Air quality in μm/m3 (NOT someones Index Number)
<#AirQualityAvg1> 24 hr running average Air quality in μm/m3 (NOT someones Index Number)

Edit: Not available in Cumulus 1.
So in a Cumulus 1.9.x T you would simply add the required <#webtags> where you wanted them.

CuMX a bit more complicated !

In websitedataT.json you need to 'define' the tags.
Suppose you add them at the end ...

Code: Select all

"previous":"<#line>", <<< add comma !
"myAirNow":"<#AirQuality1>",
"myAir24":"<#AirQualityAvg1>"
}
These value can now be 'seen' by the MX template(s) using setpagedata.js

In your html template eg.

Code: Select all

<td>Air Quality 2.5μm</td>
<td>Now: <span data-cmxdata="myAirNow"></span> / 24hr Avg: <span data-cmxdata="myAir24"></span></td>

Re: Adding in the Air Quality sensor & graphs

Posted: Thu 28 Oct 2021 10:30 am
by profzarkov
Thanks!

Re: Adding in the Air Quality sensor & graphs

Posted: Wed 03 Nov 2021 9:48 pm
by philpugh
It can be done - take a look at https://goosegate.uk/trends.htm#airquality - my site.


You need to study the structure of the charting process, make the modifications and copy the appropriate JSON files together with trends.htm, availabledata.json files (and some others IIRC).

It's not a trivial process and every time you update CumulusMX you may need to re-apply some or all of the changes.

Re: Adding in the Air Quality sensor & graphs

Posted: Sat 06 Nov 2021 10:20 am
by profzarkov
Thanks for all those answers - it seems my station & MX have already done this . . albeit in a staccato fashion

http://weather.vivatek.co.uk/trends.htm#airquality