Early working thermostat code

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:


require 'thermostat'
require 'pdp_constants'
include Proliphix

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

# 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.