aqhome-cgi: rewrite of the page module.

This commit is contained in:
Martin Preuss
2026-08-24 23:35:54 +02:00
parent 5587dd5abc
commit 8158bc28fb
26 changed files with 2095 additions and 70 deletions

View File

@@ -3,6 +3,7 @@
<gwbuild>
<subdirs>
cgi-examples
mcu-examples
</subdirs>

20
doc/cgi-examples/0BUILD Normal file
View File

@@ -0,0 +1,20 @@
<?xml?>
<gwbuild>
<data dist="true">
buero_climate.xml
buero_hum.xml
buero_light.xml
buero_temp.xml
stube_climate.xml
stube_hum.xml
stube_light.xml
stube_temp.xml
</data>
<subdirs>
</subdirs>
</gwbuild>

View File

@@ -0,0 +1,51 @@
<page id="buero_climate" title="Klima im Buero">
<dataset room="Buero">
<table>
<tr>
<dataset modality="Temperature">
<td>
<item>
<graph id="temp4h" title="Temperature (last 4h)" link="page.html?page=buero_temp"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
</dataset>
</tr>
<tr>
<dataset modality="Humidity">
<td>
<item >
<graph id="hum4h" title="Humidity (last 4h)" link="page.html?page=buero_hum"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
</dataset>
</tr>
<tr>
<dataset modality="Light">
<td>
<item >
<graph id="light4h" title="Light (last 4h)" link="page.html?page=buero_light"
width="640" height="480" begin="-4h" end="0" refreshtime="120" lowerLimit="-5.0" upperLimit="1034.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
</dataset>
</tr>
</table>
</dataset>
</page>

View File

@@ -0,0 +1,73 @@
<page id="buero_hum" title="Luftfeuchtigkeit im Buero">
<dataset room="Buero" modality="Humidity">
<table>
<tr>
<td>
<item>
<graph id="hum4h" title="Letzten 4 Stunden"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="hum12h" title="Letzten 12 Stunden"
width="640" height="480" begin="-12h" end="0" refreshtime="300" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm20" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="hum24h" title="Letzten 24 Stunden"
width="640" height="480" begin="-24h" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm30" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="hum7d" title="Letzten 7 Tagen"
width="640" height="480" begin="-7d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm210" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="hum30d" title="Letzten 30 Tage"
width="640" height="480" begin="-30d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm840" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="hum12m" title="Letzten 12 Monate"
width="640" height="480" begin="-365d" end="0" refreshtime="3600" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10080" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
</table>
</dataset>
</page>

View File

@@ -0,0 +1,73 @@
<page id="buero_light" title="Helligkeit im Buero">
<dataset room="Buero" modality="Light">
<table>
<tr>
<td>
<item>
<graph id="light4h" title="Letzten 4 Stunden"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="light12h" title="Letzten 12 Stunden"
width="640" height="480" begin="-12h" end="0" refreshtime="300" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm20" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="light24h" title="Letzten 24 Stunden"
width="640" height="480" begin="-24h" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm30" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="light7d" title="Letzten 7 Tagen"
width="640" height="480" begin="-7d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm210" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="light30d" title="Letzten 30 Tage"
width="640" height="480" begin="-30d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm840" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="light12m" title="Letzten 12 Monate"
width="640" height="480" begin="-365d" end="0" refreshtime="3600" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10080" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
</table>
</dataset>
</page>

View File

@@ -0,0 +1,73 @@
<page id="buero_temp" title="Temperaturen im Buero">
<dataset room="Buero" modality="Temperature">
<table>
<tr>
<td>
<item>
<graph id="temp4h" title="Letzten 4 Stunden"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="temp12h" title="Letzten 12 Stunden"
width="640" height="480" begin="-12h" end="0" refreshtime="300" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm20" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="temp24h" title="Letzten 24 Stunden"
width="640" height="480" begin="-24h" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm30" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="temp7d" title="Letzten 7 Tagen"
width="640" height="480" begin="-7d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm210" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="temp30d" title="Letzten 30 Tage"
width="640" height="480" begin="-30d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm840" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="temp12m" title="Letzten 12 Monate"
width="640" height="480" begin="-365d" end="0" refreshtime="3600" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10080" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
</table>
</dataset>
</page>

