Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Todd's CQC Setup
After having CQC for almost two years and not making much progress I was finally able to transition to a working setup based on the excellent templates provided by jkish. My existing setup has been running on HS since ~2001 through three house moves now. Seems like when I finally get everything wired and working we move.

Equipment list / CQC/ Controlled existing and planned:

  • CQC Server - Compaq Sr1710
  • APC Masterswitch for remote server / utility power switching via SNMP.
  • Nuvo Essentia 12 zone audio distribution
  • Onkyo TX-SR707 AV receiver
  • Elk M1G - Alarm / Automation
  • Brand Electronics OneMeter - Whole house energy meter
  • Mitsubishi WD 62725 TV - serial port controlled
  • Tivo Series 3 HD - telnet controlled
  • Planar 15" Touchscreen - Wall mount in office
  • ELO Touch Screen 15" - Kitchen in-wall mount framed
  • Liliput 7" touchscreen - misc / testing
  • VoIP - SIP phones through our company (we are a telecom provider)
  • TR40 Thermostats
  • Music library via Itunes / SqueezeCenter
  • HAM Radio - APRS monitoring of vehicle location (dated, easier now with Iphone and utility programs).
  • MyMovies for indexing movies
  • Popcorn PCH-A100 hour movie player
  • W800 X-10 interface for monitoring DS10a's.
  • BT800 8 port camera board for server
  • Misc direct wired and IP based cameras for home survelliance
  • Blue Iris for camera control / web interface feed to CQC
  • Midon Design Temp05 interface with DS1820 one-wire sensors for temperature monitoring
  • Intermatic HA07 Zwave controller for lighting
  • Intermatic and VIZIA RF+ wall switches for lighting

Waiting installation:
  • RAIN8net irrigation controller

Misc monitoring of household stuff:
  • Refrigerator open/closing
  • Toilet flushes
  • Salt level in water softer

Screenshots and lots of questions to follow as I continue to progress with CQC.
fairview1100 Wrote:•HAM Radio - APRS monitoring of vehicle location (dated, easier now with Iphone and utility programs).

Can you elaborate on this? Sounds interesting.
Sendero Wrote:Can you elaborate on this? Sounds interesting.

