nest_thermostat 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +36 -1
- data/lib/nest_thermostat/nest.rb +4 -0
- data/lib/nest_thermostat/version.rb +1 -1
- data/spec/nest_thermostat_spec.rb +4 -0
- metadata +30 -9
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Nest Thermostat
|
2
2
|
|
3
3
|
This gem allows you to get and set the temperature of your Nest
|
4
4
|
thermostat. You can also get and set the away status and get the
|
@@ -47,6 +47,9 @@ puts @nest.away # => true
|
|
47
47
|
Default temperatures are in fahrenheit but you can change to celsius or kelvin:
|
48
48
|
```ruby
|
49
49
|
@nest = NestThermostat::Nest.new({..., temperature_scale: 'c'}) # Or C, Celsius or celsius
|
50
|
+
|
51
|
+
# -- OR --
|
52
|
+
|
50
53
|
@nest.temperature_scale = 'k' # or K, Kelvin or kelvin
|
51
54
|
```
|
52
55
|
|
@@ -69,6 +72,38 @@ request. I'd love to see other information like scheduling or multiple
|
|
69
72
|
device/location support added.
|
70
73
|
|
71
74
|
|
75
|
+
## Alfred Extension
|
76
|
+
|
77
|
+
If you use Alfred.app for OS X you may be interested in an extension.
|
78
|
+
[Download it](http://erc.bz/HtOe). You'll need ruby 1.9+ and this gem
|
79
|
+
installed. Then just enter your nest email/pass as the arguments in the
|
80
|
+
alfred extension (after you import it). It also uses [Growl](http://growl.info/downloads) to display
|
81
|
+
output so you'll need that installed as well.
|
82
|
+
|
83
|
+
![Screenshot of Alfred Extension](http://erc.bz/H9Hm/Image%202012.06.05%202:18:56%20PM.png) ![Screenshot of Alfred Extension Growl Output](http://erc.bz/H97m/Image%202012.06.05%202:34:49%20PM.png)
|
84
|
+
|
85
|
+
|
86
|
+
Here are the commands it supports:
|
87
|
+
```
|
88
|
+
nest # => Your Nest is set to 73°F
|
89
|
+
nest 72 # => Your Nest was set to 72°F
|
90
|
+
nest current # => The current temperature is currently 71.51°F
|
91
|
+
nest leaf # => The leaf is off; you can fix that! (or: The leaf is on; you are energy efficient!)
|
92
|
+
nest away # => Your Nest is now set to away (or: Your Nest is now set to home.)
|
93
|
+
nest home # => Your Nest is now set to home
|
94
|
+
nest humidity # => The relative humidity is currently 53%
|
95
|
+
nest until # => Your home will reach it's target temperature at 7:30pm
|
96
|
+
nest ip # => The current ip address is 5.68.127.16. I placed it in your clipboard.
|
97
|
+
```
|
98
|
+
|
99
|
+
There are some aliases as well:
|
100
|
+
```
|
101
|
+
nest current | current temp | current temperature
|
102
|
+
nest home | back
|
103
|
+
nest leaf | green
|
104
|
+
nest until | til | time
|
105
|
+
```
|
106
|
+
|
72
107
|
## Contributing
|
73
108
|
|
74
109
|
1. Fork it
|
data/lib/nest_thermostat/nest.rb
CHANGED
@@ -18,6 +18,10 @@ describe NestThermostat::Nest do
|
|
18
18
|
@nest.status['device'].first[1]['mac_address'].should match /(\d|[a-f]|[A-F])+/
|
19
19
|
end
|
20
20
|
|
21
|
+
it "gets the pubic ip address",focus:true do
|
22
|
+
@nest.public_ip.should match /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?$/
|
23
|
+
end
|
24
|
+
|
21
25
|
it "gets the leaf status" do
|
22
26
|
@nest.leaf.should_not be_nil
|
23
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nest_thermostat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: 0.8.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.8.3
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: rspec
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '2.10'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '2.10'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: awesome_print
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,7 +53,12 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
description: Control your nest thermostat
|
48
63
|
email:
|
49
64
|
- ericboehs@gmail.com
|
@@ -74,15 +89,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
89
|
- - ! '>='
|
75
90
|
- !ruby/object:Gem::Version
|
76
91
|
version: '0'
|
92
|
+
segments:
|
93
|
+
- 0
|
94
|
+
hash: 3375862277283861610
|
77
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
96
|
none: false
|
79
97
|
requirements:
|
80
98
|
- - ! '>='
|
81
99
|
- !ruby/object:Gem::Version
|
82
100
|
version: '0'
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
hash: 3375862277283861610
|
83
104
|
requirements: []
|
84
105
|
rubyforge_project:
|
85
|
-
rubygems_version: 1.8.
|
106
|
+
rubygems_version: 1.8.23
|
86
107
|
signing_key:
|
87
108
|
specification_version: 3
|
88
109
|
summary: View and set temperature and away status for your Nest
|