barbudancristian:
It's OK now the header translation for Recorded data table. The code for this was in web server.ino not in htmldata.h . But why is also in the htmldata.h ?
Another questions:
- Main page "System Overview" have an refresh time? seems to remain unrefreshed and I have to right click on it and choose Reload page to see any change in temp .
- Can I change the date format from M/D/Y to D/M/Y like we use in our country?
Thank you again and sorry to kill you with those question.
P.S. I see when I chose to open recorded data file that the system give command to relay for short time. Why when is open the html page with the table the system act the relays?
as i said, i added the entry in the htmldata.h file, but never implemented the code to retrieve it from PROGMEM.
none of the html pages update on their own. however it is very easy to make them update on their own if you edit the html data by adding code in the following format
<html>
<head>
<title>HTML in 10 Simple Steps or Less</title>
<meta http-equiv=”refresh” content=”5" >
</head>
<body>
</body>
</html>
the line
<meta http-equiv=”refresh” content=”5" >
instructs your web browser to refresh every 5 seconds. as you can see, this line needs to be added within the HTML header and not the body. if you want to change the date format, you will have to edit the following code within the
void sendSubstitute(EthernetClient client, int nUriIndex, int nSubstituteIndex, BUFFER & requestContent)
function
sendProgMemAsString(client, (char*)pgm_read_word(&(basic_table[32]))); //client.print(" ");
client.print(month);
sendProgMemAsString(client, (char*)pgm_read_word(&(basic_table[10]))); //client.print("/");
client.print(dayOfMonth);
sendProgMemAsString(client, (char*)pgm_read_word(&(basic_table[11]))); //client.print("/20");
client.println(year);
wdt_reset();
break;
to make it into your arrangement, the lines "client.print(month);" and "client.print(dayOfMonth);" need to be swapped. you will have to do this for every page, but it all in the same location. This will change the date format in the upper right of all the pages. to change the format in the log file, look for this line
sprintf(newfile,"%.2d%.2d%.2d.htm", month, dayOfMonth, year);//generate the file name in the followin format "010513.htm" for a file created on January 13th, 2013
and swap the variables "month" and "dayOfMonth"
when you are downloading a large log file, because it may take several minutes, i coded the system to shut down three of the relays. in my system, those relays power heaters that heat up fairly fast. if they stayed on during a long download, the temperature would get too high and i did not want that.
if you do not like that, look in the "void GETETHERNET(void)" function and completely remove the following lines of code:
if (strcmp(global_pUri,"/on.png")==0){
}else if (strcmp(global_pUri,"/off.png")==0){
}else if (strcmp(global_pUri,"/green.png")==0){
}else if (strcmp(global_pUri,"/red.png")==0){
}else{
digitalWrite(cold_side_ground_pin, HIGH);
digitalWrite(middle_side_ground_pin, HIGH);
digitalWrite(hot_side_ground_pin, HIGH);//relay 1 - cold side ground
cold_side_status = 0;
hot_side_status = 0;
middle_status = 0;
}
now, when you are downloading a log file, the relays will remain in what ever state they were in when the log file download started until the download is done.