navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 25, 2012, 09:14:12 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: Data Logging  (Read 3414 times)
langstroth2
Full Member
***
Offline Offline

Posts: 223



WWW
« on: January 08, 2009, 10:49:38 PM »

Finally got around to installing various temperature sensors on my system, although not the panel sensor yet (too cold to get on the roof!). I know quite a few do this already, so nothing new, but for I'm now uploading current data to a website along with a daily graph (partly so I can check the system from work if need be  Wink ).

See the Solar link on the following web site: www.honey-bee.co.uk. "A work in progress".

Cheers
Graham

20 Tube
160L tank
Direct system
Logged
Paulh_Boats
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2768



« Reply #1 on: January 09, 2009, 03:38:14 PM »

Thanks for the link to LogTemp ... I downloaded it and logged my Hobby Boards USB interface. A bit fiddling setting up the correct sensors to scan for, but its a great program.

I logged the temperature overnight in the breakfast room. I've got a spare laptop and I'll try to run it from a mains timer to save power - I don't think logging 24/7 is essential.

 -Paul
« Last Edit: January 10, 2009, 12:01:06 AM by Paulh_Boats » Logged
wyleu
Guest
« Reply #2 on: January 09, 2009, 04:15:14 PM »

Daytime temperature during the summer,and both during the winter might be a good starting point.
Logged
Paulh_Boats
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2768



« Reply #3 on: January 09, 2009, 05:46:41 PM »

I'm going to monitor the natural cooling of the cylinder - it needs more insulation.
Logged
langstroth2
Full Member
***
Offline Offline

Posts: 223



WWW
« Reply #4 on: January 09, 2009, 07:48:53 PM »

I've also now added an outside temp and panel pipe exit temp to the web page.

I've tried to better insulate the exisitng 20 year old cylinder, so like you Paul one of the reasons i did this was to monitor temp drop over-night from the tank - which in this weather also has to contend with occassional pumping due to panel dropping below 4C.

Logged
Paulh_Boats
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2768



« Reply #5 on: January 09, 2009, 08:38:45 PM »

Graham (only HTML gurus will now how I found your name Wink)

That's a tidy bit of coding and sensible use of XML. I hope you don't mind if I rip off the idea and FTP data to my ISP site?

Also 10/10 for bee keeping, hope the hive is healthy...we need as many bees as possible. I'd love to keep some myself, but not while we live in a built up area.

-Paul
Logged
langstroth2
Full Member
***
Offline Offline

Posts: 223



WWW
« Reply #6 on: January 09, 2009, 10:48:16 PM »

No problem.

Re: bees. You could always get an alotment to keep a hive on  Smiley. As we have two young children I don't keep the hives in our smallish garden - the inevitable would happen. Fortunately my local club found me a small piece of land to use - for the price of a few jars of honey a year to the owner.
« Last Edit: January 09, 2009, 10:52:15 PM by langstroth2 » Logged
Paulh_Boats
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2768



« Reply #7 on: January 09, 2009, 11:03:07 PM »

As an experiment I am sending a temperature graph via FTP every 10 minutes to this website, whenever I run the LogTemp program:

http://www.millibee.com/day.png

I like the FTP approach as the Virgin Media website has loads of fast bandwidth and up to 55MB of data is always available, whereas hosting through our local wireless routers is limited to a slow upload speed, with intermittent access and a limited on the number of connections.


Every time you look at this forum page you should see the last graph below. If LogTemp is running on my PC you can refresh the page (F5) every 10 minutes to get the next graph. Virgin Media seem to cache the data, sometimes it lags behind the latest upload time.

I'm currently logging the kitchen temperature:



« Last Edit: January 09, 2009, 11:57:46 PM by Paulh_Boats » Logged
langstroth2
Full Member
***
Offline Offline

Posts: 223



WWW
« Reply #8 on: January 09, 2009, 11:26:38 PM »

The FTP approach means I can use my ISP web space rather than my own server, but by using Javascript and the FTP'd XML and graphic file avoid needing to run any code on the ISP server to update the pages (which you often have to pay extra for - something I never like to do Wink). The javascript only updates the data on the page rather than refreshing the whole page.

Like the boats by the way - I have a Drascombe Lugger which we attempt to sail on the S Coast when the weather's nice and warm.
Logged
kristen
Hero Member
*****
Offline Offline

Posts: 1568


« Reply #9 on: February 04, 2009, 07:19:49 AM »

I wanted to try to come up with a web page diagram of tank/pipework with temperature labels, and make it reasonable generic that folks could adapt easily.

