Monday, November 14, 2011

A Nokia application for system room temperature controlling.

One of the our previous article ( http://stdioe.blogspot.com/2011/10/checking-system-room-temperature-with.html ) was explaining how to get temperature information from some devices. We showed that related scripts saves the temperature value to a MySQL table. In this article, we are explaining publishing only the current temperature value on a public web page. The Nokia application will read that value to generate alarms when the value exceeds a critical value. The Nokia application is written by jbytecode to follow up via cell phones. If system room temperature reaches a predefined critical value, your mobile cell phone will create an alarm sound. Therefore you will be informed where ever you are.

The mobile phone application is an open source project and is being hosted on Google Code web site. You can access .jar and .jad files and source code on http://code.google.com/p/atlantis-networking-utilities web page address.Note that we call that "Nokia Application" because we only tested it with a Nokia E-72. Of course it is generally a Midlet application which can run in any supported device.

You can start the application by simply clicking the icon,

You have to define a temperature reader url on that program. If you need, you can change the checking period of system room temperature and define a critical temperature value,

After editing the configuration you can start the application,


The application needs internet connectivity. When it starts, it will show a confirmation alert and wait your response. Allow it.


Finally, it will start to read the current temperature value for the given time period. Received temperature values are logged in a text box.


This application is in its early stages. If you need extra features etc. let us know please. It's already an open-source project on code.google.com site. Every body can help to develop it or write to us ...


The current temperature publishing page is like following: You need to replace some parts on the code. MySQL server, user and password,DB_name, table_name and "temp" field names should be changed manually.

Also you may want to sort the historical values by date, so I am adding a date field on the sample db.


<?php
$link = mysql_connect("MySQL_Server","MySQL_User","MySQL_Password") or die("Error message");

mysql_select_db("DB_Name") or die("Error message");

$query = "SELECT * FROM `table_name ORDER by `date` DESC";
$result = mysql_query($query);
$line = mysql_fetch_array($result);
$temp = $line["temp"];
print $temp;
mysql_close($link);
?>

You will get only the curreny temperature value as a plain text whenever the page is accessed by the TempAlarmer. Please let us know your comments to develop it more.

Have Fun!


2 comments:

  1. I am a service provider of smartphone application development. Your app looks quite amazing... From where I can download this app???

    ReplyDelete

Thanks