View File

@@ -0,0 +1,51 @@
<page id="stube_climate" title="Klima im Wohnzimmer">
<dataset room="Stube">
<table>
<tr>
<dataset modality="Temperature">
<td>
<item>
<graph id="temp4h" title="Temperature (last 4h)" link="page.html?page=stube_temp"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
</dataset>
</tr>
<tr>
<dataset modality="Humidity">
<td>
<item >
<graph id="hum4h" title="Humidity (last 4h)" link="page.html?page=stube_hum"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
</dataset>
</tr>
<tr>
<dataset modality="Light">
<td>
<item >
<graph id="light4h" title="Light (last 4h)" link="page.html?page=stube_light"
width="640" height="480" begin="-4h" end="0" refreshtime="120" lowerLimit="-5.0" upperLimit="1034.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
</dataset>
</tr>
</table>
</dataset>
</page>

View File

@@ -0,0 +1,73 @@
<page id="stube_hum" title="Luftfeuchtigkeit im Wohnzimmer">
<dataset room="Stube" modality="Humidity">
<table>
<tr>
<td>
<item>
<graph id="hum4h" title="Letzten 4 Stunden"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="hum12h" title="Letzten 12 Stunden"
width="640" height="480" begin="-12h" end="0" refreshtime="300" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm20" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="hum24h" title="Letzten 24 Stunden"
width="640" height="480" begin="-24h" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm30" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="hum7d" title="Letzten 7 Tagen"
width="640" height="480" begin="-7d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm210" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="hum30d" title="Letzten 30 Tage"
width="640" height="480" begin="-30d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm840" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="hum12m" title="Letzten 12 Monate"
width="640" height="480" begin="-365d" end="0" refreshtime="3600" lowerLimit="-5.0" upperLimit="110.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10080" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
</table>
</dataset>
</page>

View File

@@ -0,0 +1,73 @@
<page id="stube_light" title="Helligkeit im Wohnzimmer">
<dataset room="Stube" modality="Light">
<table>
<tr>
<td>
<item>
<graph id="light4h" title="Letzten 4 Stunden"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="light12h" title="Letzten 12 Stunden"
width="640" height="480" begin="-12h" end="0" refreshtime="300" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm20" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="light24h" title="Letzten 24 Stunden"
width="640" height="480" begin="-24h" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm30" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="light7d" title="Letzten 7 Tagen"
width="640" height="480" begin="-7d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm210" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="light30d" title="Letzten 30 Tage"
width="640" height="480" begin="-30d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm840" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="light12m" title="Letzten 12 Monate"
width="640" height="480" begin="-365d" end="0" refreshtime="3600" lowerLimit="-5.0" upperLimit="1034" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10080" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
</table>
</dataset>
</page>

View File

@@ -0,0 +1,73 @@
<page id="stube_temp" title="Temperaturen im Wohnzimmer">
<dataset room="Stube" modality="Temperature">
<table>
<tr>
<td>
<item>
<graph id="temp4h" title="Letzten 4 Stunden"
width="640" height="480" begin="-4h" end="0" refreshtime="180" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="temp12h" title="Letzten 12 Stunden"
width="640" height="480" begin="-12h" end="0" refreshtime="300" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm20" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="temp24h" title="Letzten 24 Stunden"
width="640" height="480" begin="-24h" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm30" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="temp7d" title="Letzten 7 Tagen"
width="640" height="480" begin="-7d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm210" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
<tr>
<td>
<item>
<graph id="temp30d" title="Letzten 30 Tage"
width="640" height="480" begin="-30d" end="0" refreshtime="600" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm840" />
</ForEveryValue>
</graph>
</item>
</td>
<td>
<item>
<graph id="temp12m" title="Letzten 12 Monate"
width="640" height="480" begin="-365d" end="0" refreshtime="3600" lowerLimit="-5.0" upperLimit="30.0" >
<ForEveryValue>
<curve title="$(Device/descriptiveName)" value="$(Value/NameForSystem)" modifier="Lm10080" />
</ForEveryValue>
</graph>
</item>
</td>
</tr>
</table>
</dataset>
</page>