waterfurnace_aurora 1.4.8 → 1.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/aurora_monitor +31 -3
- data/exe/aurora_mqtt_bridge +6 -4
- data/lib/aurora/abc_client.rb +1 -1
- data/lib/aurora/blower.rb +5 -1
- data/lib/aurora/dhw.rb +1 -1
- data/lib/aurora/humidistat.rb +5 -2
- data/lib/aurora/modbus/server.rb +4 -1
- data/lib/aurora/registers.rb +5 -1
- data/lib/aurora/version.rb +1 -1
- metadata +4 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b28b02578f6c8cee89665c9bbbeee63beca4293b0e00ed443136ef38a2d42471
|
4
|
+
data.tar.gz: 54abf4d6ece6a830e8e26c7b75ca2e062261adbf5ac88369b28d71aca2924ad8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07dee234ff32befc9ac76c1b7eae9225aaaaf0a3421efda39339472242eda1d8bc7a5020509942d711ab03558d5cc9e78260b8677a2af537c1aeb1ab4968125d
|
7
|
+
data.tar.gz: c0b386559d04b2544a7b421c5a5ae03d130171160af6b7bca8b0f4ac7ff1c49772a74fd2b979a5eb5c3e7f041ce616e5104e4ea075fd1cbc7c602f5f529df1dc
|
data/exe/aurora_monitor
CHANGED
@@ -12,7 +12,8 @@ diff_only = debug_modbus = ignore_awl_heartbeat = ignore_sensors = false
|
|
12
12
|
options = OptionParser.new do |opts|
|
13
13
|
opts.banner = "Usage: aurora_monitor /path/to/serial/port [options]"
|
14
14
|
|
15
|
-
opts.on("-q",
|
15
|
+
opts.on("-q",
|
16
|
+
"--quiet",
|
16
17
|
"Enables quiet mode (--diff-only, --ignore-awl-heartbeat, --ignore-sensors) to ease in deciphering new registers") do # rubocop:disable Layout/LineLength
|
17
18
|
diff_only = true
|
18
19
|
ignore_awl_heartbeat = true
|
@@ -43,8 +44,35 @@ uri = URI.parse(ARGV[0])
|
|
43
44
|
|
44
45
|
last_registers = {}
|
45
46
|
|
46
|
-
SENSOR_REGISTERS = [16,
|
47
|
-
|
47
|
+
SENSOR_REGISTERS = [16,
|
48
|
+
19,
|
49
|
+
20,
|
50
|
+
740,
|
51
|
+
900,
|
52
|
+
901,
|
53
|
+
903,
|
54
|
+
908,
|
55
|
+
909,
|
56
|
+
1109,
|
57
|
+
1105,
|
58
|
+
1106,
|
59
|
+
1107,
|
60
|
+
1108,
|
61
|
+
1110,
|
62
|
+
1111,
|
63
|
+
1114,
|
64
|
+
1117,
|
65
|
+
1134,
|
66
|
+
1148,
|
67
|
+
1149,
|
68
|
+
1150,
|
69
|
+
1151,
|
70
|
+
1152,
|
71
|
+
1153,
|
72
|
+
1164,
|
73
|
+
1165,
|
74
|
+
3326,
|
75
|
+
3330].freeze
|
48
76
|
|
49
77
|
io = case uri.scheme
|
50
78
|
when "tcp"
|
data/exe/aurora_mqtt_bridge
CHANGED
@@ -19,7 +19,7 @@ options = OptionParser.new do |opts|
|
|
19
19
|
|
20
20
|
opts.on("--device-name DEVICENAME", "Give a descriptive name to your device") { |v| device_name = v }
|
21
21
|
opts.on("--debug-modbus", "Print actual protocol bytes") { debug_modbus = true }
|
22
|
-
opts.on("--web-aid-tool PORT", "Run web aid tool on given port",
|
22
|
+
opts.on("--web-aid-tool PORT", "Run web aid tool on given port", Integer) { |v| web_aid_tool = v }
|
23
23
|
opts.on("-v", "--version", "Print version") do
|
24
24
|
puts Aurora::VERSION
|
25
25
|
exit
|
@@ -70,7 +70,8 @@ class MQTTBridge
|
|
70
70
|
registers = @abc.modbus_slave.read_multiple_holding_registers(*queries)
|
71
71
|
result = registers.values.join(",")
|
72
72
|
@homie.mqtt.publish("#{@homie.topic}/$modbus/getregs/response",
|
73
|
-
"#{query_id}:#{result}",
|
73
|
+
"#{query_id}:#{result}",
|
74
|
+
qos: 1)
|
74
75
|
when %r{\$modbus/(\d+)/set$}
|
75
76
|
register = $1.to_i
|
76
77
|
value = case value
|
@@ -497,7 +498,7 @@ class MQTTBridge
|
|
497
498
|
@abc.blower.public_send(field),
|
498
499
|
format: 1..12,
|
499
500
|
hass: { number: { entity_category: :config } }) do |value|
|
500
|
-
@mutex.synchronize { @abc.blower.public_send("#{field}=", value) }
|
501
|
+
@mutex.synchronize { @abc.blower.public_send(:"#{field}=", value) }
|
501
502
|
end
|
502
503
|
end
|
503
504
|
|
@@ -805,7 +806,8 @@ class MQTTBridge
|
|
805
806
|
@mutex.synchronize { zone.heating_target_temperature = value }
|
806
807
|
end
|
807
808
|
node.property("cooling-target-temperature",
|
808
|
-
"Cooling Target Temperature",
|
809
|
+
"Cooling Target Temperature",
|
810
|
+
:integer,
|
809
811
|
zone.cooling_target_temperature,
|
810
812
|
unit: "°F",
|
811
813
|
format: 54..99) do |value|
|
data/lib/aurora/abc_client.rb
CHANGED
@@ -106,7 +106,7 @@ module Aurora
|
|
106
106
|
last_log_time ||= Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
107
107
|
now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
108
108
|
if now - last_log_time > 5
|
109
|
-
Aurora
|
109
|
+
Aurora.logger&.info("Fetching register(s) #{query}...")
|
110
110
|
last_log_time = now
|
111
111
|
end
|
112
112
|
last_log_time
|
data/lib/aurora/blower.rb
CHANGED
@@ -51,7 +51,11 @@ module Aurora
|
|
51
51
|
end
|
52
52
|
|
53
53
|
class ECM < PSC
|
54
|
-
attr_reader :speed,
|
54
|
+
attr_reader :speed,
|
55
|
+
:blower_only_speed,
|
56
|
+
:low_compressor_speed,
|
57
|
+
:high_compressor_speed,
|
58
|
+
:aux_heat_speed,
|
55
59
|
:iz2_desired_speed
|
56
60
|
|
57
61
|
def speed_range
|
data/lib/aurora/dhw.rb
CHANGED
data/lib/aurora/humidistat.rb
CHANGED
@@ -4,8 +4,11 @@ require "aurora/component"
|
|
4
4
|
|
5
5
|
module Aurora
|
6
6
|
class Humidistat < Component
|
7
|
-
attr_reader :humidifier_running,
|
8
|
-
:
|
7
|
+
attr_reader :humidifier_running,
|
8
|
+
:humidifier_mode,
|
9
|
+
:humidification_target,
|
10
|
+
:dehumidifier_mode,
|
11
|
+
:dehumidification_target,
|
9
12
|
:relative_humidity
|
10
13
|
alias_method :humidifier_running?, :humidifier_running
|
11
14
|
|
data/lib/aurora/modbus/server.rb
CHANGED
@@ -76,4 +76,7 @@ end
|
|
76
76
|
# 66 => read multiple discontiguous registers (command is a list of addrs)
|
77
77
|
# 67 => write multiple discontiguous registers (command is a list of pairs of addr and value; response has no content)
|
78
78
|
# 68 => ?? request has 4 bytes, response has 1 byte that seems to be 0 (for success?)
|
79
|
-
ModBus::Server::
|
79
|
+
funcs = ModBus::Server::FUNCS.dup
|
80
|
+
funcs.push(65, 66, 67, 68)
|
81
|
+
ModBus::Server.send(:remove_const, :FUNCS)
|
82
|
+
ModBus::Server.const_set(:FUNCS, funcs.freeze)
|
data/lib/aurora/registers.rb
CHANGED
@@ -61,7 +61,7 @@ module Aurora
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def to_uint32(registers, idx)
|
64
|
-
Aurora
|
64
|
+
Aurora.logger&.warn("Missing register #{idx + 1}") unless registers[idx + 1]
|
65
65
|
(registers[idx] << 16) + registers[idx + 1]
|
66
66
|
end
|
67
67
|
|
@@ -494,6 +494,7 @@ module Aurora
|
|
494
494
|
REGISTER_CONVERTERS = {
|
495
495
|
TO_HUNDREDTHS => [2, 3, 417, 418, 801, 804, 807, 813, 816, 817, 819, 820, 825, 828],
|
496
496
|
method(:dipswitch_settings) => [4, 33],
|
497
|
+
# rubocop:disable Layout/MultilineArrayLineBreaks
|
497
498
|
TO_TENTHS => [401, 419, 745, 746, 901,
|
498
499
|
1105, 1106, 1107, 1108, 1115, 1116, 1117, 1119,
|
499
500
|
3322, 3323,
|
@@ -508,6 +509,7 @@ module Aurora
|
|
508
509
|
1109, 1110, 1111, 1112, 1113, 1114, 1124, 1125, 1134, 1135, 1136,
|
509
510
|
3325, 3326, 3327, 3330, 3522, 3903, 3905, 3906,
|
510
511
|
31_003, 31_007, 31_010, 31_013, 31_016, 31_019, 31_022],
|
512
|
+
# rubocop:enable Layout/MultilineArrayLineBreaks
|
511
513
|
TO_LAST_LOCKOUT => [26],
|
512
514
|
->(v) { from_bitmask(v, SYSTEM_OUTPUTS) } => [27, 30],
|
513
515
|
->(v) { from_bitmask(v, SYSTEM_INPUTS) } => [28],
|
@@ -561,6 +563,7 @@ module Aurora
|
|
561
563
|
REGISTER_FORMATS = {
|
562
564
|
"%ds" => [1, 6, 9, 15, 84, 85, 110],
|
563
565
|
"%dV" => [16, 112, 3331, 3424, 3523],
|
566
|
+
# rubocop:disable Layout/MultilineArrayLineBreaks
|
564
567
|
"%0.1f°F" => [19, 20, 401, 501, 502, 567, 740, 745, 746, 747, 900, 903,
|
565
568
|
1109, 1110, 1111, 1112, 1113, 1114, 1124, 1125, 1134, 1135, 1136,
|
566
569
|
3325, 3326, 3327, 3330, 3522, 3903, 3905, 3906,
|
@@ -573,6 +576,7 @@ module Aurora
|
|
573
576
|
21_248, 21_249,
|
574
577
|
31_003,
|
575
578
|
31_007, 31_010, 31_013, 31_016, 31_019, 31_022],
|
579
|
+
# rubocop:enable Layout/MultilineArrayLineBreaks
|
576
580
|
"E%d" => [25, 26],
|
577
581
|
"%d%%" => [282, 321, 322, 325, 346, 565, 741, 908, 1126, 3332, 3524, 3808],
|
578
582
|
"%0.1f psi" => [419, 901, 1115, 1116, 1119, 3322, 3323],
|
data/lib/aurora/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: waterfurnace_aurora
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ccutrer-serialport
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 1.0.1
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
|
-
name: rmodbus
|
68
|
+
name: rmodbus
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
@@ -106,62 +106,6 @@ dependencies:
|
|
106
106
|
- - "~>"
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '1.8'
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: byebug
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '11.0'
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '11.0'
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: rubocop
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '1.23'
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - "~>"
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '1.23'
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: rubocop-performance
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - "~>"
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '1.12'
|
144
|
-
type: :development
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - "~>"
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '1.12'
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: rubocop-rake
|
153
|
-
requirement: !ruby/object:Gem::Requirement
|
154
|
-
requirements:
|
155
|
-
- - "~>"
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '0.6'
|
158
|
-
type: :development
|
159
|
-
prerelease: false
|
160
|
-
version_requirements: !ruby/object:Gem::Requirement
|
161
|
-
requirements:
|
162
|
-
- - "~>"
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: '0.6'
|
165
109
|
description:
|
166
110
|
email: cody@cutrer.us'
|
167
111
|
executables:
|
@@ -218,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
162
|
- !ruby/object:Gem::Version
|
219
163
|
version: '0'
|
220
164
|
requirements: []
|
221
|
-
rubygems_version: 3.
|
165
|
+
rubygems_version: 3.5.11
|
222
166
|
signing_key:
|
223
167
|
specification_version: 4
|
224
168
|
summary: Library for communication with WaterFurnace Aurora control systems
|