I have installed an RFXPower monitor into my system which uses a CT to measure power usage and sends data wirelessly back to HS via ACRF. To make use of the data I have set about creating a database and some graphs. On the list are:
I have created access database (temperature.mdb) with fields id, ctime, cdate, reading, lusage, lcost and sensor.
I have created a script (tempdb.txt) with the help of Rupp and Jon00 that reads the value from the RFXPower sensor, calculates usage and cost and inserts id (auto), ctime, cdate, reading and sensor into the database on a half-hourly basis scheduled in HS2
For the graphing side of things I have installed Kavachart, a java graphing applet as recommended by Jon00 and amended the example asp script (tempchart2.asp) to create the daily usage (kwh) and cost (pence) graph page. I am really pleased with the output (see below)
I now want to be able to create the daily usage 7 & 31 days but dont know how to go about the sql side of things to extract 7 and 31 days from the database.
Please help yourself to the attached files if they are any use.
Any help would be appreciated
regards
Gary
- Hourly usage
- Hourly cost
- Daily usage & cost - last seven days
- Daily usage & cost - last 31 days
- CO2 output caused by my usage
I have created access database (temperature.mdb) with fields id, ctime, cdate, reading, lusage, lcost and sensor.
I have created a script (tempdb.txt) with the help of Rupp and Jon00 that reads the value from the RFXPower sensor, calculates usage and cost and inserts id (auto), ctime, cdate, reading and sensor into the database on a half-hourly basis scheduled in HS2
For the graphing side of things I have installed Kavachart, a java graphing applet as recommended by Jon00 and amended the example asp script (tempchart2.asp) to create the daily usage (kwh) and cost (pence) graph page. I am really pleased with the output (see below)
I now want to be able to create the daily usage 7 & 31 days but dont know how to go about the sql side of things to extract 7 and 31 days from the database.
Please help yourself to the attached files if they are any use.
Any help would be appreciated
regards
Gary
Comment