Raspberry Pi 4 temperature and poe with fan
Graph before and after POE and FAN board:
Just a quick update using the RPI4 with and without a fan. The temperature is way too hot without a fan for cooling. Decided to repurpose my POE board with fan from rpi3b+ to RPI4. Made a huge difference. side effect was not havoing to use the RPI4 USB C Power block as well (assuming you have a POE switch (802.3af/at).
Even running tcpdump continuously for 5 minutes, the temp maxed out at 53 degrees Celsius as opposed to it sitting idle at 64 degrees Celsius without any activity and going up to 75 degrees.
Fan makes a huge difference. idle temp is now 46 degrees Celsius. (Take note ambient room temperature is currently 22 degrees Celsius)
1030 , 2019-08-18 13:08 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 64.0 , C
1031 , 2019-08-18 13:09 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 64.0 , C
1032 , 2019-08-18 13:10 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 64.0 , C
1033 , 2019-08-18 13:11 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 65.0 , C
1034 , 2019-08-18 13:12 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 65.0 , C
1035 , 2019-08-18 13:13 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 64.0 , C
1 , 2019-08-18 13:14 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 33.0 , C
2 , 2019-08-18 13:54 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 39.0 , C
3 , 2019-08-18 13:55 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 46.0 , C
4 , 2019-08-18 13:56 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 46.0 , C
5 , 2019-08-18 13:57 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 46.0 , C
6 , 2019-08-18 13:58 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 48.0 , C
7 , 2019-08-18 13:59 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 45.0 , C
8 , 2019-08-18 14:00 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 46.0 , C
9 , 2019-08-18 14:01 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 47.0 , C
10 , 2019-08-18 14:02 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 50.0 , C
11 , 2019-08-18 14:03 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 52.0 , C
12 , 2019-08-18 14:04 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 53.0 , C
13 , 2019-08-18 14:05 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 53.0 , C
14 , 2019-08-18 14:06 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 51.0 , C
15 , 2019-08-18 14:07 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 52.0 , C
16 , 2019-08-18 14:08 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 53.0 , C
17 , 2019-08-18 14:09 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 52.0 , C
18 , 2019-08-18 14:10 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 48.0 , C
19 , 2019-08-18 14:11 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 48.0 , C
20 , 2019-08-18 14:12 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 48.0 , C
21 , 2019-08-18 14:13 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 45.0 , C
22 , 2019-08-18 14:14 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 48.0 , C
23 , 2019-08-18 14:15 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 46.0 , C
24 , 2019-08-18 14:16 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 49.0 , C
25 , 2019-08-18 14:17 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 46.0 , C
26 , 2019-08-18 14:18 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 49.0 , C
27 , 2019-08-18 14:19 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 47.0 , C
28 , 2019-08-18 14:20 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 47.0 , C
29 , 2019-08-18 14:21 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 47.0 , C
30 , 2019-08-18 14:22 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 48.0 , C
31 , 2019-08-18 14:23 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 48.0 , C
32 , 2019-08-18 14:24 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 46.0 , C
33 , 2019-08-18 14:25 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 47.0 , C
34 , 2019-08-18 14:26 , rpi4 – demo-gateway – 10.88.10.24 – GPU/CPU Temp in Demo Gateway , 46.0 , C
For those wondering python 3 script that runs every 60 seconds and php html script that draws a graph from scratch via php and gd: sudo apt-get install apache2 php libapache2-mod-php php7.3-gd
#!/usr/bin/python
#coding: utf-8
#Version 20180922 1.0
#add ambient temp sensor
import subprocess
import time
import datetime
import smtplib #Import smtplib for the actual sending function
from email.message import EmailMessage #Import the email modules we'll need
#log file paths
PATH = '/home/pi/python-scripts/alarm/logs/'
counter = 0
counterAmbient = 0
MAXTEMP = "65"
#Email function
def sendEmailTrigger(outputTemp,MAXTEMP):
try:
#def to check config file and return status bool back to configFileStatus
#configFileStatus = useConfigFile("alarm.conf")
now = datetime.datetime.now()
print("Temp is higher than threshold set", outputTemp)
print("1",",","Temp is higher than threshold set of ", MAXTEMP," Temp currently =",outputTemp,",",now.strftime("%Y-%m-%d"),",",now.strftime("%H:%M:%S.%f"),",",now.strftime("%Y-%m-%d %H:%M"),file=open(PATH+"rpi4-qld-demo-gateway-"+now.strftime("%Y-%m-%d")+".alarm.log", "a"))
#print("0",",","Alarm is ARMED so an Email is being sent and activity is still recorded",",",now.strftime("%Y-%m-%d"),",",now.strftime("%H:%M:%S.%f"),",",now.strftime("%Y-%m-%d %H:%M"),file=open(PATH+"alarm-home-lounge-"+now.strftime("%Y-%m-%d")+".alarm.log", "a"))
# me == the sender's email address
# you == the recipient's email address
msg = EmailMessage()
msg['Subject'] = 'rpi4-10-88-10-24 Demo Gateway Temp threshold ('+MAXTEMP+'C) exceeded. Temp Currently '+outputTemp
msg['From'] = 'user@gmail.com'
#msg['To'] = 'user@gmail.com'
msg['To'] = 'user@gmail.com'
#msg.set_content("media - Alarm trigger - gpioEmailTrigger = "+str(gpioEmailTrigger)+" , "+now.strftime("%Y-%m-%d %H:%M"))
msgContentEmail = ('Demo Gateway - rpi4-10-88-10-24 Temp threshold ('+MAXTEMP+'C) exceeded = '+outputTemp+'C '+now.strftime("%Y-%m-%d %H:%M"))
#msgContentEmail = ("media - Alarm trigger - gpioEmailTrigger time ")
msg.set_content(msgContentEmail)
#Gmail user/pass
usr = 'username'
psw = 'password'
s = smtplib.SMTP('smtp.gmail.com:587')
s.starttls()
response = str(s.login(usr,psw))
s.send_message(msg)
s.quit()
now = datetime.datetime.now()
if 'Accepted' in response:
print("Email Auth successful. Email should have been sent...")
print("1",",","Email Auth successful. Email should have been sent...",",",now.strftime("%Y-%m-%d %H:%M:%S.%f"),file=open(PATH+"alarm-home-demo-gateway-"+now.strftime("%Y-%m-%d")+".alarm.log", "a"))
else:
print("Email Auth failed. Email most likely NOT sent...")
print("0",",","Email Auth failed. Email most likely NOT sent...",",",now.strftime("%Y-%m-%d"),",",now.strftime("%H:%M:%S.%f"),",",now.strftime("%Y-%m-%d %H:%M"),file=open(PATH+"alarm-demo-gateway-rpi4-10-88-10-24-temp-"+now.strftime("%Y-%m-%d")+".log", "a"))
#except:
except Exception as inst:
print(type(inst)) # the exception instance
print(inst.args) # arguments stored in .args
print(inst) # __str__ allows args to be printed directly,
# but may be overridden in exception subclasses
x, y = inst.args # unpack args
print('x =', x)
print('y =', y)
print("Email problems - something went wrong...")
print("0",",","Email problems - something went wrong... Email most likely NOT sent...",",",now.strftime("%Y-%m-%d"),",",now.strftime("%H:%M:%S.%f"),",",now.strftime("%Y-%m-%d %H:%M"),file=open(PATH+"alarm-demo-gateway-rpi4-10-88-10-24-temp-"+now.strftime("%Y-%m-%d")+".log", "a"))
pass
#import time
while True:
#GPU Temp
output = subprocess.getoutput("vcgencmd measure_temp")
#Count how many times temp checked
#28-0417b2bb76ff
#no sensor
#outputAmbientSensor = subprocess.getoutput("cat /sys/bus/w1/devices/28-0417b2bb76ff/w1_slave")
counter = counter+1
counterAmbient = counterAmbient+1
#get current date and time
now = datetime.datetime.now()
outputTemp=output[5:9]
#Ambient Temp - use reg ex to find t=
#match = re.search(r"[^a-zA-Z](t=)[^a-zA-Z]", str(outputAmbientSensor)
#no sensor
#outputAmbientPosition = str.find(outputAmbientSensor, "t=")
#outputAmbientTemp = outputAmbientSensor[outputAmbientPosition+2:outputAmbientPosition+10]
#no sensor
#outputAmbientTempCelsius = int(outputAmbientTemp) / 1000
#print("Ambient Temp = ", outputAmbientTempCelsius)
print(counter,",",now.strftime("%Y-%m-%d %H:%M"), ",","rpi4 - demo-gateway - 10.88.10.24 - GPU/CPU Temp in Demo Gateway",",",outputTemp,",","C", file=open(PATH+"alarm-demo-gateway-rpi4-10-88-10-24-temp-"+now.strftime("%Y-%m-%d")+".log", "a"))
if (outputTemp >= MAXTEMP):
sendEmailTrigger(outputTemp,MAXTEMP)
#else:
# print("Temp has not exceeded threshold....")
time.sleep(60)
=================================================
daytempgraph.php
<!--| Ver 1.0 | Date 08 Nov 2018 | Designed By: Andrew Fullagar | Edited Last By: Andrew Fullagar | afullagar@gmail.com |-->
<!DOCTYPE html>
<?#rpi 4 demo gateway?>
<head>
<title>Py Arm IoT - Demo gateway</title>
<?php
date_default_timezone_set('Australia/Brisbane');
if (!empty($_SERVER['HTTPS']))
{
$Prot='https';
}
else
{
$Prot='http';
}
echo("<link rel=\"stylesheet\" type=\"text/css\" href=\"" . $Prot . "://" . $_SERVER['SERVER_NAME'] . "/css/css-default.css\"></link>");
#echo("<meta http-equiv='refresh' content='1'>"); //Refresh by HTTP META
?>
</head>
</header>
<body>
<?php
#Refresh page every x Seconds
$page = $_SERVER['PHP_SELF'];
$sec = "60";
header("Refresh: $sec; url=$page");
$path = "/home/pi/html-php-scripts/graph-png"; // full server path to the directory where you want the backup files (no trailing slash)
if (is_dir($path) == FALSE)
{
mkdir($path, 0755);
}
#Delete file from filesystem
$outputFilePng = shell_exec("rm -Rf /home/pi/html-php-scripts/graph-png/rpi4-demo-gateway-10-88-10-24-temp-*.png");
#print("Output png files deleted" . $outputFilePng);
$alarmConfig =0;
$fname = '/home/pi/python-scripts/alarm/config/alarm.conf';
$flognamepath = '/home/pi/python-scripts/alarm/logs/';
$dateTempCheck = date("Y-m-d");
$dateTimeTempCheck = date("Y-m-d-H-i-s");
//log
$gpuTempLogName = $flognamepath . "alarm-demo-gateway-rpi4-10-88-10-24-temp-" . $dateTempCheck . ".log";
#Image Name
$tempPng = "alarm-demo-gateway-rpi4-10-88-10-24-temp-gpu-vs-ambient-$dateTempCheck.png";
//Center Output
echo("<div id=\"bodycenter\">");
?>
<h1>Py Arm IOT Temp Check day</h1>
<form enctype="multipart/form-data" action="daytempgraph.php" method="post">
<p>...</p>
<p>
<?php
print("<p>Choose Year Month Day");
print("<select name=\"Day\">");
print("<option value=\"\">Day</option>");
$x=1;
while ($x <= 31)
{
echo("<option value=\"$x\">$x</option>");
$x++;
}
print("</select>");
print("<select name=\"Month\">");
print("<option value=\"\">Month</option>");
$x=1;
while ($x <= 12)
{
echo("<option value=\"$x\">$x</option>");
$x++;
}
print("</select>");
print("<select name=\"Year\">");
print("<option value=\"\">Year</option>");
$x=2017;
while ($x <= 2020)
{
echo("<option value=\"$x\">$x</option>");
$x++;
}
print("</select>");
?>
<?php
print("<p>...</p>");
$outputAmbient = shell_exec("tail -n 1 " . $ambientTempLogName);
$outputGpu = shell_exec("tail -n 1 " . $gpuTempLogName);
print("<p>");
$currentAlarmSetting = file_get_contents($fname);
print("<p>Current setting: <b>$currentAlarmSetting</b> </p>");
print("</p>");
print("<p>...</p>");
print("<p>");
print("<p>");
###print(nl2br($outputAmbient));
print("</p>");
print("</p>");
print("<p>...</p>");
print("<p>");
print("<p>");
print(nl2br($outputGpu));
print("</p>");
print("</p>");
print("<p>...</p>");
?>
<p><input type="submit" name="submit" value="submit" /></p>
</form>
<?php
if (isset($_POST['submit']))
{
$tempCheckDay = $_POST['Day'];
$tempCheckDay = sprintf("%02d", $tempCheckDay);
$tempCheckMonth = $_POST['Month'];
$tempCheckMonth = sprintf("%02d", $tempCheckMonth);
#echo $num_padded; // returns 04
$tempCheckYear = $_POST['Year'];
$dateTempCheck = $tempCheckYear . "-" . $tempCheckMonth . "-" . $tempCheckDay;
print("$dateTempCheck");
#$dateTempCheck = date("Y-m-d");
#$dateTimeTempCheck = date("Y-m-d-H-i-s");
//log
$gpuTempLogName = $flognamepath . "alarm-demo-gateway-rpi4-10-88-10-24-temp-" . $dateTempCheck . ".log";
#Image Name
$tempPng = "alarm-demo-gateway-rpi4-10-88-10-24-temp-gpu-vs-ambient-$dateTempCheck.png";
$content = file_get_contents($fname);
$datetimelong = date("Y-m-d H:i:s"). substr((string)microtime(), 1, 6);
#$datetimelong = date("Y-m-d H:i:s");
}
#phpinfo();
$numLinesAmbientTempLog = count(file($ambientTempLogName));
$numLinesGpuTempLog = count(file($gpuTempLogName));
#debug
#echo "There are $numLinesAmbientTempLog lines in numLinesAmbientTempLog"."\n";
#echo "There are $numLinesGpuTempLog lines in numLinesGpuTempLog"."\n";
$moveGraphLeft = 40;
$moveHeadingLeft = 10;
$yGraphLength = 500;
$xGraphAmbientIncrement = ($yGraphLength*2)/$numLinesAmbientTempLog;
$xGraphGpuIncrement = ($yGraphLength*2)/$numLinesGpuTempLog;
$yGraphLengthTotalBorder = 610;#Keep it about 200 bigger than $yGraphLength
$yGraphLengthBuffer = 100;
$yGraphBottomScaleOffset = 50;#Move everything down by this amount so there is room at the top
$yGraphScale = 100;
$graphFont = 2;
$graphFontHeading = 7;
$xGraphLength = 1440;
#add date to graphFont
$dateTimeLongGraph = date("Y-m-d H:i:s"). substr((string)microtime(), 1, 6);
// Create An Image 255x255
$img = ImageCreateTrueColor($xGraphLength+75, $yGraphLengthTotalBorder);
// set background to white
$white = imagecolorallocate($img, 255, 255, 255);
#$grey = imagecolorallocate($img, 255, 255, 230);
imagefill($img, 0, 0, $white);
// Here's a function for drawing a rotated gradient Rectangle (based on a previous note)
$row = 0;
#0-127 - 127=no line opaque 0=line darkest
$crossLineOpacity = 100;
$crossTextOpacity = 50;
$graphLineOpacity = 0;
$moveGraphLeft = 40;
$moveHeadingLeft = 16;
$moveVerticalHeadingLeft = 0;
$moveHeadingUp = -6;#reverse logic from top down
$dataXTempStart = 0;
$dataBarWidth = 5;
#Initialise Vars otherwise they wont work with min/max functions
$tempCpuMin=100;
$tempAmbientMin=100;
$tempCpuMax=-100;
$tempAmbientMax=-100;
if ((($handleAmbient = fopen($ambientTempLogName, "r")) == FALSE) AND (($handleGpu = fopen($gpuTempLogName, "r")) !== FALSE)) {
$hourGraphLineDivider = 0;
#setup hour vertical lines
while ($hourGraphLineDivider <= 24)
{
###if ($dataAmbientTimestamp % 3600 == 0)
#X - Legend
imageline($img, (($xGraphLength/24)*$hourGraphLineDivider)+$moveGraphLeft, $yGraphLength+$yGraphBottomScaleOffset,(($xGraphLength/24)*$hourGraphLineDivider)+$moveGraphLeft,0+$yGraphBottomScaleOffset, imagecolorallocatealpha($img,128,128,128,75));
imagestringup($img , $graphFont, ((($xGraphLength/24)*$hourGraphLineDivider)+$moveGraphLeft)-5 , $yGraphLength+$yGraphBottomScaleOffset+35,"$hourGraphLineDivider:00", imagecolorallocatealpha($img, 0, 0, 255,$crossTextOpacity));
$hourGraphLineDivider = $hourGraphLineDivider+1;
}
while ((($dataAmbient = fgetcsv($handleAmbient, 1000, ",")) == FALSE) AND (($dataGpu = fgetcsv($handleGpu, 1000, ",")) !== FALSE)){
#$numAmbient = count($dataAmbient);
#$numGpu = count($dataGpu);
#echo "<p> $num fields in line $row: <br /></p>\n";
$row++;
#echo $data[$c] . "<br />\n";
#GradientRect($img,$row,($data[3]*10),$row+1,($data[3]*10),5);
#Find every 60*60 (every hour) and add to graph as x legend
$dataAmbientTimestamp = strtotime($dataAmbient[1]);
$dataGpuTimestamp = strtotime($dataGpu[1]);
if ($row == 1)
{
$dataAmbientStart = $dataAmbient[3];
$dataXAmbientContinue = 0;
$dataGpuStart = $dataGpu[3];
$dataXGpuContinue = 0;
#X points
#debug x points on curve
$hourAmbientTest = date("H", $dataAmbientTimestamp);
$hourGpuTest = date("H", $dataGpuTimestamp);
$minuteAmbientTest = date("i", $dataAmbientTimestamp);
$minuteGpuTest = date("i", $dataGpuTimestamp);
$hourAmbientTestMinutesConvert = $hourAmbientTest * 60;
$hourGpuTestMinutesConvert = $hourGpuTest * 60;
$totalAmbientMinutesXScale = $hourAmbientTestMinutesConvert + $minuteAmbientTest;
$totalGpuMinutesXScale = $hourGpuTestMinutesConvert + $minuteGpuTest;
#logging starts at 00:00 so 1440 minutes total
#print("<p>X point should be = " . $totalMinutesXScale . "</p>");
$dataXAmbientStart = $totalAmbientMinutesXScale;
$dataXGpuStart = $totalGpuMinutesXScale;
#print("DEBUG - 1st packet dataXAmbientStart = $dataXAmbientStart");
}
else
{
#make sure values follow on from each other and join up
#$dataAmbientStart = $dataAmbientContinue;
$dataGpuStart = $dataGpuContinue;
#X points
#debug x points on curve
#$hourAmbientTest = date("H", $dataAmbientTimestamp);
$hourGpuTest = date("H", $dataGpuTimestamp);
#$minuteAmbientTest = date("i", $dataAmbientTimestamp);
$minuteGpuTest = date("i", $dataGpuTimestamp);
#$hourAmbientTestMinutesConvert = $hourAmbientTest * 60;
$hourGpuTestMinutesConvert = $hourGpuTest * 60;
#$totalAmbientMinutesXScale = $hourAmbientTestMinutesConvert + $minuteAmbientTest;
$totalGpuMinutesXScale = $hourGpuTestMinutesConvert + $minuteGpuTest;
#logging starts at 00:00 so 1440 minutes total
#print("X point should be = " . $totalMinutesXScale);
#$dataXAmbientStart = $totalMinutesXScale;
#$dataXAmbientStart = $dataXAmbientContinue;
#print("dataXAmbientStart 2nd part = $dataXAmbientStart");
#$dataXAmbientContinue = $totalAmbientMinutesXScale;
$dataXGpuContinue = $totalGpuMinutesXScale;
#print("<p>X totalMinutesXScale point should be = " . $dataXAmbientContinue . "</p>");
}
#Debug spurious temperature above 80C
#if ($dataAmbient[3] > 70)
#{
# print("<p>Ambient transient error is $dataAmbient[3] at $hourAmbientTest:$minuteAmbientTest</p>");
#}
#Debug End
#Debug - Find spurious high Temp spikes
/*if (($dataAmbient[3] >= 70) or ($dataAmbientStart >= 70))
{
print("<p>Ambient transient error is $dataAmbient[3]:$dataAmbientContinue at $hourAmbientTest:$minuteAmbientTest</p>");
print("<p>dataAmbientStart = $dataAmbientStart</p>");
#print("<p>(yGraphLength-((dataAmbientStart)*(yGraphLength/yGraphScale)))+yGraphBottomScaleOffset = ($yGraphLength-(($dataAmbientStart)*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset</p>");
}
#Debug End
*/
#Filter out spurios temp spikes >= 70C - Can be adjusted up or down
#Looks for either dataAmbient Temp C (Rising) or dataAmbientStart (falling from high to low) - Spike has two sides to the triangle shape
#filter out > 70C
if (($dataAmbient[3] <= 60) and ($dataAmbientStart <= 60))
{
#imageline($img, $dataXAmbientStart+$moveGraphLeft, ($yGraphLength-(($dataAmbientStart)*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset,$dataXAmbientContinue+$moveGraphLeft,($yGraphLength-(($dataAmbient[3])*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 0,$graphLineOpacity));
#Find MIN and MAX Temp
$tempCpuMax = max($dataGpu[3],$dataGpuStart,$tempCpuMax);
#$tempAmbientMax = max($dataAmbient[3],$dataAmbientStart,$tempAmbientMax);
$tempCpuMin = min($tempCpuMin,$dataGpu[3],$dataGpuStart);
#$tempAmbientMin = min($dataAmbient[3],$dataAmbientStart,$tempAmbientMin);
#Debug hide
#print("<p>Max CPU Temp = $tempCpuMax</p>");
#print("<p>Max Ambient Temp = $tempAmbientMax</p>");
#print("<p>Min CPU Temp = $tempCpuMin</p>");
#print("<p>Min Ambient Temp = $tempAmbientMin</p>");
}
#GPU - Colour
imageline($img, $dataXGpuStart+$moveGraphLeft, ($yGraphLength-(($dataGpuStart)*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset,$dataXGpuContinue+$moveGraphLeft,($yGraphLength-(($dataGpu[3])*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 255, 0,$graphLineOpacity));
$dataAmbientContinue = $dataAmbient[3];
$dataGpuContinue = $dataGpu[3];
$dataXAmbientStart = $dataXAmbientContinue;
$dataXGpuStart = $dataXGpuContinue;
}
#Start DEBUG
#Once loop completed print final temp MAX
#print("<p>FINAL MAX CPU Temp = $tempCpuMax</p>");
#print("<p>FINAL MAX Ambient Temp = $tempAmbientMax</p>");
#Once loop completed print final temp MIN
#print("<p>FINAL MIN CPU Temp = $tempCpuMin</p>");
#print("<p>FINAL MIN Ambient Temp = $tempAmbientMin</p>");
#End DEBUG
// Draw a line and move it down and make it lighter to get the gradient effect
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , 0+$moveHeadingUp+($yGraphLength-(100*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "100C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(100*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(100*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
imagestring ($img , $graphFont , 0+10+$moveGraphLeft , $yGraphLength-(90*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset , "RPI 4 Demo Gateway - $dateTempCheck" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
imagestring ($img , $graphFont , 0+10+$moveGraphLeft , $yGraphLength-(85*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset , "rpi4 CPU/GPU = green" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
####imagestring ($img , $graphFont , 0+10+$moveGraphLeft , $yGraphLength-(80*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset , "rpi3bPlus Ambient Sensor = black" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
#Max and Min Temps
imagestring ($img , $graphFont , 0+300+$moveGraphLeft , $yGraphLength-(90*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset , "MIN CPU Temp.......= $tempCpuMin C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
imagestring ($img , $graphFont , 0+300+$moveGraphLeft , $yGraphLength-(85*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset , "MAX CPU Temp.......= $tempCpuMax C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
imagestring ($img , $graphFont, 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(80*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "80C" , imagecolorallocatealpha($img, 255, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(80*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(80*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 255, 0, 0,$crossLineOpacity));
imagestring ($img , $graphFont, 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(75*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "75C" , imagecolorallocatealpha($img, 255, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(75*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(75*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 255, 0, 0,$crossLineOpacity));
imagestring ($img , $graphFont, 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(70*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "70C" , imagecolorallocatealpha($img, 255, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(70*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(70*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 255, 0, 0,$crossLineOpacity));
imagestring ($img , $graphFont, 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(65*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "65C" , imagecolorallocatealpha($img, 255, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(65*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(65*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 255, 0, 0,$crossLineOpacity));
imagestring ($img , $graphFont, 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(60*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "60C" , imagecolorallocatealpha($img, 255, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(60*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(60*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 255, 0, 0,$crossLineOpacity));
imagestring ($img , $graphFont, 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(55*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "55C" , imagecolorallocatealpha($img, 255, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(55*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(55*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 255, 0, 0,$crossLineOpacity));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(50*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "50C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(50*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(50*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(45*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "45C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(45*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(45*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(40*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "40C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
##### #Set line opacity - this one is different as I want it brighter as its the average CPU Temp of Rpizerow
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(40*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(40*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity-20));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(35*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "35C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(35*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(35*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img,0, 0, 255,$crossLineOpacity));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color ) - RED
imagestring ($img , $graphFont, 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(30*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "30C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(30*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(30*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(25*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "25C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(25*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(25*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
#Optimal Temp 24C
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(24*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(24*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity-20));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(20*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "20C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(20*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(20*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(15*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "15C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(15*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(15*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(10*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "10C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(10*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(10*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft , $moveHeadingUp+($yGraphLength-(5*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "5C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
ImageLine($img, 0+$moveGraphLeft, $yGraphLength-(5*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(5*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
#imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )
imagestring ($img , $graphFont , 0+$moveHeadingLeft ,$moveHeadingUp+($yGraphLength-(0*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset , "0C" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
imageline($img, 0+$moveGraphLeft, $yGraphLength-(0*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,$xGraphLength+$moveGraphLeft,$yGraphLength-(0*($yGraphLength/$yGraphScale))+$yGraphBottomScaleOffset,imagecolorallocatealpha($img, 0, 0, 255,$crossLineOpacity));
#Y - Legend
imagestringup($img , $graphFont , 0+$moveVerticalHeadingLeft , $moveHeadingUp+($yGraphLength-(25*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset ,"Temperature(C)", imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity));
#X - Legend
imagestring ($img , $graphFont , 0+$moveHeadingLeft+(1440/2) ,($yGraphLength-(0*($yGraphLength/$yGraphScale)))+$yGraphBottomScaleOffset+40 ,"Minute Samples" , imagecolorallocatealpha($img, 0, 0, 0,$crossTextOpacity) );
fclose($handleAmbient);
fclose($handleGpu);
}
#Directory /home/pi/html-php-scripts/graph-png
ImagePng($img,"graph-png/$tempPng");
ImageDestroy($img);
echo "<p><a href=\"graph-png/$tempPng\" target=\"_blank\"> <img src=\"graph-png/$tempPng\"></a></p>";
echo("</div>");
?>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
css/css-default.css
/*<!--| Ver 1.7 | Last edited Date 25 Feb 2018 | Designed By: Andrew Fullagar | Edited Last By: Andrew Fullagar | afullagar@gmail.com |-->*/
* {
margin: 0px;
padding: 0px;
}
body {
font-family: verdana,arial,serif;
width: 100%;
display: box;
display: -moz-box;
display: -webkit-box;
box-pack: center;
-moz-box-pack: center;
-webkit-box-pack: center;
}
header, section, aside, nav, article, figure, figcaption, hgroup {
display: block;
}
#bodycenter {
font-family: verdana,arial,serif;
margin-left: 2%;
margin-right:2%;
width: 96%;
border: 1px solid #2352B1;
border-collapse:collapse;
padding:0px;
}
#bodycenter form p {
font-family: verdana,arial,serif;
/*font-size: 16px;*/
font-size: calc(0.8vw + 0.8vh);
display: block-inline;
clear:both;
border-top: 1px solid #2352B1;
border-collapse:collapse;
margin: 2px;
padding: 2px;
}
#bodycenter form p label {
font-family: verdana,arial,serif;
/*font-size: 16px;*/
font-size: calc(0.8vw + 0.8vh);
font-weight: bold;
/*clear:both;*/
float: left;
color: 0000FF;
background: #FFF;
margin: 2px;
padding: 2px;
display: block;
border-collapse:collapse;
}
#bodycenter form p .flyleft {
font-family: verdana,arial,serif;
font-size: 16px;
/*clear:both;*/
float: left;
color: 0000FF;
background: #FFF;
margin: 2px;
padding: 1px;
display: block;
}
#bodycenter form p input,textarea,select,option,legend {
font-family: verdana,arial,serif;
/*font-size: 18px;*/
font-size: calc(0.8vw + 0.8vh);
background-color:#ffffff;
border: 2px solid #2352B1;
border-collapse:collapse;
margin: 2px;
padding: 2px;
color: 0000FF;
/*clear:both;*/
float: right;
}
/*specs for submit button on forms*/
#bodycenter form p .submitbutton {
font-family: bold verdana,arial,serif;
margin: 1pt;
padding: 1pt;
border: 1pt outset #336699;
background-color: #0000ff;
/*font-size: 16px;*/
font-size: calc(0.8vw + 0.8vh);
color: #fff;
float: right;
}
/*specs for submit button on forms*/
#bodycenter form p .submitbuttonimage {
font-family: bold verdana,arial,serif;
margin: 1pt;
padding: 1pt;
border: none;
background-color: #fff;
font-size: 16px;
color: #fff;
float: right;
}
#bodycenter form p .updatebutton {
font-family: bold verdana,arial,serif;
margin: 1pt;
padding: 1pt;
border: 1pt outset #336699;
background-color: #00ff00;
font-size: 16px;
color: #000;
float: right;
}
#bodycenter form p .updatebuttonimage {
font-family: bold verdana,arial,serif;
margin: 1pt;
padding: 1pt;
border: none;
background-color: #fff;
font-size: 16px;
color: #000;
float: right;
}
#bodycenter form p .insertbutton {
font-family: bold verdana,arial,serif;
margin: 1pt;
padding: 1pt;
border: 1px outset #336699;
background-color: yellow;
font-size: 16px;
color: #000;
float: right;
}
#bodycenter form p .mustfillout {
font-family: bold verdana,arial,serif;
/*margin: 1pt;*/
/*padding: 1pt;*/
/*border: 1pt outset #336699;*/
font-weight: bold;
background-color: #0000cd;
font-size: 16px;
color: white;
float: right;
}
#bodycenter form p .resetbutton {
font-family: verdana,bold arial,serif;
margin: 1pt;
padding: 1pt;
border: 1pt outset #336699;
background-color: #ff0000;
font-size: 16px;
color: #fff;
float: left;
}
#bodycenter form p .resetbuttonimage {
font-family: verdana,bold arial,serif;
margin: 1pt;
padding: 1pt;
border: none;
background-color: #fff;
font-size: 16px;
color: #fff;
float: left;
}
#bodycenter form p .emailbutton {
font-family: verdana,bold arial,serif;
margin: 1pt;
padding: 1pt;
border: 1pt outset #336699;
background-color: #F90;
font-size: 16px;
color: #fff;
float: right;
}
#bodycenter form p .emailbuttonimage {
font-family: verdana,bold arial,serif;
margin: 1pt;
padding: 1pt;
border: none;
background-color: #fff;
font-size: 16px;
color: #fff;
float: right;
}
#bodycenter ul li {
font-family: verdana,arial,serif;
font-size: 16px;
list-style: none;
margin: 1px;
padding: 1px;
}
#bodycenter h1 {
font-family: verdana,arial,serif;
margin: 2px;
/*font-size: 28px;*/
font-size: calc(1.1vw + 1.1vh);
color: #5692D0;
text-align: center;
font-weight: bold;
border: 1px solid #A4C0E2;
background-color: #ffffff;
}
#bodycenter h2 {
margin: 2px;
font-family: verdana,arial,serif;
/*font-size: 24px;*/
font-size: calc(0.9vw + 0.9vh);
/*color: #5692D0;*/
color: 000;
text-align: center;
font-weight: bold;
clear:both;
border: 1px solid #A4C0E2;
background-color: #ffffff;
}
#bodycenter h3 {
margin: 2px;
font-family: verdana,arial,serif;
/*font-size: 20px;*/
font-size: calc(0.8vw + 0.8vh);
/*color: #5692D0;*/
color: 000;
text-align: left;
font-weight: bold;
border: 1px solid #A4C0E2;
background-color: #ffffff;
}
#bodycenter table {
font-family: verdana,arial,serif;
font-size: calc(0.8vw + 0.8vh);
/*border: 0.1pt solid black;*/
border-collapse: collapse;
empty-cells: show;
width: 99%;
line-height: calc(1.3vw + 1.3vh);
background-color:#ffffff;
margin: 5px;
padding: 5px;
}
#bodycenter th {
font-family: verdana,arial,serif;
font-size: calc(0.8vw + 0.8vh);
text-align: left;
color: 0000FF;
border-collapse: collapse;
border: 1px solid #2352B1;
background-color:#ffffff;
empty-cells: show;
line-height: calc(0.8vw + 0.8vh);
margin: 2px;
padding: 1px;
}
#bodycenter tr {
font-family: verdana,arial,serif;
font-size: calc(0.8vw + 0.8vh);
border-collapse: collapse;
/*border-top: 0.1pt solid black;*/
empty-cells: show;
line-height: calc(0.8vw + 0.8vh);
background-color:#ffffff;
}
#bodycenter td {
font-family: verdana,arial,serif;
/*font-size: calc(0.8vw + 0.8vh);*/
font-size: calc(0.8vw + 0.8vh);
empty-cells:show;
color: 0000FF;
border-collapse: collapse;
border: 1px solid #2352B1;
/*margin:0pt;
padding:0pt;*/
/*white-space:nowrap;*/
line-height: calc(0.8vw + 0.8vh);
text-align: left;
background-color:#ffffff;
}
#bodycenter a img {border: 0; }
#bodycenter img {
padding: 10;
display: block;
margin: 0 auto;
max-height: 100%;
max-width: 100%;
}
#bodycenter a,href {
font-family: verdana,arial,serif;
font-size: calc(0.8vw + 0.8vh);
text-decoration: none;
font-weight: bold;
/*color: #234A76;*/
/*margin: 1px;
padding: 1px;*/
display: block;
}
#bodycenter a:link {
font-size: calc(0.8vw + 0.8vh);
text-decoration: none;
font-weight: bold;
color: #234A76;
margin:1px;
display: block;
}
#bodycenter a:visited {
font-size: calc(0.8vw + 0.8vh);
text-decoration: none;
font-weight: bold;
color: #234A76;
margin:1px;
display: block;
}
#bodycenter a:hover {
font-family: verdana,arial,serif;
font-size: calc(0.8vw + 0.8vh);
text-decoration: underline;
font-weight: bold;
display: block;
}
#bodycenter a:active {
font-family: verdana,arial,serif;
font-size: calc(0.8vw + 0.8vh);
text-decoration: underline;
font-weight: bold;
display: block;
}
#bodycenter footer {
font-family: verdana,arial,serif;
font-size: calc(0.4vw + 0.4vh);
text-decoration: underline;
font-weight: bold;
display: block;
text-align: right;
}
p {
font-family: verdana,arial,serif;
/*font-size: 16px;*/
font-size: calc(0.8vw + 0.8vh);
}
a {
font-family: verdana,arial,serif;
font-size: calc(0.8vw + 0.8vh);
}
table {
font-family: verdana,arial narrow,serif;
font-size: calc(0.8vw + 0.8vh);
/*border: 0.1pt solid black;*/
border-collapse: collapse;
empty-cells: show;
width: 99%;
line-height: calc(0.8vw + 0.8vh);
}
th {
font-family: verdana,arial narrow,serif;
font-size: calc(0.8vw + 0.8vh);
text-align: left;
border-collapse: collapse;
border-top: 0.1pt solid black;
border-left: 0.1pt solid black;
border-right: 0.1pt solid black;
border-bottom: 0.1pt solid black;
background-color: #ccf;
empty-cells: show;
line-height: calc(0.8vw + 0.8vh);
}
.th-report {
font-family: verdana,arial narrow,serif;
font-size: 16px;
text-align: left;
background-color: #fff;
line-height: 10pt;
}
/*No shade for th*/
.noshade {
font-family: verdana,arial narrow,serif;
font-size: 16px;
text-align: left;
background-color: #fff;
line-height: 10pt;
}
tr {
font-family: verdana,arial narrow,serif;
font-size: calc(0.8vw + 0.8vh);
border-collapse: collapse;
/*border-top: 0.1pt solid black;*/
empty-cells: show;
line-height: calc(0.8vw + 0.8vh);
}
td {
font-family: verdana,arial narrow,serif;
font-size: calc(0.8vw + 0.8vh);
empty-cells:show;
border-collapse: collapse;
border-top: 0.1pt solid black;
border-left: 0.1pt solid black;
border-right: 0.1pt solid black;
border-bottom: 0.1pt solid black;
/*margin:0pt;
padding:0pt;*/
/*white-space:nowrap;*/
line-height: calc(0.8vw + 0.8vh);
}