I used a script originally posted back in 2002 and modified it for my purposes.( The script queries to find the last reported position of an APRS station broadcast. I used to always have the HAM radio on in the vehicle when travelling and reporting positions every 10 minute interval. I had several datapoints calculated to compare against in an event so the status text would read 'Todd is at work', 'Todd is at home', 'Todd is at the gym', etc. The text to speech under HS would also announce each day when I was leaving work and when I was nearing home.

This is an example page that was queried with one of my old reported stations and position:

From there the HTML was screen-scraped to get the latitude and longitude and plotted into Goggle Maps via their API calls along with storing in HS devices.

Now it's much easier to just have my cell phone GPS's report it's location and pull the data from that report. Using a prebuilt application such as Instamapper on the iphone you can just create a web widget that would display your current location map from their site. This precludes the fun stuff like text status notifications, but is straightforward to set up until I can spend some time figuring out how to get the functionality working under CQC.
Some initial screenshots of my current progress.

Intro Screen displayed on IV load:

[Image: Intro.jpg]


[Image: weather.jpg]


[Image: security.jpg]


[Image: climate.jpg]

Misc Settings for stuff I haven't figured out where to put yet:

[Image: settings.jpg]

Rollout timer from settings:

[Image: timer.jpg]

Energy Tracking:

[Image: energy.jpg]
[Image: tempgraph.jpg]

Along with creating the CQC screens, I am moving functions from HomeSeer to CQC control. Most of the graphing and logging is still originated through HS scripts and displayed via web widgets. I have however gotten the temperature graphs solely under CQC control using the DataLogger and database functionality provided earlier. A crude PERL script is running every 10 minutes through an event to parse the database and create the graph through ChartDirector. Gotta re-buy my license for that as I was using an older v3.x under VBScript so have to suffer with the 'unregistered' yellow bars on the graphs for a bit.

I think the graph looks nicer than the graphmatic ones.
I added a countdown timer that is working great. When active, the counter is displayed at the bottom of the screen. When the timer goes off, any music playing is paused and a .wav alert is sounded. If the Nuvo audio system is off, the zones are all turned on first, the the alert sounded, then set back off. Works better for us than the standard microwave/oven kitchen timer as you can be anywhere in the house or garage and hear the alert.
Here's the basics of my PERL code to pull data from the DataLogger written database. Can be cleaned up and organized better, but is working as a prototype to get the data charted so I can keep designing and migrating other stuff.

#!/usr/bin/perl -w

use DBI;
use perlchartdir;

my $dbh = DBI->connect("dbi:ODBC:CQC Temperature Log", 'sa', '',{ RaiseError => 1, odbc_cursortype => 2});

my $data0 = [];
my $data1 = [];
my $labels = [];
my ($sec,$min,$hour,$mday,$mon,$year);
my @row;

my $hour_increment = 24;

for ($hr_interval=-23;$hr_interval<=0;$hr_interval++)        
      $hourly_counta = 0; # Holds samples per hour read
      $hourly_totala = 0; # Holds total values per hour to divide by count to get average
      $hourly_averagea =0;

      $hourly_countb = 0; # Holds samples per hour read
      $hourly_totalb = 0; # Holds total values per hour to divide by count to get average
      $hourly_averageb =0;

      # Subtract from the current time  to get the hour label
      ($sec,$min,$hour,$mday,$mon,$year) = localtime(time-3600*$hour_increment);  

      #$hr_minus = $hr_interval - 1;

      $sth = $dbh->prepare("Select TimeStamp, Value From DataLogValues Where TimeStamp>=DATEADD([hour], $hr_interval-1,GETDATE()) AND TimeStamp<=DATEADD([hour],$hr_interval,GETDATE()) AND Descriptor = 'KeyPad01' ORDER BY TimeStamp");

      ############ First Data Set ############
      # Get the hourly data for this interval        
       while (@row = $sth->fetchrow_array) {        
          print "Time: $row[0] TimeRun: $row[1]\n";

       if ( $hourly_counta > 0) {
           $hourly_averagea = $hourly_totala / $hourly_counta;

       ########### Second Data Set #############

       $sth = $dbh->prepare("Select TimeStamp, Value From DataLogValues Where TimeStamp>=DATEADD([hour], $hr_interval-1,GETDATE()) AND TimeStamp<=DATEADD([hour],$hr_interval,GETDATE()) AND Descriptor = 'OutsideTemp' ORDER BY TimeStamp");
       while (@row = $sth->fetchrow_array) {        
          print "Time: $row[0] TimeRun: $row[1]\n";

       if ($hourly_countb > 0) {
         $hourly_averageb = $hourly_totalb / $hourly_countb;

###### Now Make the Chart ######

my $c = new XYChart(600, 300, 0xeeeeff, 0x000000, 1);

# Add a title to the chart using 18 pts Times Bold Italic font
$c->addTitle("Last 12 hour Temperatures", "timesbi.ttf", 18);

$c->setPlotArea(50, 55, 520, 195, $c->linearGradientColor(0, 55, 0, 335, 0xf9fcff,
    0xaaccff), -1, $perlchartdir::Transparent, 0xffffff);

$c->addLegend(50, 30, 0, "arialbd.ttf", 9)->setBackground($perlchartdir::Transparent);

# Add a line layer to the chart
my $layer = $c->addLineLayer2();


# Add a title to the y axis
$c->yAxis()->setTitle("Temperature F");

# Add a title to the x axis
$c->xAxis()->setTitle("Hour of the Day");

# Add a bar chart layer with green (0x00ff00) bars using the given data

$layer->addDataSet($data0, 0xff0000, "Inside");
$layer->addDataSet($data1, 0x008800, "Outside");

# Set the labels on the x axis.

# Output the chart

Possibly Related Threads...
Thread Author Replies Views Last Post
  KBL's CQC Setup kblagron 36 25,008 07-31-2017, 06:21 PM
Last Post: kblagron
  Looking to overhaul my CQC setup Sendero 7 4,133 10-09-2015, 07:51 AM
Last Post: Dean Roddey
  potts' cqc setup potts.mike 73 18,895 01-14-2010, 10:10 PM
Last Post: potts.mike
  Gacevich's Setup gacevich 37 12,931 10-26-2009, 03:15 AM
Last Post: gacevich
  Trioxide's setup Trioxide 27 6,717 04-18-2009, 08:59 PM
Last Post: Trioxide
  SamVimes2's setup and templates SamVimes2 5 2,761 03-03-2009, 01:42 AM
Last Post: ellisr63
  rip74's setup rip74 2 2,194 03-01-2009, 08:08 PM
Last Post: AnthonyZ
  Prefect's CQC Setup Prefect 60 11,554 02-19-2008, 03:14 PM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)