Thermd logging

Ok, I have gotten some sensors setup finally using the owfs, then I have the script working on thermd to log to a sql database for now. Will try to figure out the graphs later. I was wondering if anyone else has used thermd and know what the 1250715000 is Logtime means? Is that date/time? I have googled and searched on it, but information is kinda sparse on this.

Thanks,
Ryan Nichols
 
Ryan,

I use thermd as well. I find it very robust and has been rock solid for me over the past 11 months. I run it in the background on one of my Macs that stays on 24/7.

The log time is 'Unix time'. It is the number of seconds since 12:00am January 1st, 1970 GMT.

Have you taken a look at the SQL script at the thermd web site?

If you are using mysql, I know you can use "FROM_UNIXTIME(1250715000)" in your SQL statements to convert it to a mysql timestamp.
 
Ryan,

I use thermd as well. I find it very robust and has been rock solid for me over the past 11 months. I run it in the background on one of my Macs that stays on 24/7.

The log time is 'Unix time'. It is the number of seconds since 12:00am January 1st, 1970 GMT.

Have you taken a look at the SQL script at the thermd web site?

If you are using mysql, I know you can use "FROM_UNIXTIME(1250715000)" in your SQL statements to convert it to a mysql timestamp.
Ah, so just run that script? The documention was very very hard, and as far as Ive gotten is the sql logging, havent figured out the rest.

Thanks,
Ryan Nichols
 
I just leave my data in the log files.

The script appear to be an interactive process and will walk you through the process of importing all of your existing log files. The thermd daemon can log all of your data to a database automatically. This script simply helps you import you old log files.

If you are just setting up thermd you may not need it, but either way it is a good perl example of how to import the log files into a database.
 
I just leave my data in the log files.

The script appear to be an interactive process and will walk you through the process of importing all of your existing log files. The thermd daemon can log all of your data to a database automatically. This script simply helps you import you old log files.

If you are just setting up thermd you may not need it, but either way it is a good perl example of how to import the log files into a database.


Ah, ok.. thanks.. Yea i just have it being logged there, havent figure out the rest of the features of this script yet. Kinda powerful..

Thanks,
Ryan Nichols
 
I just leave my data in the log files.

The script appear to be an interactive process and will walk you through the process of importing all of your existing log files. The thermd daemon can log all of your data to a database automatically. This script simply helps you import you old log files.

If you are just setting up thermd you may not need it, but either way it is a good perl example of how to import the log files into a database.


Ah, ok.. thanks.. Yea i just have it being logged there, havent figure out the rest of the features of this script yet. Kinda powerful..

Thanks,
Ryan Nichols
Jaysonc-

You got any examples of what your conf file looks like? Did you intergrate the graphs to like a web server or something? Im having a heck of a time understanding just exactly what to do with the file. I've figured out the logging part, but not the displaying of data as of yet.

Thanks,
Ryan Nichols
 
While I do have some scripts that generate some custom images, I mainly have thermd generate them on demand.

To do this you simply have your web server (on the same machine as thermd) refer to the thermd application as a CGI script. It will generate a simple HTML interface that allows you to generate graphs on demand.

My Config file (I removed some sensors to shorten the file):

Code:
TimeZone CST
Location "Callaway Residence"
GPSCoordinates "N33.0895580 W96.8734950"
MapURL ""

SMTPHost smtp.mac.com
SMTPUsername username
SMTPPassword password

PIDFile /Users/callaway/thermd/thermd.pid
LogWrite /Users/callaway/thermd/log
LogInterval 1m
Temperature F
RefreshRate 5m
GraphWidth 900
GraphHeight 350
DefaultView Temperatures

<Collector CityStation>
	Type Wunderground
	StationID KTXTHECO3
	StaleAfter 1m
	<Sensor T>
		Name	"City Temperature"
		Type Temperature
	</Sensor>
</Collector>
<Collector Kitchen>
	Type		HA7Net
	IPAddress	192.168.10.32

	<Sensor 130008019EA60210>
		Name	"Freezer Temp"
		Type	Temperature
	</Sensor>
	<Sensor FA000000BC7FC726>
		Name	"Barometric Pressure"
		Type	Barometer
		Slope	0.6748
		Intercept	26.6505
		# AdjustBy  -0.1
	</Sensor>
</Collector>
<Collector Upstairs>
	Type		HA7Net
	IPAddress	192.168.10.33

	<Sensor 9800000007170420>
		Name	"Wind Direction"
		Type	Direction
		AdjustBy 90
	</Sensor>
	<Sensor 3600000000DCFB1D.s>
		Name	"Wind Speed"
		Type	Speed
	</Sensor>
	<Sensor 3600000000DCFB1D.g>
		Name	"Wind Gust"
		Type	Gust
	</Sensor>
