Skip to content

Commit

Permalink
SYS-506 air-quality support
Browse files Browse the repository at this point in the history
  • Loading branch information
instantlinux committed Oct 3, 2020
1 parent 2977de6 commit a37c23c
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 21 deletions.
5 changes: 4 additions & 1 deletion current.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@
<img src="daywinddir.png" alt="Hi Wind" />
<img src="dayinside.png" alt="Inside" />
<img src="daywindvec.png" alt="Wind Vector" />
#if $period2.pm2_5.has_data
<img src="dayaqi.png" alt="Air Quality" />
#end if
#if $Extras.has_key('optionalAccessories') and $period2.radiation.has_data
<img src="dayradiation.png" alt="Radiation" />
<img src="dayradiation.png" alt="Solar Radiation" />
#end if
#if $Extras.has_key('optionalAccessories') and $period2.UV.has_data
<img src="dayuv.png" alt="UV Index" />
Expand Down
48 changes: 33 additions & 15 deletions include/chart.inc
Original file line number Diff line number Diff line change
Expand Up @@ -187,39 +187,57 @@
</td>
</tr>
#end if
#if $period2.pm2_5.has_data
<tr>
<td class="stats_label">
AQI Range
</td>
<td class="stats_data">
$period1.pm2_5_aqi.max at $period1.pm2_5.maxtime<br/>
$period1.pm2_5_aqi.min at $period1.pm2_5.mintime
</td>
<td class="stats_data">
$period2.pm2_5_aqi.max at $period2.pm2_5.maxtime<br/>
$period2.pm2_5_aqi.min at $period2.pm2_5.mintime
</td>
</tr>
#end if
#if $Extras.has_key('optionalAccessories') and $period2.UV.has_data
<tr>
<td class="stats_label">
High UV<br/>
Low UV
</td><td></td>
High UV
</td>
<td class="stats_data">
$period1.UV.max at $period1.UV.maxtime
</td>
<td class="stats_data">
$period2.UV.max at $period2.UV.maxtime<br/>
$period2.UV.min at $period2.UV.mintime
$period2.UV.max at $period2.UV.maxtime
</td>
</tr>
#end if
#if $Extras.has_key('optionalAccessories') and $period2.ET.has_data and $period2.ET.sum.raw >0.0
<tr>
<td class="stats_label">
High ET<br/>
Low ET
</td><td></td>
High ET
</td>
<td class="stats_data">
$period2.ET.max at $period2.ET.maxtime<br/>
$period2.ET.min at $period2.ET.mintime
$period1.ET.max at $period1.ET.maxtime
</td>
<td class="stats_data">
$period2.ET.max at $period2.ET.maxtime
</td>
</tr>
#end if
#if $Extras.has_key('optionalAccessories') and $period2.radiation.has_data
<tr>
<td class="stats_label">
High Radiation<br/>
Low Radiation
</td><td></td>
High Radiation
</td>
<td class="stats_data">
$period1.radiation.max at $period1.radiation.maxtime
</td>
<td class="stats_data">
$period2.radiation.max at $period2.radiation.maxtime<br/>
$period2.radiation.min at $period2.radiation.mintime
$period2.radiation.max at $period2.radiation.maxtime
</td>
</tr>
#end if
Expand Down
18 changes: 14 additions & 4 deletions include/current.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,22 @@
<td class="stats_label">Rain Rate</td>
<td class="stats_data">$current.rainRate</td>
</tr>
<tr>
<td class="stats_label">Inside Temperature</td>
<td class="stats_data">$current.inTemp</td>
</tr>
#if $day.extraTemp1.has_data
<tr>
<td class="stats_label">Pond Temperature</td>
<td class="stats_data">$current.extraTemp1</td>
</tr>
#end if
#if $day.pm2_5.has_data
<tr>
<td class="stats_label">PM2.5 Concentration</td>
<td class="stats_data">$current.pm2_5</td>
</tr>
<tr>
<td class="stats_label">AQI</td>
<td class="stats_data">$current.pm2_5_aqi</td>
</tr>
#end if
#if $Extras.has_key('optionalAccessories') and $day.UV.has_data
<tr>
<td class="stats_label">UV</td>
Expand All @@ -64,6 +70,10 @@
<td class="stats_data">$current.radiation</td>
</tr>
#end if
<tr>
<td class="stats_label">Inside Temperature</td>
<td class="stats_data">$current.inTemp</td>
</tr>
</tbody>
</table>
</div>
3 changes: 3 additions & 0 deletions month.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<img src="monthwinddir.png" alt="Hi Wind" />
<img src="monthinside.png" alt="Inside" />
<img src="monthwindvec.png" alt="Wind Vector" />
#if $period2.pm2_5_aqi.has_data
<img src="monthaqi.png" alt="Air Quality" />
#end if
#if $Extras.has_key('optionalAccessories') and $period2.UV.has_data
<img src="monthuv.png" alt="UV Index" />
#end if
Expand Down
19 changes: 18 additions & 1 deletion skin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@
inTemp = Inside Temperature
outHumidity = Outside Humidity
outTemp = Outside Temperature
radiation = Radiation
pm2_5_aqi = Air Quality Index
radiation = Solar Radiation
rain = Rain
rainRate = Rain Rate
rxCheckPercent = ISS Signal Quality
Expand Down Expand Up @@ -486,6 +487,10 @@
[[[[windvec]]]]
plot_type = vector

