DIY Aquarium Monitor Build

I like what I have currently for viewing on my mobile phone but I do want to have a more robust Dashboard look and feel for the actual full page.
 
np just helpful ideas didn't know you had done a mobile phone index that is very nice to have
 
Just doing some research this morning and trying to decide if I want to keep the current method of reporting data to the web or change it all together. I was thinking I could probably make a data adapter and write the readings to a mySQL database rather than the txt file and upload via ftp. While the current method is effective it also has limitations whereas with data in a DB the possibilities are numerous. I suppose I could simplify this and still use the current methods and just write out a CSV or XML file and process that data in PHP to upload to the DB.

as you can gather from the snippet below the code is just appending to a txt file.
Code:
                    Dim curtime As String = My.Computer.Clock.LocalTime.ToString("ddd, MMM d  h:mm tt ")
                    Dim fEntry As New System.Text.StringBuilder
                    fEntry.Append("Sample Time: ")
                    fEntry.Append(fontColorGood)
                    fEntry.Append(curtime)
                    fEntry.Append(fontEnd)
                    'fEntry.Append(";")
                    fEntry.Append(line)
                    fEntry.Append(title)
                    fEntry.Append("Temperature")
                    fEntry.Append(titleEnd)
                    fEntry.Append(";")
                    fEntry.Append("Display Temp: ")
                    fEntry.Append(ftemp.ToString())
                    fEntry.Append(";")
                    fEntry.Append("Sump Temp: ")
                    fEntry.Append(fAirTemp.ToString())
                    'fEntry.Append(";")
                    fEntry.Append(line)
                    fEntry.Append(title)
                    fEntry.Append("Levels")
                    fEntry.Append(titleEnd)
                    fEntry.Append(";")
                    fEntry.Append("Sump Level: ")
                    fEntry.Append(fSump.ToString())
                    fEntry.Append(";")
                    fEntry.Append("Display Level: ")
                    fEntry.Append(fAquar.ToString())
                    fEntry.Append(";")
                    fEntry.Append("Overflow Water Level: ")
                    fEntry.Append(fOverflow.ToString())
                    fEntry.Append(";")
                    fEntry.Append("Top Off Level: ")
                    fEntry.Append(fTopOff.ToString())
                    fEntry.Append(";")
                    fEntry.Append("Skimmate Level: ")
                    fEntry.Append(fSkimmer.ToString())
                    'fEntry.Append(";")
                    fEntry.Append(line)
                    fEntry.Append(title)
                    fEntry.Append("Pumps")
                    fEntry.Append(titleEnd)
                    fEntry.Append(";")
                    fEntry.Append(" Pump and Topoff Status: ")
                    fEntry.Append(fPump.ToString())
                    fEntry.Append(";")
                    fEntry.Append("Water Flow: ")
                    fEntry.Append(fflow.ToString())

I could use something like this web side to post csv data to the DB:
PHP:
<?php

$connect = mysql_connect('localhost','root','12345');
if (!$connect) {
die('Could not connect to MySQL: ' . mysql_error());
}

$cid =mysql_select_db('test',$connect);
// supply your database name

define('CSV_PATH','C:/wamp/www/csvfile/');
// path where your CSV file is located

$csv_file = CSV_PATH . "infotuts.csv"; // Name of your CSV file
$csvfile = fopen($csv_file, 'r');
$theData = fgets($csvfile);
$i = 0;
while (!feof($csvfile)) {
$csv_data[] = fgets($csvfile, 1024);
$csv_array = explode(",", $csv_data[$i]);
$insert_csv = array();
$insert_csv['ID'] = $csv_array[0];
$insert_csv['name'] = $csv_array[1];
$insert_csv['email'] = $csv_array[2];
$query = "INSERT IGNORE INTO csvdata(ID,name,email)
VALUES('','".$insert_csv['name']."','".$insert_csv['email']."')";
$n=mysql_query($query, $connect );
$i++;
}
fclose($csvfile);

echo "File data successfully imported to database!!";
mysql_close($connect);
?>
 
Last edited:
I'm in the process of getting things together to build the board. Are you at a almost release state on the program? I only ask because I don't have VB to compile it. ;) I think its going to be great!
 
Minor update:

Built the level sensor for the RO/DI storage container to notify when water needs to be made. Tested and fully functional now.
 
So I am in limbo waiting for a couple components to build my board. Curse you Radio Shack for going out of business! My stuff is coming out of Texas and guess there are shipping delays. C'mon its just a little ice and snow! I'm in the Chicago area and we never shut down. So how's things with the controller going?
 
So I am in limbo waiting for a couple components to build my board. Curse you Radio Shack for going out of business! My stuff is coming out of Texas and guess there are shipping delays. C'mon its just a little ice and snow! I'm in the Chicago area and we never shut down. So how's things with the controller going?
Same boat here. My local shack just closed too. The monitor is doing really well. I still have a few sensors to build but spent the past few days on my favorite subject of income taxes...Not!

I had a brief power outage for a few minutes which reminded me to hook up a ups to the PC. I also started thinking that the software needs to update the log file automatically when the warnings get back in check with the set thresholds rather than requiring manual input .
 
changed the names in hyperterminal, can't get it to activate in amp. whats the address/host name I should be typing in putty?
 
Back
Top