HA7Net Advice

Forum about 1-Wire devices.

HA7Net Advice

Postby AJTaylor » Sun Oct 31, 2010 2:27 pm

I am thinking about purchasing a HA7Net and would like some advice before I do.

How easy would it be to feed the data over the internet to to a remote computer into a mysql table? If so how easy would this be to do?

In the interim how would I download the data from the HA7Net to my local Mac into an excel spreadsheet?

Any advice would be really appreciated.

Thanks

Andrew
AJTaylor
Starting Member
Starting Member
 
Posts: 2
Joined: October 2010
Location: Cwmbran

Re: HA7Net Advice

Postby Digit » Sun Oct 31, 2010 3:11 pm

The HA7Net can be used by firing HTTP requests at it.
The HTTP response needs to be parsed to filter out the intersting stuff, like the temperature, counter values etc.

A few examples. Reading temp sensors:
http://HA7Net.hekkers.lan/1Wire/ReadTem ... 070411F410
Reading a DS2423 counter:
http://HA7Net.hekkers.lan/1Wire/WriteBl ... FFFFFFFFFF

Then there's the response you will get back, which needs to be parsed. It looks like this (this is just the 'important' part):

Code: Select all
<table name="Temperature" id="Temperature">
<tr><td colspan=1>Address</td><td colspan=1>Temperature</td><td colspan=1>Resolution</td><td colspan=1>Status</td></tr>
<tr><td colspan=1><INPUT CLASS="HA7Value" NAME="Address_0" ID="Address_0" TYPE="text" VALUE="1100080103EC7410"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Temperature_0" ID="Temperature_0" TYPE="text" VALUE="20.5625"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Resolution_0" ID="Resolution_0" TYPE="text" VALUE="9+"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Device_Exception_0" ID="Device_Exception_0" TYPE="text" VALUE="OK"></td><INPUT CLASS="HA7Value" NAME="Device_Exception_Code_0" ID="Device_Exception_Code_0" TYPE="hidden" VALUE="0"></tr>
<tr><td colspan=1><INPUT CLASS="HA7Value" NAME="Address_1" ID="Address_1" TYPE="text" VALUE="370008010411F410"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Temperature_1" ID="Temperature_1" TYPE="text" VALUE="20.9375"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Resolution_1" ID="Resolution_1" TYPE="text" VALUE="9+"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Device_Exception_1" ID="Device_Exception_1" TYPE="text" VALUE="OK"></td><INPUT CLASS="HA7Value" NAME="Device_Exception_Code_1" ID="Device_Exception_Code_1" TYPE="hidden" VALUE="0"></tr>
<tr><td colspan=1><INPUT CLASS="HA7Value" NAME="Address_2" ID="Address_2" TYPE="text" VALUE="C3000800CA056C10"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Temperature_2" ID="Temperature_2" TYPE="text" VALUE="21.3125"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Resolution_2" ID="Resolution_2" TYPE="text" VALUE="9+"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Device_Exception_2" ID="Device_Exception_2" TYPE="text" VALUE="OK"></td><INPUT CLASS="HA7Value" NAME="Device_Exception_Code_2" ID="Device_Exception_Code_2" TYPE="hidden" VALUE="0"></tr>
<tr><td colspan=1><INPUT CLASS="HA7Value" NAME="Address_3" ID="Address_3" TYPE="text" VALUE="FA000800C98F2A10"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Temperature_3" ID="Temperature_3" TYPE="text" VALUE="85"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Resolution_3" ID="Resolution_3" TYPE="text" VALUE="9+"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Device_Exception_3" ID="Device_Exception_3" TYPE="text" VALUE="OK"></td><INPUT CLASS="HA7Value" NAME="Device_Exception_Code_3" ID="Device_Exception_Code_3" TYPE="hidden" VALUE="0"></tr>
<tr><td colspan=1><INPUT CLASS="HA7Value" NAME="Address_4" ID="Address_4" TYPE="text" VALUE="5A000800CA21F610"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Temperature_4" ID="Temperature_4" TYPE="text" VALUE="85"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Resolution_4" ID="Resolution_4" TYPE="text" VALUE="9+"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Device_Exception_4" ID="Device_Exception_4" TYPE="text" VALUE="OK"></td><INPUT CLASS="HA7Value" NAME="Device_Exception_Code_4" ID="Device_Exception_Code_4" TYPE="hidden" VALUE="0"></tr>
<tr><td colspan=1><INPUT CLASS="HA7Value" NAME="Address_5" ID="Address_5" TYPE="text" VALUE="54000800C99E4E10"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Temperature_5" ID="Temperature_5" TYPE="text" VALUE="21"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Resolution_5" ID="Resolution_5" TYPE="text" VALUE="9+"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Device_Exception_5" ID="Device_Exception_5" TYPE="text" VALUE="OK"></td><INPUT CLASS="HA7Value" NAME="Device_Exception_Code_5" ID="Device_Exception_Code_5" TYPE="hidden" VALUE="0"></tr>
<tr><td colspan=1><INPUT CLASS="HA7Value" NAME="Address_6" ID="Address_6" TYPE="text" VALUE="9200080103E3C110"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Temperature_6" ID="Temperature_6" TYPE="text" VALUE="20.8125"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Resolution_6" ID="Resolution_6" TYPE="text" VALUE="9+"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Device_Exception_6" ID="Device_Exception_6" TYPE="text" VALUE="OK"></td><INPUT CLASS="HA7Value" NAME="Device_Exception_Code_6" ID="Device_Exception_Code_6" TYPE="hidden" VALUE="0"></tr>
<tr><td colspan=1><INPUT CLASS="HA7Value" NAME="Address_7" ID="Address_7" TYPE="text" VALUE="05000800C9FD3710"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Temperature_7" ID="Temperature_7" TYPE="text" VALUE="20.5"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Resolution_7" ID="Resolution_7" TYPE="text" VALUE="9+"></td><td colspan=1><INPUT CLASS="HA7Value" NAME="Device_Exception_7" ID="Device_Exception_7" TYPE="text" VALUE="OK"></td><INPUT CLASS="HA7Value" NAME="Device_Exception_Code_7" ID="Device_Exception_Code_7" TYPE="hidden" VALUE="0"></tr>
</table>


This can be accomplished by using regular expressions.
Next thing to do is getting the readings into a database.
It's all not that hard, but as you can see you'll have to create a tool that can do all these things for you or you'll need to find a tool that can; mostly depending on your programming skills and/or amount of effort you want to put into it.

HTH,
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands


Return to 1-Wire Forum

Who is online

Users browsing this forum: No registered users and 1 guest