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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/humble_rpi-plugin-pir.rb +4 -3
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49d8a6fb16965f65c09f0d7756000cabf6b5d2bf
|
4
|
+
data.tar.gz: e9b85102f5ac78c2103fdc6f053f539a3fec061a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 288384c2e150e431c4460599c900a0a031cb0d1eadd4ec7bc7955be809eea4317381bbc62708988604e6a912f458914acd684f494298100092a020bc743dd930
|
7
|
+
data.tar.gz: 964170331d02739beedbc46457a4a25caad215780e52e4fba81b8caa4a1dfaf61d784e9432174566377d283c1758cb258247ca1b2d4da2684d7978e0bc30b4a6
|
checksums.yaml.gz.sig
CHANGED
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:
|
51
|
-
|
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
metadata.gz.sig
CHANGED
Binary file
|