<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HomeSignals.com &#187; Data Collection</title>
	<atom:link href="http://www.homesignals.com/category/data-collection/feed" rel="self" type="application/rss+xml" />
	<link>http://www.homesignals.com</link>
	<description>Building an intelligent home</description>
	<lastBuildDate>Sat, 30 Jan 2010 16:09:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Updated database schema for data collection</title>
		<link>http://www.homesignals.com/database/updated-database-schema-for-data-collection.html</link>
		<comments>http://www.homesignals.com/database/updated-database-schema-for-data-collection.html#comments</comments>
		<pubDate>Sat, 30 Jan 2010 16:08:02 +0000</pubDate>
		<dc:creator>Kelly</dc:creator>
				<category><![CDATA[Data Collection]]></category>
		<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.homesignals.com/database/updated-database-schema-for-data-collection.html</guid>
		<description><![CDATA[OK, so I’ve made a few changes to the database schema. I’ve simplified it a little by taking the stateHistory table out and simply pushing those values into the perfHistory table. Eventually, I’ll be adding a dimensional model data warehouse to this project and I’ll split these types of measures up there instead (so I [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so I’ve made a few changes to the <a href="http://www.homesignals.com/database/initial-database-schema-design.html">database schema</a>. I’ve simplified it a little by taking the stateHistory table out and simply pushing those values into the perfHistory table. Eventually, I’ll be adding a dimensional model data warehouse to this project and I’ll split these types of measures up there instead (so I can track duration of state better). Also, I took out the circular reference to the channel and tied it only to the measure itself instead of the device. I can no longer reuse the channel definitions but that wouldn’t be a very common occurrence anyway.</p>
<p>Here’s the updated schema:</p>
<p><a href="http://www.homesignals.com/wp-content/uploads/2010/01/image2.png"><img title="database schema" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="300" alt="database schema" src="http://www.homesignals.com/wp-content/uploads/2010/01/image_thumb1.png" width="344" border="0" /></a> </p>
<p>I also took out the identity field for the history table since it was really unneeded.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.homesignals.com/database/updated-database-schema-for-data-collection.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Initial Database Schema Design</title>
		<link>http://www.homesignals.com/database/initial-database-schema-design.html</link>
		<comments>http://www.homesignals.com/database/initial-database-schema-design.html#comments</comments>
		<pubDate>Fri, 01 Jan 2010 04:24:11 +0000</pubDate>
		<dc:creator>Kelly</dc:creator>
				<category><![CDATA[Data Collection]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[CMDB]]></category>
		<category><![CDATA[Schema]]></category>

		<guid isPermaLink="false">http://www.homesignals.com/database/initial-database-schema-design.html</guid>
		<description><![CDATA[For a while now, I’ve been working on the database design for this project. I wanted to keep it simple and limit the number of tables. In this first design there are a few columns that aren’t normalized, but it helped to limit the table count.
The design is somewhat like a CMDB in that it [...]]]></description>
			<content:encoded><![CDATA[<p>For a while now, I’ve been working on the database design for this project. I wanted to keep it simple and limit the number of tables. In this first design there are a few columns that aren’t normalized, but it helped to limit the table count.</p>
<p>The design is somewhat like a CMDB in that it keeps track of configuration items, their properties, as well as the type of item. Such things as computers, refrigerators, furnaces, and rooms in the house would be considered configuration items.</p>
<p>So the major parts (tables) to the database are as follows:</p>
<h4>Configuration Item </h4>
<p>configItem – Again, stores information on things like computers, freezers, and rooms.</p>
<h4>Location </h4>
<p>location – defines where items such as sensors, config items, and measure devices are physically located.</p>
<h4>Sensor</h4>
<p>sensor – These are specific sensors located in the house, they may be as simple as a thermistor or as complex as an entire script that lives on a computer.</p>
<h4>Measure</h4>
<p>measure – These are specific measures and the values associated with them.</p>
<h4>Measure Device </h4>
<p>measureDevice – This table stores the various physical devices the measures are taken with. For example, the sensor might be a thermistor, but the measure device would be an analog to digital converter that measures the voltage across a voltage divider.</p>
<h4>History </h4>
<p>(perfHistory, stateHistory) – There are two tables here, one for performance values such as temperature, humidity, free physical memory and the other for state values like light on, motion detected, and door closed or open.</p>
<p>&#160;</p>
<p>So far, I’m not including any aggregate tables for data summarization or any user interface tables…I’ll leave those for later.</p>
<p>Here is the database schema:</p>
<p><a href="http://www.homesignals.com/wp-content/uploads/2010/01/image.png"><img title="image" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="300" alt="image" src="http://www.homesignals.com/wp-content/uploads/2010/01/image_thumb.png" width="334" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.homesignals.com/database/initial-database-schema-design.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Distributed or centralized data collection</title>
		<link>http://www.homesignals.com/home-automation/distributed-or-centralized-data-collection.html</link>
		<comments>http://www.homesignals.com/home-automation/distributed-or-centralized-data-collection.html#comments</comments>
		<pubDate>Mon, 14 Dec 2009 01:56:31 +0000</pubDate>
		<dc:creator>Kelly</dc:creator>
				<category><![CDATA[Data Collection]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Service]]></category>

		<guid isPermaLink="false">http://www.homesignals.com/home-automation/distributed-or-centralized-data-collection.html</guid>
		<description><![CDATA[Since this project will collect data from many different sources such as data acquisition boards, pc computers, network systems, and weather station data, I’ve debated on building a centralized collection system or a distributed system. After prototyping a collection database and a windows service that would capture all of the data, I thought it may [...]]]></description>
			<content:encoded><![CDATA[<p>Since this project will collect data from many different sources such as data acquisition boards, pc computers, network systems, and weather station data, I’ve debated on building a centralized collection system or a distributed system. After prototyping a collection database and a windows service that would capture all of the data, I thought it may be better to build a distributed system instead.</p>
<h4>What would a distributed collection system entail?</h4>
<p>Here are some pieces of a distributed for a possible home-based data collection system:</p>
<ul>
<li>Database for some config information as well as data measurement storage and retrieval </li>
<li>Web service for receiving all measurement updates </li>
<li>Windows service for collecting all analog measurement data from the LabJack ADC(s) </li>
<li>Scripts running on each computer be it the Mac OS, Windows XP, or Windows 7 for performance and capacity measurements. </li>
<li>Windows service to collect all data logging for weather, power, power and some event data. </li>
</ul>
<p>Here are some of the pros of both a&#160; centralized system and a distributed system:</p>
<h4>Centralized System Pros:</h4>
<ol>
<li>Simpler maintenance since all measurements are taken from one spot. </li>
<li>Less complexity overall since there are fewer pieces overall. </li>
</ol>
<h4>Distributed System Pros:</h4>
<ol>
<li>Easier to collect data from computers since rights are less of an issue when running locally. </li>
<li>Each piece is far simpler since it’s only responsible for doing a few basic things. </li>
<li>The system can grow as the different types of measurements grow without affecting existing measurements </li>
</ol>
<p>I’ve continued to think about a centralized system since one giant windows service that gets all of it’s configuration data from the database would be far cooler and ultimately be more useable from install to install if I wanted to use this system elsewhere. This is nice, but as I was writing some prototype code for this service, it quickly got fairly complex and I hadn’t taken a single measurement. </p>
<p>I now believe that a distributed system might be easier for a the reasons listed above. I still plan on building a fairly healthy windows service to take the analog to digital measurements done primarily by the LabJack(s), but now can focus entirely on that process in the windows service. One issue that kept cropping up was how to handle delta-only measurements for state on a schedule. Another issue was how not incur a long timeout wait while the service tried to connect to a computer for WMI measurements every time the service ran since the computers would many times be off.</p>
<p>With a distributed system, the computer security and scheduling issues aren’t as much of a problem since the processes would only take measurements when the&#160; computer was running. I would let the web service determine if the measures needed to be recorded or ignored.</p>
<h4>Next Steps</h4>
<ol>
<li>First, I will attempt to prototype a web service built in either PHP or ASP.Net, not sure yet. I’m very familiar with ASP.net web services but would like to try PHP. </li>
<li>Second, I’ll hook the web service up to the MYSQL database I’ve prototyped. As soon as I’ve done this and proved I can record measurements from some simple scripts, I’ll put my code and schema out for anyone that cares to check it out. </li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.homesignals.com/home-automation/distributed-or-centralized-data-collection.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
