Solar water heater
- displaying data on a web page
The "mark one version" is now working so it is time to write up some notes....
NB! this is work in progress!
I found a great tool to help build graphs using Canvas here - It made this web page
The Software
Saving the data
solar_display.bas
saves the data as explained on the previous page
Plotting the data on a web page
/var/www/solar_webpage_builder/make_page.bas
creates a web page from :-
web_page_top.html . . . . . §. . . . . web_page_above_bottom.html . . . . . web_page_bottom.html
where § is /var/www/cgi-bin/solar_web_plot/read_from_file.bas
a blassic program that reads the stored data and adds it to the web page in the format that Canvas requires.
I first tried to to build the page in a script on the fly but it took 20 seconds to build.
solar_web_plot/read_from_file.bas is now run every 2 minutes (just after new data is saved) within solar_display.bas
So we end up with an html files that is for today and displays the data up to the last 2 minutes.
The name of the file contains the date so a new one is started each day and an archive builds up.
create a menu web page to see the archives.