thermostat 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/test-fan-off.rb +1 -8
- data/examples/test-fan-on.rb +1 -7
- data/examples/test-run.rb +5 -4
- data/examples/test-set-heat.rb +2 -7
- data/lib/thermostat.rb +1 -1
- metadata +2 -2
data/examples/test-fan-off.rb
CHANGED
@@ -4,17 +4,10 @@ $LOAD_PATH.unshift "../lib"
|
|
4
4
|
|
5
5
|
require "yaml"
|
6
6
|
require 'thermostat'
|
7
|
-
include Proliphix
|
8
7
|
|
9
8
|
c = YAML.load_file("../account.yaml")
|
10
9
|
|
11
10
|
t = Thermostat.new(c["ip"], c["user"], c["passwd"])
|
12
11
|
|
13
|
-
t.
|
14
|
-
t.fetch_data
|
12
|
+
t.fan_off!
|
15
13
|
|
16
|
-
puts t
|
17
|
-
|
18
|
-
t.set_data(ThermFanMode, 1)
|
19
|
-
|
20
|
-
puts t
|
data/examples/test-fan-on.rb
CHANGED
@@ -5,16 +5,10 @@ $LOAD_PATH.unshift "../lib"
|
|
5
5
|
require "yaml"
|
6
6
|
require 'thermostat'
|
7
7
|
|
8
|
-
include Proliphix
|
9
|
-
|
10
8
|
c = YAML.load_file("../account.yaml")
|
11
9
|
|
12
10
|
t = Thermostat.new(c["ip"], c["user"], c["passwd"])
|
13
11
|
|
14
|
-
t.
|
15
|
-
t.fetch_data
|
16
|
-
|
17
|
-
puts t
|
12
|
+
t.fan_on!
|
18
13
|
|
19
|
-
t.set_data(ThermFanMode, 2)
|
20
14
|
|
data/examples/test-run.rb
CHANGED
@@ -11,11 +11,12 @@ c = YAML.load_file("../account.yaml")
|
|
11
11
|
|
12
12
|
t = Thermostat.new(c["ip"], c["user"], c["passwd"])
|
13
13
|
|
14
|
-
t.
|
14
|
+
puts "Temp: #{t.temp}"
|
15
|
+
puts "Mode: #{t.mode}"
|
16
|
+
puts "Setback Heat: #{t.heat_to}"
|
17
|
+
puts "Setback Cool: #{t.cool_to}"
|
18
|
+
puts "Fan Mode: #{(t.fan_on?) ? "On" : "Off"}"
|
15
19
|
|
16
|
-
t.fetch_data
|
17
|
-
|
18
|
-
puts t
|
19
20
|
|
20
21
|
|
21
22
|
|
data/examples/test-set-heat.rb
CHANGED
@@ -7,14 +7,9 @@ require 'thermostat'
|
|
7
7
|
include Proliphix
|
8
8
|
|
9
9
|
c = YAML.load_file("../account.yaml")
|
10
|
-
|
11
10
|
t = Thermostat.new(c["ip"], c["user"], c["passwd"])
|
12
11
|
|
13
|
-
|
14
|
-
t.
|
15
|
-
|
16
|
-
puts t
|
12
|
+
# sets the heat to 68 degrees F
|
13
|
+
t.heat_to = 68
|
17
14
|
|
18
|
-
# Sets the heat to 68.0 F
|
19
|
-
t.set_data(ThermSetbackHeat, 680)
|
20
15
|
|
data/lib/thermostat.rb
CHANGED
@@ -4,7 +4,7 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
4
4
|
# This is the main class for controlling the Proliphix Thermostat.
|
5
5
|
# You must first initialize it with the control point credentials
|
6
6
|
class Thermostat
|
7
|
-
VERSION = '1.1.
|
7
|
+
VERSION = '1.1.1'
|
8
8
|
|
9
9
|
require 'pdp/oid'
|
10
10
|
require 'pdp/constants'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thermostat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Dague
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-11 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|