huemote 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/huemote.rb +4 -0
- data/lib/huemote/bridge.rb +13 -1
- data/lib/huemote/light.rb +4 -0
- data/lib/huemote/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d0b8b6f5a8a97cf8b6b65413026efd02bbb124a
|
4
|
+
data.tar.gz: 85a127ff1aa6ef4f1c2175f84d07f7f9a4f21c5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5047b057003449eb4fc8cefdf962834e066e83bc40e8301694022e1aa02d30a4b0b897ee31e0d763f34a3fa91f8b66514431254a1b5e76867d9e103898ef60a
|
7
|
+
data.tar.gz: aa0783d7080b5be8d235caba338148124aadfe078416a2ed8d13142eae68109aeff5c10cf6778528a1de64b2382d4b1b49653976b89e0fff842aa107e9a97f0d
|
data/README.md
CHANGED
@@ -16,6 +16,11 @@ Or install it yourself as:
|
|
16
16
|
|
17
17
|
$ gem install huemote
|
18
18
|
|
19
|
+
## Recent Updates:
|
20
|
+
### 0.1.0:
|
21
|
+
* Added `Huemote::Light#kelvin` - which will delegate to `Huemote::Light#ct`, by computing the mired value (constrained between 154-500 mired)
|
22
|
+
* Added support for setting a static IP (honestly, the preferred mechanism at this point; getting a stable method of device detection has been a nightmare). Run `Huemote.set_ip '192.168.1.x'` or equivalent, and then use the library as normal.
|
23
|
+
|
19
24
|
## Usage
|
20
25
|
|
21
26
|
You can fetch all lights on your network via:
|
data/lib/huemote.rb
CHANGED
data/lib/huemote/bridge.rb
CHANGED
@@ -8,8 +8,20 @@ module Huemote
|
|
8
8
|
USERNAME = "HuemoteRubyGem"
|
9
9
|
|
10
10
|
class << self
|
11
|
+
def set_ip(ip)
|
12
|
+
@static_ip = ip
|
13
|
+
end
|
14
|
+
|
11
15
|
def get
|
12
|
-
@bridge ||=
|
16
|
+
@bridge ||= begin
|
17
|
+
if @static_ip
|
18
|
+
client = Huemote::Client.new
|
19
|
+
body = client.get("http://#{@static_ip}:80/description.xml").body
|
20
|
+
self.new(@static_ip,80,body)
|
21
|
+
else
|
22
|
+
discover
|
23
|
+
end
|
24
|
+
end
|
13
25
|
end
|
14
26
|
|
15
27
|
private
|
data/lib/huemote/light.rb
CHANGED
data/lib/huemote/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: huemote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Gisi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Huemote is a Ruby gem for managing Philips Hue lights
|
14
14
|
email:
|
@@ -58,4 +58,3 @@ summary: Huemote is a Ruby gem for managing Philips Hue lights
|
|
58
58
|
test_files:
|
59
59
|
- spec/huemote/bridge_spec.rb
|
60
60
|
- spec/spec_helper.rb
|
61
|
-
has_rdoc:
|