Early working thermostat code

On February 17, 2008 · Comments Off

I definitely don’t have this anywhere near I like it, but I did manage to just dump out a bunch of info from my thermostat and turn off the fan with this script:

#!/usr/bin/ruby

require ‘thermostat’
require ‘pdp_constants’
include Proliphix

t = Thermostat.new("192.168.1.30","admin","XXXXXXXX")
t.set_senors(ThermHvacMode, ThermHvacState, ThermFanState, ThermFanMode, ThermAverageTemp, ThermHeat1Usage)
t.fetch_data

# dump out what we have
puts t

# turn off the fan
t.set_data(ThermFanMode, 1)
 

I need some nicer symbolic constants for state setting, and pull together a rails site just to keep track of thermostat data over the course of the day.  All this code is going on my newly registered rubyforge project.

  • Twitter
  • Facebook
  • del.icio.us
  • Digg
  • Reddit
  • Google Bookmarks
  • RSS
Tagged , ,

Comments are closed.

Additional comments powered by BackType

Ads by Google