SmartHome
|
Functions | |
selectdb ($dbname, $connection) | |
fetch () | |
insert ($vals, $table) | |
addstatistics ($device_id, $data, $value) | |
getDetails ($devid) | |
goback () | |
send_command ($command) | |
Variables | |
PHP | |
if(!$fgmembersite->CheckLogin()) | $sondefa |
$current | |
$current2 | |
$timestamp_array =array() | |
$timestamp1 | |
$timestamp2 | |
$con = mysql_connect($server,$user,$password) | |
$con_raspberry | |
$server ="mysql.felixaestheticus.net" | |
$user ="e1702299" | |
$password ="KVIDyY4I8f" | |
$devid1 ='3' | |
$sql3 | |
$i = 0 | |
$result3 = mysql_query($sql3) | |
$devid2 ='10' | |
PHP global | $timestamp_array2 |
$sum =$current2+$current | |
addstatistics | ( | $device_id, | |
$data, | |||
$value | |||
) |
addstatistics function
string | $device_id | |
string | $data | |
string | $value |
fetch | ( | ) |
fetch function (Fetch all the devices in smarthome_server_db.devices)
getDetails | ( | $devid) |
getDetails function (for a given device id it gets the details such as status, power consumption ..etc)
string | $devid |
goback | ( | ) |
goback function
insert | ( | $vals, | |
$table | |||
) |
insert function
string | $vals | |
string | $table |
selectdb | ( | $dbname, | |
$connection | |||
) |
selectdb function
string | $dbname | |
string | $connection |
send_command | ( | $command) |
send_command function
string | $command |
produce command data array here!
$con = mysql_connect($server,$user,$password) |
$con_raspberry |
global $current |
PHP global $current2 |
$devid1 ='3' |
$devid2 ='10' |
$i = 0 |
$password ="KVIDyY4I8f" |
$result3 = mysql_query($sql3) |
$server ="mysql.felixaestheticus.net" |
if (!$fgmembersite->CheckLogin()) $sondefa |
Variables
$sql3 |
$sum =$current2+$current |
$timestamp1 |
$timestamp2 |
PHP global $timestamp_array =array() |
End of File
PHP global $timestamp_array2 |
$user ="e1702299" |
PHP |
SmartHome Project - Developed by Tranquillum statistics.php Purpose: This Page Shows statistics about the power consumption for all appliances
Check the login (if the user is not logged in then redirect to the login page)