pzem016 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +1 -0
- data/LICENSE +21 -0
- data/exe/pzem016.rb +3 -1
- data/lib/pzem016/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 463a620a80caa16d7aeb4d8df1cbed92a63f8e39a08f3a92d6cc34e88519bcd9
|
4
|
+
data.tar.gz: bc58a7b3096134399252ca017b5c7ec8f12f1edeb4a7c0f9a22c7f0b7e46180f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d07c5f715f55bbc14aebe5f6b3ded9e647f3f222c73569676bcdb733c6aba835c1d9505488eec67d293e484b9150a615f406133ba9a0aaca80136398c8f7f77
|
7
|
+
data.tar.gz: 450bdf862b01186b46a7269d8cbdfdb092afef2f00fe8835faf9ee5a242fcf35219eeb3b5b2f47bfe6f1c458f6c20c2713cf9b48bce0441bd063eb6f4fb95dd2
|
data/CHANGELOG
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 svdasein
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/exe/pzem016.rb
CHANGED
@@ -108,9 +108,11 @@ begin
|
|
108
108
|
puts "Slave at addr #{cmd_opts[:sladdr]} energy counter reset: #{Pzem016::HoldingRegisters.new(global_opts[:name],
|
109
109
|
bus.with_slave(cmd_opts[:sladdr])).reset_energy}"
|
110
110
|
when :scanbus
|
111
|
+
progress = ProgressBar.create(title: "sladdr", total: 247,length: 80,format: '%t %c/%C (%j%): |%B|' )
|
111
112
|
begin
|
112
113
|
(1..247).each do |address|
|
113
114
|
bus.with_slave(address) do |slave|
|
115
|
+
progress.increment
|
114
116
|
slave.read_retry_timeout = global_opts[:timeout]
|
115
117
|
slave.read_retries = global_opts[:retries]
|
116
118
|
begin
|
@@ -123,7 +125,7 @@ begin
|
|
123
125
|
puts
|
124
126
|
end
|
125
127
|
rescue StandardError
|
126
|
-
|
128
|
+
# don't care
|
127
129
|
end
|
128
130
|
end
|
129
131
|
end
|
data/lib/pzem016/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pzem016
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Parker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -77,6 +77,7 @@ extensions: []
|
|
77
77
|
extra_rdoc_files: []
|
78
78
|
files:
|
79
79
|
- CHANGELOG
|
80
|
+
- LICENSE
|
80
81
|
- PZEM016-bench.jpg
|
81
82
|
- README.md
|
82
83
|
- Rakefile
|