[[[dayaqi]]]
yscale = 0, None, 20
[[[[pm2_5_aqi]]]]

[[[dayradiation]]]
[[[[radiation]]]]

Expand Down Expand Up @@ -542,6 +547,10 @@
[[[[windvec]]]]
plot_type = vector

[[[weekaqi]]]
yscale = 0, None, 20
[[[[pm2_5_aqi]]]]

[[[weekradiation]]]
[[[[radiation]]]]

Expand Down Expand Up @@ -599,6 +608,10 @@
[[[[windvec]]]]
plot_type = vector

[[[monthaqi]]]
yscale = 0, None, 20
[[[[pm2_5_aqi]]]]

[[[monthradiation]]]
[[[[radiation]]]]

Expand Down Expand Up @@ -669,6 +682,10 @@
[[[[windvec]]]]
plot_type = vector

[[[monthaqi]]]
yscale = 0, None, 20
[[[[pm2_5_aqi]]]]

[[[yearradiation]]]
[[[[radiation]]]]

Expand Down
3 changes: 3 additions & 0 deletions week.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<img src="weekwinddir.png" alt="Hi Wind" />
<img src="weekinside.png" alt="Inside" />
<img src="weekwindvec.png" alt="Wind Vector" />
#if $period2.pm2_5_aqi.has_data
<img src="weekaqi.png" alt="Air Quality" />
#end if
#if $Extras.has_key('optionalAccessories') and $period2.UV.has_data
<img src="weekuv.png" alt="UV index" />
#end if
Expand Down
15 changes: 15 additions & 0 deletions year.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,18 @@
</td>
</tr>
#end if
#if $year.pm2_5.has_data
<tr>
<td class="stats_label">
High AQI<br/>
Low AQI
</td>
<td class="stats_data">
$year.pm2_5_aqi.max at $year.pm2_5_aqi.maxtime<br/>
$year.pm2_5_aqi.min at $year.pm2_5_aqi.mintime
</td>
</tr>
#end if
#if $Extras.has_key('optionalAccessories') and $year.UV.has_data
<tr>
<td class="stats_label">
Expand Down Expand Up @@ -230,6 +242,9 @@
<img src="yearwinddir.png" alt="Hi Wind" />
<img src="yearinside.png" alt="Inside" />
<img src="yearwindvec.png" alt="Wind Vector" />
#if $year.pm2_5_aqi.has_data
<img src="yearaqi.png" alt="Air Quality" />
#end if
#if $Extras.has_key('optionalAccessories') and $year.UV.has_data
<img src="yearuv.png" alt="UV Index" />
#end if
Expand Down

0 comments on commit a37c23c

Please sign in to comment.