A standard web page with some of the benefits of HotBox (Screenshot here) - but that is a Windows app - and Mango (Nice example on philipthemean's site) but I find it jolly slow, and its too Unix-y for my Microsoft skillset Sad

So:

langstroth2 : I've been looking at your code too.

It looks like you are assuming that the Values will be in the same order, in the XML, and thus just assuming that the first value will be "Tank_Top", and so on, is that right?

I was aiming for something more configurable, so I thought I would use <DIV> IDs that matched the ROMIDs of the sensors (could match the Name of the sensor insread, I suppose).

At which point I discovered that parsing XML in JavaScript is not straightforward! and the fact that the ROMID is an Attribute, rather than an Element, seemed to stymie me.

So next up I looked for XML parsers and figured that converting XML to JSON would give me a JavaScript array.

So I've done that ... and now I can loop round the sensors using something like this:

intLength = aryData.TEMPERATURES[0].SENSOR.length;
for(i=0; i < intLength; i++)
{
   arySensor = aryData.TEMPERATURES[0].SENSOR[ i ];
   strROMID = arySensor.ROMID;
   strName = arySensor.NAME[0].Text;
   strValue = arySensor.VALUE;

... do something useful with the data for this sensor ...

}

I then thought that I would lash something together so that a graphic could be displayed as background, the co-ordinates determined for the various places where sensor values should be shown, and then <DIV>s added, as you have done, e.g.

<div style="position: absolute; left: 123px; top: 456px; font-weight: bold;" id="8000012345678910">No data</div>

so that I can just inject the value into each DIV with something like:

document.getElementById('8000012345678910').innerHTML = strValue;

before I get much further into this I'd appreciate any thoughts / comments
« Last Edit: February 04, 2009, 07:22:37 AM by kristen » Logged
wyleu
Guest
« Reply #10 on: February 04, 2009, 09:33:48 AM »



coming soon! Cheesy
Logged
Paulh_Boats
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2768



« Reply #11 on: February 04, 2009, 01:14:24 PM »

Kirsten,

This XML file is uploaded by LogTemp every 10 minutes for my cylinder. It has the same format as langstroth2's data.

http://www.millibee.com/logtemp/last.xml     
 
LogTemp lets the user assign a name to a sensor, but by default it only writes the Sensor ROMID to the XML file.  There is a setting to add the name of the sensor.... I'll try it tonight.

If we can agree on standard names like "Tank_Top" then the innerHTML assignment to a standard cylinder/panel picture is a breeze and you could use your script to monitor many sites across the country.

-Paul
« Last Edit: February 04, 2009, 05:42:59 PM by Paulh_Boats » Logged
kristen
Hero Member
*****
Offline Offline

Posts: 1568


« Reply #12 on: February 04, 2009, 05:57:53 PM »

"If we can stick in standard names like "Tank_Top" "

Not sure that would work 'coz everyone would have to use the Name field spelt exactly as required and I, for example, have two tanks and a bunch of probably "unusual" monitoring points - hence my thinking to use the Sensor ID as the label.

Mind you, it could be an "option", as getting data from multiple, similar, sites would indeed be A Good Thing!

I could show some sort of configuration thingie based on what I find in the XML - so my data is

<SENSOR ROMID="8F000801947A0910">
  <NAME>TS_A1 (25H)</NAME>
  <VALUE>64.50</VALUE>
   <DATE>
    <YEAR>2009</YEAR>
    <MONTH>2</MONTH>
    <DAY>4</DAY>
   </DATE>
   <TIME>
    <HOUR>17</HOUR>
    <MIN>47</MIN>
    <SEC>39</SEC>
   </TIME>

and I could show a Config with

ROMID = 8F000801947A0910
Name = TS_A1 (25H) (That's Thermal Store A, Sensor 1, and the 25H is the original label I gave it from whe it was tested!!)

So then I could have a Pick List that offered "Top of tank" and other choices.

Have to admit I hadn't planned on configuration like this, just that folk would edit the HTML ... but maybe somethat that stores and shows data is called for.

"by default it only writes the SensorID to the XML file"

I'm sure you know where to change it, but just in case not:

Show : Setup : [XML] : "Columns"

I recommend selecting them all - never know when you might need the other data columns!
Logged
Paulh_Boats
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2768



« Reply #13 on: February 04, 2009, 10:27:35 PM »

kristen,

Yep names the same!  Weather stations do the same, there are standard XML formats for weather data.

http://www.insidedhtml.com/xml/weather/WeatherReport.xml
http://www.nws.noaa.gov/xml/

The big bonus for all that effort is exchange of data in a consistent way. Then we can publish and compare hundreds of installations, generate real statistics. Plus there are opportunities for useful programs/speadsheets that work with data from everybody.

For us its easy; 3 tank temps, 2 panel temps, air temp, solar radiation will cover 95% of solar thermal needs.

So <NAME> could be one of:

TANK TOP
TANK MIDDLE
TANK BOTTOM
PANEL IN
PANEL OUT
AIR
SOLAR RADIATION  (100 == 1kW/m2)

(all case insensitive)

For multiple tanks you would have to embed the data with tank tags, e.g.

<TANK="Tank A">
....... temp data
    <NAME>Tank Top</NAME>
    <VALUE>44.31</VALUE>
.........
</TANK>
<TANK="Tank B">
....... temp data
   <NAME>Tank Top</NAME>
   <VALUE>37.5</VALUE>
.........
</TANK>

-Paul
« Last Edit: February 04, 2009, 10:41:06 PM by Paulh_Boats » Logged
wyleu
Guest
« Reply #14 on: February 05, 2009, 09:26:36 AM »

www.pachube are doing this sort of thing throu' eeml, as one eample.

Would it be a good idea if we collected a list of the various XML schema's here so we can have a large involved bun fight over why the one I chose is so much better than the one you chose.

Joking apart we should try doing this, because there's bound to be efforts on this, that we are as yet unaware of, and rom the perspective of the Navitron system, I'd be keen to get on as many systems as we can, and we've written one schema handler so others are nothing more than a bit of quick templating.
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!