</Collector>
<Collector ExtraStuff>
	Type Derived
	<Sensor DewPoint>
		Type DewPoint
		Temperature 05000801041BAC10@Garage
		Humidity 6A0000006147E726.h@Garage
	</Sensor>
	<Sensor WindChill>
		Type WindChill
		Temperature 05000801041BAC10@Garage
		Speed 3600000000DCFB1D.s@Upstairs
	</Sensor>
	<Sensor HeatIndex>
		Type HeatIndex
		Temperature 05000801041BAC10@Garage
		Humidity 6A0000006147E726.h@Garage
	</Sensor>
</Collector>
<View Attic>
	<Show+ CD0008019E9C6D10@Upstairs> # House Attic
		GraphColor green
	</Show>
	<Show+ 0A00080194836710@Garage>	# Garage Attic
		GraphColor red
	</Show>
	<Show+ 05000801041BAC10@Garage>	# Outside Garage (East)
		GraphColor black
	</Show>
	Show 740008019EAD2A10@Kitchen	# Inside Temp (Kitchen)
</View>
<View Heat Gain>
	Type Graph
	<Show+ 05000801041BAC10@Garage>	# Outside Garage (East)
		LineType dotted
		GraphColor black
	</Show>
	Show 0A00080194836710@Garage	# Garage Attic
	Show CD0008019E9C6D10@Upstairs	# House Attic
	Show 5F0008019ECDC410@Upstairs	# Equip CLoset Temp
	Show CD0008019497CC10@Garage	# Garage 
</View>
<View Temperatures>
	Type Graph
	Show 740008019EAD2A10@Kitchen	# Inside Temp (Kitchen)
	Show 05000801041BAC10@Garage	# Outside Garage (East)
	Show HeatIndex@ExtraStuff
</View>
<View Fridge>
	Type Graph
	Show E20008019EDBE110@Kitchen	# Fridge Temp
	Show 130008019EA60210@Kitchen	# Freezer Temp
</View>
<View Pressure>
	Type Graph
	<Show+ B@CityStation>
		LineType dotted
		GraphColor black
	</Show>
	Show FA000000BC7FC726@Kitchen	# Behind the Refrigerator
</View>
<View Humidity>
	Type Graph
	Show 6A0000006147E726.h@Garage	# Outside Garage (East)
	<Show+ H@CityStation>		# City Station
		LineType dotted
		GraphColor black
	</Show>
</View>
<View Sunlight>
	Type Graph
	<Show+ 6A0000006147E726.l@Garage>	# Outside Garage (East)
		LineType dotted
		GraphColor black
	</Show>
</View>
<View Weather>
	Type Wunderground
	StationID [your Wunderground ID]
	Password password
	Show 05000801041BAC10@Garage	# Temp - Outside Garage (East)
	Show 6A0000006147E726.h@Garage	# Humidity - Outside Garage (East)
	Show FA000000BC7FC726@Kitchen	# Barometer - Behind the Refrigerator
	Show 3600000000DCFB1D.g@Upstairs # Wind Gust
	Show 3600000000DCFB1D.s@Upstairs # Wind Speed
	Show 9800000007170420@Upstairs	 # Wind Direction
	Show DewPoint@ExtraStuff
</View>
<View Wind>
	Type Graph
	Show 3600000000DCFB1D.g@Upstairs
	Show 3600000000DCFB1D.s@Upstairs
</View>
 
Thank you..

Ok, got that part figured out, lol that was a nitemare. Ok.. now the thing wont display the temps correctly.. so back to the drawing board on that one.. it records them correctly in the script to the database, but only displays them correctly if I got it set to metric.



THanks,
Ryan Nichols
 
There is a system wide default temperature scale setting and each type of device also has a temperature scale setting. I know I had a similar issues as the HA7Net devices I use could only report temperatures in Celsius, etc..

Do some additional scanning of the documentation and do not hesitate to email Dan ( the developer) with questions. I found him quite responsive before when I had issues.
 
Yes, It is pretty easy. The graphing capability uses the same View structure for the web and the graphs. I have a few View sections in the sample configuration I posted earlier in this thread.

To generate the graph you use a command similar to the following.

./thermd.pl -graph -config thermd.cfg -from -12h -to now -width 700 -height 1500 -View AC_Leakage > AC_Leakage.jpg


For easy comparison and for others that may find this thread here is the code to start the thermd server (in the background). The 'rm' commands are technically no needed, but I come from a background where I do it anyway.

./thermd.pl -daemon -config thermd.cfg


I wanted to post my bash scripts but the forum filters did not let me. If you want them, PM me and I will email them to you.
 
Back
Top