waterfurnace_aurora 0.7.7 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/aurora_fetch +17 -6
- data/exe/aurora_mqtt_bridge +292 -126
- data/exe/web_aid_tool +6 -2
- data/lib/aurora/abc_client.rb +108 -27
- data/lib/aurora/aux_heat.rb +21 -0
- data/lib/aurora/blower.rb +1 -1
- data/lib/aurora/component.rb +4 -0
- data/lib/aurora/compressor.rb +29 -8
- data/lib/aurora/dhw.rb +0 -1
- data/lib/aurora/humidistat.rb +2 -4
- data/lib/aurora/iz2_zone.rb +0 -6
- data/lib/aurora/mock_abc.rb +21 -2
- data/lib/aurora/pump.rb +2 -2
- data/lib/aurora/registers.rb +9 -5
- data/lib/aurora/thermostat.rb +14 -16
- data/lib/aurora/version.rb +1 -1
- data/lib/aurora.rb +3 -0
- 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: b8a3d1e80a8e07d73e5efe83005545f360db3475614333fc434885b3e9143092
|
4
|
+
data.tar.gz: 97ea735ee8991898734b87f810d273bb8fc2000b011f569e9908f4ebcad4d1fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3aea05123fca4194e108b32adde87724547f63e1ef1b9f0a91d4f22856d59b5021f08a998fe3d9956e20f3e745d662001d0beb43d86de69cdd36decb6f5c1af4
|
7
|
+
data.tar.gz: 762f87c0790263751934b592b17252b822276bef351141b49da72d42b953eb6eb3fe553037c71117f8d39e0318bf83b70af4b838905d1e80195860439f117bb9
|
data/exe/aurora_fetch
CHANGED
@@ -8,20 +8,31 @@ require "optparse"
|
|
8
8
|
require "uri"
|
9
9
|
require "yaml"
|
10
10
|
|
11
|
-
debug_modbus = yaml = false
|
11
|
+
debug_modbus = yaml = ignore_missing_registers = false
|
12
12
|
try_individual = nil
|
13
13
|
|
14
14
|
options = OptionParser.new do |opts|
|
15
15
|
opts.banner = "Usage: aurora_fetch /path/to/serial/port REGISTERS [options]"
|
16
16
|
|
17
17
|
opts.separator("")
|
18
|
-
opts.separator(
|
18
|
+
opts.separator(<<~TEXT)
|
19
|
+
Use `known` to fetch all identified registers. Use `valid` to fetch all registers
|
20
|
+
that should respond. Use `all` to search the entire ModBus address space. Note that
|
21
|
+
logging of current progress is only periodic, and does not log every register it's
|
22
|
+
trying to fetch.
|
23
|
+
TEXT
|
19
24
|
opts.separator("")
|
20
25
|
|
21
|
-
opts.on("--debug-modbus", "Print actual protocol bytes")
|
26
|
+
opts.on("--debug-modbus", "Print actual protocol bytes") do
|
27
|
+
debug_modbus = true
|
28
|
+
end
|
22
29
|
opts.on("--[no-]try-individual",
|
23
30
|
"Query registers one-by-one if a range has an illegal address. " \
|
24
31
|
"Defaults to true for `valid` and `known` special registers, false otherwise.") { |v| try_individual = v }
|
32
|
+
opts.on("--ignore-missing-registers",
|
33
|
+
"For YAML input only, just log a warning when a register doesn't exist, instead of failing") do
|
34
|
+
ignore_missing_registers = true
|
35
|
+
end
|
25
36
|
opts.on("-y", "--yaml", "Output raw values as YAML") { yaml = true }
|
26
37
|
opts.on("-v", "--version", "Print version") do
|
27
38
|
puts Aurora::VERSION
|
@@ -40,11 +51,11 @@ unless ARGV.length == 2
|
|
40
51
|
exit 1
|
41
52
|
end
|
42
53
|
|
43
|
-
modbus_slave = Aurora::ABCClient.open_modbus_slave(ARGV[0])
|
54
|
+
modbus_slave = Aurora::ABCClient.open_modbus_slave(ARGV[0], ignore_missing_registers: ignore_missing_registers)
|
44
55
|
modbus_slave.read_retry_timeout = 15
|
45
56
|
modbus_slave.read_retries = 2
|
46
|
-
modbus_slave.logger = Logger.new($
|
47
|
-
modbus_slave.logger.level = debug_modbus ? :debug : :
|
57
|
+
Aurora.logger = modbus_slave.logger = Logger.new($stderr)
|
58
|
+
modbus_slave.logger.level = debug_modbus ? :debug : :info
|
48
59
|
|
49
60
|
registers = Aurora::ABCClient.query_registers(modbus_slave, ARGV[1], try_individual: try_individual)
|
50
61
|
|