rzwaveway 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rzwaveway/zwave_device.rb +3 -4
- data/lib/rzwaveway/zway.rb +3 -4
- data/rzwaveway.gemspec +2 -2
- metadata +2 -2
@@ -55,14 +55,13 @@ module RZWaveWay
|
|
55
55
|
private
|
56
56
|
|
57
57
|
def group_per_commandclass updates
|
58
|
-
updates_per_commandclass =
|
58
|
+
updates_per_commandclass = {}
|
59
59
|
updates.each do | key, value |
|
60
60
|
match_data = key.match(/\Ainstances.0.commandClasses.(\d+)./)
|
61
61
|
if match_data
|
62
62
|
command_class = match_data[1].to_i
|
63
|
-
|
64
|
-
|
65
|
-
updates_per_commandclass[command_class] = cc_updates
|
63
|
+
updates_per_commandclass[command_class] = {} unless updates_per_commandclass.has_key?(command_class)
|
64
|
+
updates_per_commandclass[command_class][match_data.post_match] = value
|
66
65
|
else
|
67
66
|
$log.warn "? #{key}" unless key.match(/\Adata./)
|
68
67
|
end
|
data/lib/rzwaveway/zway.rb
CHANGED
@@ -56,14 +56,13 @@ module RZWaveWay
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def group_per_device updates
|
59
|
-
updates_per_device =
|
59
|
+
updates_per_device = {}
|
60
60
|
updates.each do | key, value |
|
61
61
|
match_data = key.match(/\Adevices\.(\d+)\./)
|
62
62
|
if match_data
|
63
63
|
device_id = match_data[1].to_i
|
64
|
-
|
65
|
-
|
66
|
-
updates_per_device[device_id] = device_updates
|
64
|
+
updates_per_device[device_id] = {} unless(updates_per_device.has_key?(device_id))
|
65
|
+
updates_per_device[device_id][match_data.post_match] = value
|
67
66
|
else
|
68
67
|
$log.warn "? #{key}"
|
69
68
|
end
|
data/rzwaveway.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "rzwaveway"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.4"
|
4
4
|
s.authors = ["Vincent Touchard"]
|
5
|
-
s.date = %q{2014-02-
|
5
|
+
s.date = %q{2014-02-18}
|
6
6
|
s.summary = 'ZWave API for ZWay'
|
7
7
|
s.description = 'A Ruby API to use the Razberry ZWave ZWay interface'
|
8
8
|
s.email = 'vincentoo.ignore@yahoo.com'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rzwaveway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: log4r
|