humble_rpi-plugin-pir 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17a9b34ec0daefc2289b836d631df4b0ad087291
4
- data.tar.gz: 3d8ab10596c8e68540cf3dab595f9bae489cd0b0
3
+ metadata.gz: 49d8a6fb16965f65c09f0d7756000cabf6b5d2bf
4
+ data.tar.gz: e9b85102f5ac78c2103fdc6f053f539a3fec061a
5
5
  SHA512:
6
- metadata.gz: 002f489f8cae0a548a88f9d53e52af2fc51dc6c9c4abc3771b0c704da703c4ac52724066d3c655bbade108f3690f6fe5ca98e5fc3309b40ae02c2be3d28fc3d7
7
- data.tar.gz: 39af08307ac53689aa4f6c1f751d6c2d7dd33a5c77f26e124b3cf5672dbf2f59f18fd9255d9c21ace0d436ee5c6f18bbe4883a6534b1a22f5d4a06ed62641f7e
6
+ metadata.gz: 288384c2e150e431c4460599c900a0a031cb0d1eadd4ec7bc7955be809eea4317381bbc62708988604e6a912f458914acd684f494298100092a020bc743dd930
7
+ data.tar.gz: 964170331d02739beedbc46457a4a25caad215780e52e4fba81b8caa4a1dfaf61d784e9432174566377d283c1758cb258247ca1b2d4da2684d7978e0bc30b4a6
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -39,7 +39,7 @@ class HumbleRPiPluginPir
39
39
  notifier = @notifier
40
40
  device_id = @device_id
41
41
 
42
- @pins.each do |pin|
42
+ @pins.each.with_index do |pin, i|
43
43
 
44
44
  after pin: pin.to_i, goes: :high do
45
45
 
@@ -47,8 +47,9 @@ class HumbleRPiPluginPir
47
47
 
48
48
  if Time.now > t1 + ChronicDuration.parse(duration) then
49
49
 
50
- notifier.notice "%s/motion: detected %s times within the past %s" \
51
- % [device_id, count, duration]
50
+ notifier.notice "%s/motion/%s: " \
51
+ + "detected %s times within the past %s" \
52
+ % [device_id, i, count, duration]
52
53
  t1 = Time.now
53
54
  count = 0
54
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: humble_rpi-plugin-pir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file