<?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>Danny Tsang &#187; energy</title> <atom:link href="http://www.dannytsang.co.uk/index.php/tag/energy/feed/" rel="self" type="application/rss+xml" /><link>http://www.dannytsang.co.uk</link> <description>Eats and spits code by day</description> <lastBuildDate>Mon, 06 Feb 2012 00:01:00 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Windows 7 Monitor Power Test</title><link>http://www.dannytsang.co.uk/index.php/windows-7-monitor-power-test/</link> <comments>http://www.dannytsang.co.uk/index.php/windows-7-monitor-power-test/#comments</comments> <pubDate>Wed, 27 Jan 2010 10:28:13 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Windows]]></category> <category><![CDATA[cmd]]></category> <category><![CDATA[energy]]></category> <category><![CDATA[Microsoft]]></category> <category><![CDATA[microsoft windows]]></category> <category><![CDATA[power]]></category> <category><![CDATA[power test]]></category> <category><![CDATA[powercfg]]></category> <category><![CDATA[sleep mode]]></category> <category><![CDATA[Tekzilla]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2549</guid> <description><![CDATA[There is a report generator in Microsoft Windows 7 which can help you track down what is being used in terms of power. The report tells you what is stopping the computer going into sleep mode (if sleep mode is &#8230; <a
href="http://www.dannytsang.co.uk/index.php/windows-7-monitor-power-test/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/error-you-are-using-a-high-performance-setting/' rel='bookmark' title='Error: You Are Using A High Performance Setting'>Error: You Are Using A High Performance Setting</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/windows-7-monitor-calibration/' rel='bookmark' title='Windows 7 Monitor Calibration'>Windows 7 Monitor Calibration</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/starting-a-program-from-command-line-to-x/' rel='bookmark' title='Starting A Program From Command Line to X'>Starting A Program From Command Line to X</a></li></ol>]]></description> <content:encoded><![CDATA[<p>There is a report generator in <a
href="http://www.dannytsang.co.uk/index.php/tag/microsoft/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Microsoft">Microsoft</a> <a
href="http://www.dannytsang.co.uk/index.php/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">Windows</a> 7 which can help you track down what is being used in terms of <a
href="http://www.dannytsang.co.uk/index.php/tag/power/" class="st_tag internal_tag" rel="tag" title="Posts tagged with power">power</a>. The report tells you what is stopping the computer going into <a
href="http://www.dannytsang.co.uk/index.php/tag/sleep-mode/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sleep mode">sleep mode</a> (if <a
href="http://www.dannytsang.co.uk/index.php/tag/sleep-mode/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sleep mode">sleep mode</a> is turned on) as well as devices that do not &#8220;suspend&#8221;.</p><div
align="center"><a
href="http://www.dannytsang.co.uk/wp-content/uploads/2010/01/commandline.png" rel="lightbox[2549]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2010/01/commandline-150x150.png" alt="" title="commandline" width="150" height="150" class="aligncenter size-thumbnail wp-image-2550" /></a></div><p>Go to the command line as an administrator. This can be achived by going to <strong>Start Menu</strong> and typing <strong><a
href="http://www.dannytsang.co.uk/index.php/tag/cmd/" class="st_tag internal_tag" rel="tag" title="Posts tagged with cmd">cmd</a></strong> in the search bar. Search for <strong>cmd.exe</strong> under Programs, hold <strong>Shift</strong> key and right click on cmd.exe. At this point you can let go of the shift key and select <strong>Run as administrator</strong>.</p><p>A dialogue box may warn you when starting the the program but OK it to start the program. Type:<br
/> <code><a
href="http://www.dannytsang.co.uk/index.php/tag/powercfg/" class="st_tag internal_tag" rel="tag" title="Posts tagged with powercfg">powercfg</a> -<a
href="http://www.dannytsang.co.uk/index.php/tag/energy/" class="st_tag internal_tag" rel="tag" title="Posts tagged with energy">energy</a></code><br
/> and press enter to start it. The program will <a
href="http://www.dannytsang.co.uk/index.php/tag/monitor/" class="st_tag internal_tag" rel="tag" title="Posts tagged with monitor">monitor</a> your computer for 1 minute. In this time do what you wish.</p><div
align="center"><a
href="http://www.dannytsang.co.uk/wp-content/uploads/2010/01/powercfg.png" rel="lightbox[2549]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2010/01/powercfg-150x150.png" alt="" title="powercfg" width="150" height="150" class="aligncenter size-thumbnail wp-image-2551" /></a></div><p>Once it has finished it will print out the location of the report which is in a HTML (web page) format. You may need to copy to a suitable folder for your browser to open it.</p> <a
href='http://www.dannytsang.co.uk/index.php/windows-7-monitor-power-test/commandline/' title='commandline'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2010/01/commandline-150x150.png" class="attachment-thumbnail" alt="commandline" title="commandline" /></a> <a
href='http://www.dannytsang.co.uk/index.php/windows-7-monitor-power-test/powercfg/' title='powercfg'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2010/01/powercfg-150x150.png" class="attachment-thumbnail" alt="powercfg" title="powercfg" /></a><p><a
href="http://revision3.com/tzdaily/2010-01-15powerefficiency" target="_blank">Tekzilla Daily Tip #511</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/error-you-are-using-a-high-performance-setting/' rel='bookmark' title='Error: You Are Using A High Performance Setting'>Error: You Are Using A High Performance Setting</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/windows-7-monitor-calibration/' rel='bookmark' title='Windows 7 Monitor Calibration'>Windows 7 Monitor Calibration</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/starting-a-program-from-command-line-to-x/' rel='bookmark' title='Starting A Program From Command Line to X'>Starting A Program From Command Line to X</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/windows-7-monitor-power-test/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>energy@home Project Update v0.4a</title><link>http://www.dannytsang.co.uk/index.php/energyhome-project-update/</link> <comments>http://www.dannytsang.co.uk/index.php/energyhome-project-update/#comments</comments> <pubDate>Sun, 06 Dec 2009 00:43:01 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[energy@home]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[acquisition]]></category> <category><![CDATA[acquisition techniques]]></category> <category><![CDATA[Chris Noon]]></category> <category><![CDATA[data acquisition]]></category> <category><![CDATA[energy]]></category> <category><![CDATA[energyathome]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[Triggers]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2455</guid> <description><![CDATA[It&#8217;s been a while since I have mentioned the project energy@home I have been working on so I thought I&#8217;d share the latest picture of what it looks like. I will soon be tagging and release a new version with &#8230; <a
href="http://www.dannytsang.co.uk/index.php/energyhome-project-update/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-6-5-released/' rel='bookmark' title='Energy@Home 0.6.5 Released'>Energy@Home 0.6.5 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-4/' rel='bookmark' title='energy@home 0.4'>energy@home 0.4</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-twitter-integration/' rel='bookmark' title='energy@home Twitter Integration'>energy@home Twitter Integration</a></li></ol>]]></description> <content:encoded><![CDATA[<p>It&#8217;s been a while since I have mentioned the <a
href="http://www.dannytsang.co.uk/index.php/tag/project/" class="st_tag internal_tag" rel="tag" title="Posts tagged with project">project</a> <a
href="http://code.google.com/p/energyathome/" target="_blank">energy@home</a> I have been working on so I thought I&#8217;d share the latest picture of what it looks like.</p><div
align="center"><a
href="http://www.dannytsang.co.uk/wp-content/uploads/2009/12/Energyathome.jpg" rel="lightbox[2455]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/12/Energyathome-150x150.jpg" alt="energy@home 0.4a" title="energy@home 0.4a" width="150" height="150" class="aligncenter size-thumbnail wp-image-2456" /></a></div><p>I will soon be tagging and release a new version with the major difference form 0.3 is <a
href="http://www.dannytsang.co.uk/index.php/tag/triggers/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Triggers">triggers</a>. <a
href="http://www.dannytsang.co.uk/index.php/tag/triggers/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Triggers">Triggers</a> allows data only to be captured if certain conditions are met or exceeded. This saves saving data which has not changed much.</p><p>Next step is to get pre-triggering working where if a trigger condition is met then the data leading up to the trigger event gets logged and certain amount of data is stored after the trigger. This allows a user to view data leading up to the event, the event itself which caused the trigger and the leading data after the event.</p><p>Improvements to the UI is needed to. I would like the graph settings to be more customizable and get the data table to work so users can inspect the raw values for themselves.</p><p>Special thanks goes to <a
href="http://www.dannytsang.co.uk/index.php/tag/chris-noon/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Chris Noon">Chris Noon</a> for data <a
href="http://www.dannytsang.co.uk/index.php/tag/acquisition-techniques/" class="st_tag internal_tag" rel="tag" title="Posts tagged with acquisition techniques">acquisition techniques</a> which lead me to using triggers.</p><p><a
href="http://code.google.com/p/energyathome/" target="_blank">energy@home project page</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-6-5-released/' rel='bookmark' title='Energy@Home 0.6.5 Released'>Energy@Home 0.6.5 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-4/' rel='bookmark' title='energy@home 0.4'>energy@home 0.4</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-twitter-integration/' rel='bookmark' title='energy@home Twitter Integration'>energy@home Twitter Integration</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/energyhome-project-update/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>energy@home Mention On GNC#518</title><link>http://www.dannytsang.co.uk/index.php/energyhome-mention-on-gnc518/</link> <comments>http://www.dannytsang.co.uk/index.php/energyhome-mention-on-gnc518/#comments</comments> <pubDate>Sat, 10 Oct 2009 22:14:57 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[energy@home]]></category> <category><![CDATA[Podcast Shoutout]]></category> <category><![CDATA[energy]]></category> <category><![CDATA[Geek]]></category> <category><![CDATA[geek news]]></category> <category><![CDATA[GNC]]></category> <category><![CDATA[home]]></category> <category><![CDATA[podcast]]></category> <category><![CDATA[project]]></category> <category><![CDATA[Todd]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2341</guid> <description><![CDATA[I sent in an Email to Todd on the Geek News Central Podcast and he kindly linked my project in his show notes which can be found here. You can hear the recording on episode 518 around 1 hour 13 &#8230; <a
href="http://www.dannytsang.co.uk/index.php/energyhome-mention-on-gnc518/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/im-on-southern-fm-video/' rel='bookmark' title='I&#8217;m On Southern FM Video!'>I&#8217;m On Southern FM Video!</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/gnc-361/' rel='bookmark' title='GNC #361'>GNC #361</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/first-mike-tech-show-podcast-shoutout/' rel='bookmark' title='First Mike Tech Show Podcast Shoutout'>First Mike Tech Show Podcast Shoutout</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I sent in an Email to <a
href="http://www.dannytsang.co.uk/index.php/tag/todd/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Todd">Todd</a> on the <a
href="http://www.geeknewscentral.com/" target="_blank">Geek News Central</a> <a
href="http://www.dannytsang.co.uk/index.php/tag/podcast/" class="st_tag internal_tag" rel="tag" title="Posts tagged with podcast">Podcast</a> and he kindly linked my <a
href="http://www.dannytsang.co.uk/index.php/tag/project/" class="st_tag internal_tag" rel="tag" title="Posts tagged with project">project</a> in his show notes which can be found <a
href="http://www.geeknewscentral.com/2009/10/08/gnc-2009-10-08-518-back-in-honolulu-next-show/" target="_blank">here</a>. You can hear the recording on episode 518 around 1 hour 13 minutes in.</p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/im-on-southern-fm-video/' rel='bookmark' title='I&#8217;m On Southern FM Video!'>I&#8217;m On Southern FM Video!</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/gnc-361/' rel='bookmark' title='GNC #361'>GNC #361</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/first-mike-tech-show-podcast-shoutout/' rel='bookmark' title='First Mike Tech Show Podcast Shoutout'>First Mike Tech Show Podcast Shoutout</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/energyhome-mention-on-gnc518/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Energy@Home Released On Google Code</title><link>http://www.dannytsang.co.uk/index.php/energyhome-released-on-google-code/</link> <comments>http://www.dannytsang.co.uk/index.php/energyhome-released-on-google-code/#comments</comments> <pubDate>Tue, 08 Sep 2009 21:40:16 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[energy@home]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Code]]></category> <category><![CDATA[energy]]></category> <category><![CDATA[energyathome]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[GPL]]></category> <category><![CDATA[gpl license]]></category> <category><![CDATA[monitor]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2258</guid> <description><![CDATA[I have formally uploaded and started using Google Code to host my energy monitor I&#8217;m using / developing. It has been released under the GPL license so feel free to take a look at my messy code and leave some &#8230; <a
href="http://www.dannytsang.co.uk/index.php/energyhome-released-on-google-code/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-5-2-released/' rel='bookmark' title='energy@home 0.5.2 Released'>energy@home 0.5.2 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-7-released/' rel='bookmark' title='Energy@Home 0.7 Released'>Energy@Home 0.7 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-5-released/' rel='bookmark' title='energy@home 0.5 Released'>energy@home 0.5 Released</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I have formally uploaded and started using <a
href="http://www.dannytsang.co.uk/index.php/tag/google/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a> <a
href="http://www.dannytsang.co.uk/index.php/tag/code/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Code">Code</a> to host my <a
href="http://www.dannytsang.co.uk/index.php/tag/energy/" class="st_tag internal_tag" rel="tag" title="Posts tagged with energy">energy</a> <a
href="http://www.dannytsang.co.uk/index.php/tag/monitor/" class="st_tag internal_tag" rel="tag" title="Posts tagged with monitor">monitor</a> I&#8217;m using / developing.</p><p>It has been released under the <a
href="http://www.dannytsang.co.uk/index.php/tag/gpl/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GPL">GPL</a> license so feel free to take a look at my messy code and leave some constructive criticism.</p><p><a
href="http://code.google.com/p/energyathome/">http://code.google.com/p/energyathome/</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-5-2-released/' rel='bookmark' title='energy@home 0.5.2 Released'>energy@home 0.5.2 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-7-released/' rel='bookmark' title='Energy@Home 0.7 Released'>Energy@Home 0.7 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-5-released/' rel='bookmark' title='energy@home 0.5 Released'>energy@home 0.5 Released</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/energyhome-released-on-google-code/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Recording CurrentCost Data &amp; Viewing It On The Web</title><link>http://www.dannytsang.co.uk/index.php/recording-currentcost-data-viewing-it-on-the-web/</link> <comments>http://www.dannytsang.co.uk/index.php/recording-currentcost-data-viewing-it-on-the-web/#comments</comments> <pubDate>Sun, 16 Aug 2009 17:20:07 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Website]]></category> <category><![CDATA[64 bit windows]]></category> <category><![CDATA[ajax]]></category> <category><![CDATA[apache web server]]></category> <category><![CDATA[cc128]]></category> <category><![CDATA[client server architecture]]></category> <category><![CDATA[CurrentCost]]></category> <category><![CDATA[energy]]></category> <category><![CDATA[flot]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[XML]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2245</guid> <description><![CDATA[Overview I have (finally) got my project to a working stage so I thought I&#8217;d write a bit about it. After buying a CurrentCost CC128 device I was not happy with the software on the Internet for extracting the data. &#8230; <a
href="http://www.dannytsang.co.uk/index.php/recording-currentcost-data-viewing-it-on-the-web/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-5-released/' rel='bookmark' title='energy@home 0.5 Released'>energy@home 0.5 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-twitter-integration/' rel='bookmark' title='energy@home Twitter Integration'>energy@home Twitter Integration</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/bash-sleep-vs-wait/' rel='bookmark' title='Bash Sleep vs. Wait'>Bash Sleep vs. Wait</a></li></ol>]]></description> <content:encoded><![CDATA[<h3>Overview</h3><p>I have (finally) got my <a
href="http://www.dannytsang.co.uk/index.php/tag/project/" class="st_tag internal_tag" rel="tag" title="Posts tagged with project">project</a> to a working stage so I thought I&#8217;d write a bit about it. After buying a <a
href="http://www.dannytsang.co.uk/index.php/tag/currentcost/" class="st_tag internal_tag" rel="tag" title="Posts tagged with CurrentCost">CurrentCost</a> <a
href="http://www.dannytsang.co.uk/index.php/tag/cc128/" class="st_tag internal_tag" rel="tag" title="Posts tagged with cc128">CC128</a> device I was not happy with the software on the Internet for extracting the data. The FDI chip used on the USB cable to the device did not support <a
href="http://www.dannytsang.co.uk/index.php/tag/64-bit-windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with 64 bit windows">64 bit Windows</a> 7 so it crashed on me and the Linux alternatives were basic and look fairly complicated to set up.</p><h3>Planning</h3><div
align="center"><a
href="http://www.dannytsang.co.uk/wp-content/uploads/2009/08/CurrentCost.png" rel="lightbox[2245]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/08/CurrentCost-150x150.png" alt="Architecture Diagram" title="Architecture Diagram" width="150" height="150" class="aligncenter size-thumbnail wp-image-2246" /></a></div><p>I want the data to be accessed via a web page. I decided to use <a
href="http://www.dannytsang.co.uk/index.php/tag/javascript/" class="st_tag internal_tag" rel="tag" title="Posts tagged with javascript">JavaScript</a> to implement the graphing and <a
href="http://www.dannytsang.co.uk/index.php/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">AJAX</a> to do a client &#8211; server architecture. Also it&#8217;s the most popular way of generating dynamic web page which I hope the graph would be done in near real time.</p><p>I have not decided what technology for the server side script which would handle the AJAX requests but I ended up using PHP. The PHP script retrieves data from the database, formats it and sends it back to the web page to be graphed.</p><p>I have a <a
href="http://www.dannytsang.co.uk/index.php/tag/lamp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with lamp">LAMP</a> stack configuration so I&#8217;m using an <a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a> web server with a MySQL database. All the device data will be stored in the database by a another script which I wanted to use <a
href="http://www.dannytsang.co.uk/index.php/tag/python/" class="st_tag internal_tag" rel="tag" title="Posts tagged with python">Python</a> for.</p><p>The Python script listened for the XML strings sent via a USB cable from the CurrentCost device. The script would then extract the data from XML and store it into the database.</p><p>From the start I wanted my software to run on a Linux based system because I want a server at <a
href="http://www.dannytsang.co.uk/index.php/tag/home/" class="st_tag internal_tag" rel="tag" title="Posts tagged with home">home</a> running on Linux 24/7. This would allow my other devices to be freely turn it self off etc. Also most of other services were on Linux.</p><h3>Implementation</h3><p>The FDI chip from the USB cable takes care of the USB to Serial conversion which makes reading data a lot easier but also it uses an up to date connection. Using a terminal and example XML documents found on the web I could see what the XML format looks like. All data is sent every 6 seconds over USB to a serial port. Ever 1 minutes past the hour e.g 15:01 historical data is sent over the cable or by pressing a button on the device.</p><p>Once received the Python script parses the XML, extracts data it needs and inserts it into the database.</p><p>When a user views the web page, an asynchronous request is sent to the PHP server side script, gets the data from the database and returns it to the web page. The web page then formats it correctly to be parsed into a JavaScript Graph. The web page is currently set to refresh every 10 seconds but this may change depending on how the server holds up.</p><div
align="center"><a
href="http://www.dannytsang.co.uk/wp-content/uploads/2009/08/graph.jpg" rel="lightbox[2245]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/08/graph-150x150.jpg" alt="Graph" title="Graph" width="150" height="150" class="aligncenter size-thumbnail wp-image-2247" /></a></div><h3>Problems</h3><p>At the moment there are loads of problems and improvements that can be done. This is just a brief post of what I have so far. The Python script can&#8217;t handle the historical data and falls over so it won&#8217;t run longer than 1 hour.</p><p>The AJAX response returns a formatted string. I want to convert this to an XML response so it&#8217;s easier / cleaner to retrieve multiple data.</p><p>I want to limit the data by date / time because the graph will look tiny / there would be a lot of information being sent back and forth every 10 seconds refresh.</p><p>I&#8217;m not happy with the scaling of the graphs. It&#8217;s using dual axis for energy and temperature.</p><p>Some sort of statistics besides a graph like total engery consumed for x days/months/years, etc.</p><p>Eventually the Python script will become a Linux Daemon but this is only once it&#8217;s stable enough.</p><p>Twitter Integration would be nice. I would use the Python script to post a tweet every hour with a simple message. The profile will be protected so that only I can see what it says.</p><h3>Summary</h3><p>Still got ways to go but it&#8217;s getting there. It&#8217;s nice to finally see something from my days of work. Especially if I have never used Python or PHP from scratch before.</p><p><a
href="http://www.dannytsang.co.uk/current-cost-cc128-envi-review/"><br
/> CurrentCost previous post</a></p><p><a
href="http://www.currentcost.com" target="_blank">CurrentCost Website</a></p><p><a
href="http://www.currentcost.com/cc128/xml.htm" target="_blank">CurrentCost XML Specification</a></p><p><a
href="http://dalelane.co.uk/blog/?p=456" target="_blank">Dale Lane&#8217;s Blog on how to get data from a CurrentCost device</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-5-released/' rel='bookmark' title='energy@home 0.5 Released'>energy@home 0.5 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-twitter-integration/' rel='bookmark' title='energy@home Twitter Integration'>energy@home Twitter Integration</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/bash-sleep-vs-wait/' rel='bookmark' title='Bash Sleep vs. Wait'>Bash Sleep vs. Wait</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/recording-currentcost-data-viewing-it-on-the-web/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Current Cost CC128 Envi Review</title><link>http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/</link> <comments>http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/#comments</comments> <pubDate>Wed, 08 Jul 2009 23:01:13 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Hardware]]></category> <category><![CDATA[Houseware]]></category> <category><![CDATA[cc128]]></category> <category><![CDATA[current cost]]></category> <category><![CDATA[electricity]]></category> <category><![CDATA[energy]]></category> <category><![CDATA[envi]]></category> <category><![CDATA[green]]></category> <category><![CDATA[home automation]]></category> <category><![CDATA[kilo watts]]></category> <category><![CDATA[sensors]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2160</guid> <description><![CDATA[Overview A home automation article popped up in my RSS feed and lead me to this cool device. It&#8217;s a combination of a display and sensor which allows you to monitor and track the amount of electricity is being used &#8230; <a
href="http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/new-computer-case-at-a-cost/' rel='bookmark' title='New Computer Case&#8230; At A Cost'>New Computer Case&#8230; At A Cost</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/mythtv-capture-card-requirements-with-multiple-front-ends/' rel='bookmark' title='MythTV Capture Card Requirements With Multiple Front Ends'>MythTV Capture Card Requirements With Multiple Front Ends</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/3-mifi-huawei-e585-mini-review/' rel='bookmark' title='3 Mifi (Huawei E585) Mini Review'>3 Mifi (Huawei E585) Mini Review</a></li></ol>]]></description> <content:encoded><![CDATA[<div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Box-150x150.jpg" alt="Box" title="Box" width="150" height="150" class="aligncenter size-thumbnail wp-image-2164" /></div><h3>Overview</h3><p>A <a
href="http://www.dannytsang.co.uk/index.php/tag/home/" class="st_tag internal_tag" rel="tag" title="Posts tagged with home">home</a> automation article popped up in my RSS feed and lead me to this cool device. It&#8217;s a combination of a display and sensor which allows you to monitor and track the amount of <a
href="http://www.dannytsang.co.uk/index.php/tag/electricity/" class="st_tag internal_tag" rel="tag" title="Posts tagged with electricity">electricity</a> is being used to the property. The manufacture, <a
href="http://www.currentcost.com" target="_blank">Current Cost</a> makes and sells these devices themselves as well as selling them as a white label item to be re-branded.</p><p>There are 2 versions of the <a
href="http://www.currentcost.com" target="_blank">Current Cost</a> device. One named the classic was their first incarnation and the current <a
href="http://www.dannytsang.co.uk/index.php/tag/cc128/" class="st_tag internal_tag" rel="tag" title="Posts tagged with cc128">CC128</a> or &#8220;Envi&#8221; is their newest version.</p><div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Contents-150x150.jpg" alt="Contents" title="Contents" width="150" height="150" class="aligncenter size-thumbnail wp-image-2165" /></div><h3>Sensor</h3><p>Unlike traditional <a
href="http://www.dannytsang.co.uk/index.php/tag/sensors/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sensors">sensors</a> this one does not need to be wired up. I&#8217;m not sure how it knows how much electricity is being consumed but it as far as I&#8217;m aware it works. The sensor and display uses wireless technology to pair the two together. The sensor has an over sized clip which goes AROUND the fat electric cable going into the home. The sensor sends data back every 6 seconds to the display unit.</p><h3>Display</h3><div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Initial-Display-150x150.jpg" alt="Initial Display" title="Initial Display" width="150" height="150" class="aligncenter size-thumbnail wp-image-2166" /></div><p>The display has a large LCD display using pigments to display the number and static letters which do not change (only turned on and off to hide and unhide the text). It&#8217;s nice and large characters makes it easy to read. Similar to a mobile phone it has a signal bar showing the strength between the sensor and the display, a status icon to show it&#8217;s picking up electricity from the sensor and the <a
href="http://www.currentcost.com" target="_blank">Current Cost</a> Logo.</p><p>The next line down shows the current electricity being used in Watts and <a
href="http://www.dannytsang.co.uk/index.php/tag/kilo-watts/" class="st_tag internal_tag" rel="tag" title="Posts tagged with kilo watts">Kilo Watts</a>. This figure updates every 6 seconds. The line below is the cost based on the current usage. This can be set to standard rate or off and on peak times. It currently does not allow more than 1 off and 1 peak time configuration. From an email to <a
href="http://www.currentcost.com" target="_blank">Current Cost</a>, the cost per day / month should only be used as an guideline as oppose to an absolute value that will appear on the bill. The currency can be changed from £ (pounds) to € (Euros).</p><p>The middle row shows a graph of usage in bars. This is broken down by night, day and evening times. The value shown to the right is the number of Kilo Watt Hours usage for the last 1, 7 and 30 days. This rotates every 10 seconds.</p><p>The last line shows the current time and the temperature. The temperature sensor is built into the display and not the electricity sensor.</p><div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Back-150x150.jpg" alt="Back" title="Back" width="150" height="150" class="aligncenter size-thumbnail wp-image-2162" /></div><p>The display stores historical data and there is a RJ45 at the back which is used to connect to the PC. The RJ45 to USB cable is sold separately.</p><h3>Usage</h3><div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Sensor-Deployed-150x150.jpg" alt="Sensor Deployed" title="Sensor Deployed" width="150" height="150" class="aligncenter size-thumbnail wp-image-2171" /></div><p>One of the first thing to do is set the time up. This will be used to calculate the graph. Then pairing the sensor to the display. The display can support up to 3 sensors or 9 individual application monitors which are not currently available yet. Once paired the sensor can be put into the cabinet. In my case there were several thick cables and it was the second try that I got the correct one.</p><h3>Data Capture</h3><p>The RJ45 to USB cable uses a USB to serial type similar to one used for Arduinos. It&#8217;s a simple way of using a USB connector for a serial device. The problem I had with the USB to serial drivers kept BSOD&#8217;ing my Windows 7 64 bit. Whilst the website says they are Vista compatible I do not think they are 64 bit compatible. After a reboot I quickly un-installed it but not before using the <a
href="http://code.google.com/p/currentcostgui/" target="_blank">CurrentCost GUI</a> software.</p><p>It wasn&#8217;t bad for the brief few minutes I got to use it. The look was very raw but did the job. The live graph worked and I dared it to download the historical data which was were it crashed my computer.</p><p>I have it plugged into the Linux computer, installed &#8220;Serial port terminal&#8221; and managed to get the <a
href="http://www.dannytsang.co.uk/index.php/tag/xml/" class="st_tag internal_tag" rel="tag" title="Posts tagged with XML">XML</a> that is sent down the cable. I intend to write a program to capture and log these messages but that&#8217;s for a future topic if I can get it working.</p><h3>Summary</h3><p>I am concerned that there is a 7 Year shelf/battery life on the product but 7 years is a long time away. Hopefully by then there would be newer better versions out. It is a very useful indication of how much electricity things around the home uses. Using the statistics to determine which electricity tariff is the best is a good idea as well as seeing the effect of actually turn things off. Overall a very good product but I would like to see the data cable to be included with the device.</p><p><a
href="http://www.currentcost.com" target="_blank"><a
href="http://www.currentcost.com" target="_blank">Current Cost</a></a></p><p><a
href="http://www.currentcost.com/product-cc128.html" target="_blank">CC128 Envi</a></p><p><a
href="http://code.google.com/p/currentcostgui/" target="_blank">CurrentCost GUI</a></p> <a
href='http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/back-3/' title='Back'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Back-150x150.jpg" class="attachment-thumbnail" alt="Back" title="Back" /></a> <a
href='http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/box-opened-3/' title='Box Opened'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Box-Opened-150x150.jpg" class="attachment-thumbnail" alt="Box Opened" title="Box Opened" /></a> <a
href='http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/box-4/' title='Box'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Box-150x150.jpg" class="attachment-thumbnail" alt="Box" title="Box" /></a> <a
href='http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/contents-2/' title='Contents'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Contents-150x150.jpg" class="attachment-thumbnail" alt="Contents" title="Contents" /></a> <a
href='http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/initial-display/' title='Initial Display'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Initial-Display-150x150.jpg" class="attachment-thumbnail" alt="Initial Display" title="Initial Display" /></a> <a
href='http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/paired-display/' title='Paired Display'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Paired-Display-150x150.jpg" class="attachment-thumbnail" alt="Paired Display" title="Paired Display" /></a> <a
href='http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/sensor-deployed/' title='Sensor Deployed'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Sensor-Deployed-150x150.jpg" class="attachment-thumbnail" alt="Sensor Deployed" title="Sensor Deployed" /></a><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/new-computer-case-at-a-cost/' rel='bookmark' title='New Computer Case&#8230; At A Cost'>New Computer Case&#8230; At A Cost</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/mythtv-capture-card-requirements-with-multiple-front-ends/' rel='bookmark' title='MythTV Capture Card Requirements With Multiple Front Ends'>MythTV Capture Card Requirements With Multiple Front Ends</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/3-mifi-huawei-e585-mini-review/' rel='bookmark' title='3 Mifi (Huawei E585) Mini Review'>3 Mifi (Huawei E585) Mini Review</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/current-cost-cc128-envi-review/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Tesco&#8217;s 15W Mini Spiral Mini Review</title><link>http://www.dannytsang.co.uk/index.php/tescos-15w-mini-spiral-mini-review/</link> <comments>http://www.dannytsang.co.uk/index.php/tescos-15w-mini-spiral-mini-review/#comments</comments> <pubDate>Thu, 23 Oct 2008 13:58:43 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Houseware]]></category> <category><![CDATA[Review]]></category> <category><![CDATA[bulb]]></category> <category><![CDATA[energy]]></category> <category><![CDATA[energy saving bulbs]]></category> <category><![CDATA[lamp]]></category> <category><![CDATA[screw cap]]></category> <category><![CDATA[Spiral]]></category> <category><![CDATA[Tesco]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=1397</guid> <description><![CDATA[Overview I recently got a cheap lamp which was falling apart but it still worked. We needed one for the flat because the living room was on the North? side of the building and therefore didn&#8217;t get a lot of &#8230; <a
href="http://www.dannytsang.co.uk/index.php/tescos-15w-mini-spiral-mini-review/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/blown-bulb/' rel='bookmark' title='Blown Bulb'>Blown Bulb</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/200w-500w-is-not-a-good-idea/' rel='bookmark' title='200W &gt; 500W Is Not A Good Idea'>200W > 500W Is Not A Good Idea</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/electronics-honda/' rel='bookmark' title='Electronics &gt; Honda'>Electronics > Honda</a></li></ol>]]></description> <content:encoded><![CDATA[<h3>Overview</h3><p>I recently got a cheap <a
href="http://www.dannytsang.co.uk/index.php/tag/lamp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with lamp">lamp</a> which was falling apart but it still worked. We needed one for the flat because the living room was on the North? side of the building and therefore didn&#8217;t get a lot of direct sun through the window. This means the light was switched on a lot earlier than a room with direct sunlight. The <a
href="http://www.dannytsang.co.uk/index.php/tag/lamp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with lamp">lamp</a> had a rating of 100 watts max and used the <a
href="http://www.dannytsang.co.uk/index.php/tag/screw-cap/" class="st_tag internal_tag" rel="tag" title="Posts tagged with screw cap">screw cap</a> type.</p><h3>The Purchase</h3><p><a
href="http://www.dannytsang.co.uk/index.php/tag/tesco/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Tesco">Tesco</a> was having a buy one get one free on <a
href="http://www.dannytsang.co.uk/index.php/tag/tesco/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Tesco">Tesco</a>&#8217;s branded bulbs so it was a no brainer to get them. I had no idea what they will be like but aimed to get the highest &#8220;similar to&#8221; rated <a
href="http://www.dannytsang.co.uk/index.php/tag/bulb/" class="st_tag internal_tag" rel="tag" title="Posts tagged with bulb">bulb</a> which happened to be 75W.</p><h3>Summary</h3><p>I have always been sceptical about <a
href="http://www.dannytsang.co.uk/index.php/tag/energy-saving-bulbs/" class="st_tag internal_tag" rel="tag" title="Posts tagged with energy saving bulbs">energy saving bulbs</a> because they take a while to warm up and do not give off as bright a light as the traditional candescent bulbs however that was a long time ago when my mum tried to switch the room with the computers in with an <a
href="http://www.dannytsang.co.uk/index.php/tag/energy/" class="st_tag internal_tag" rel="tag" title="Posts tagged with energy">energy</a> efficient bulb.</p><p>Once we got in, we tried the lamp out and it was bright! Not only did it light up the room enough it still had a warm up period which made it even brighter. I am very impressed with the lux of the bulb and whilst I can not review the estimated 8 years life of the bulb I am pleased with the results so far.</p> <a
href='http://www.dannytsang.co.uk/index.php/tescos-15w-mini-spiral-mini-review/bulb-after-warmed-up/' title='Energy Efficient Bulb'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2008/10/bulb-after-warmed-up-150x150.jpg" class="attachment-thumbnail" alt="Energy Efficient Bulb" title="Energy Efficient Bulb" /></a> <a
href='http://www.dannytsang.co.uk/index.php/tescos-15w-mini-spiral-mini-review/bulb-on-start/' title='Energy Efficient Bulb'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2008/10/bulb-on-start-150x150.jpg" class="attachment-thumbnail" alt="Energy Efficient Bulb" title="Energy Efficient Bulb" /></a> <a
href='http://www.dannytsang.co.uk/index.php/tescos-15w-mini-spiral-mini-review/dark-room/' title='Livingroom'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2008/10/dark-room-150x150.jpg" class="attachment-thumbnail" alt="Livingroom" title="Livingroom" /></a> <a
href='http://www.dannytsang.co.uk/index.php/tescos-15w-mini-spiral-mini-review/mini-spiral-box/' title='Mini Spiral Energy Efficient Box'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2008/10/mini-spiral-box-150x150.jpg" class="attachment-thumbnail" alt="Mini Spiral Energy Efficient Box" title="Mini Spiral Energy Efficient Box" /></a><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/blown-bulb/' rel='bookmark' title='Blown Bulb'>Blown Bulb</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/200w-500w-is-not-a-good-idea/' rel='bookmark' title='200W &gt; 500W Is Not A Good Idea'>200W > 500W Is Not A Good Idea</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/electronics-honda/' rel='bookmark' title='Electronics &gt; Honda'>Electronics > Honda</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/tescos-15w-mini-spiral-mini-review/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
