waterfurnace_aurora 1.4.6 → 1.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/aurora_mqtt_bridge +9 -2
- data/lib/aurora/abc_client.rb +9 -7
- data/lib/aurora/compressor.rb +2 -2
- data/lib/aurora/modbus/server.rb +1 -1
- data/lib/aurora/pump.rb +1 -1
- data/lib/aurora/registers.rb +17 -17
- data/lib/aurora/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 481ce3017f055baa863a30711f42f43d7d0e800293c46847a015040f66dd1980
|
4
|
+
data.tar.gz: f5f12fe2963551372dc6c8f6355cd6e84344bbba3662d15be4fee64b5d8be263
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb41acba03b2c7dbca36c58ad8c07f022bafa5c13cb4f396a786fca9725125346c0642d5f502f1c959823d81be579135c4ed51d00c0050e4600bcabc78f6188f
|
7
|
+
data.tar.gz: d4a6f3d9146b90069ea0488e131f2dc68413200a31866e0c096a448a84510cecd3f4e8643fba9cf609a0b0d0eecfe9d128801eb52ca77a583e45a993b99fad15
|
data/exe/aurora_mqtt_bridge
CHANGED
@@ -236,13 +236,13 @@ class MQTTBridge
|
|
236
236
|
state_class: :measurement } })
|
237
237
|
end
|
238
238
|
|
239
|
-
node.property("line-voltage",
|
239
|
+
node.property("line-voltage-setting",
|
240
240
|
"Line Voltage Setting",
|
241
241
|
:integer,
|
242
242
|
@abc.line_voltage,
|
243
243
|
format: 90..635,
|
244
244
|
unit: "V") do |value|
|
245
|
-
@mutex.synchronize { @abc.
|
245
|
+
@mutex.synchronize { @abc.line_voltage_setting = value }
|
246
246
|
end
|
247
247
|
if (-999..999).cover?(@abc.air_coil_temperature)
|
248
248
|
node.property("air-coil-temperature",
|
@@ -255,6 +255,13 @@ class MQTTBridge
|
|
255
255
|
entity_category: :diagnostic } })
|
256
256
|
end
|
257
257
|
if @abc.energy_monitoring?
|
258
|
+
node.property("line-voltage",
|
259
|
+
"Line Voltage",
|
260
|
+
:integer,
|
261
|
+
@abc.line_voltage,
|
262
|
+
format: 90..635,
|
263
|
+
unit: "V")
|
264
|
+
|
258
265
|
node.property("watts",
|
259
266
|
"Total Power Usage",
|
260
267
|
:integer,
|
data/lib/aurora/abc_client.rb
CHANGED
@@ -141,6 +141,7 @@ module Aurora
|
|
141
141
|
:outdoor_temperature,
|
142
142
|
:air_coil_temperature,
|
143
143
|
:line_voltage,
|
144
|
+
:line_voltage_setting,
|
144
145
|
:watts
|
145
146
|
|
146
147
|
alias_method :emergency_shutdown?, :emergency_shutdown
|
@@ -199,9 +200,9 @@ module Aurora
|
|
199
200
|
@entering_air_register = awl_axb? ? 740 : 567
|
200
201
|
@registers_to_read = [6, 19..20, 25, 30..31, 112, 344, @entering_air_register]
|
201
202
|
@registers_to_read << 1104 if axb?
|
202
|
-
@registers_to_read.
|
203
|
+
@registers_to_read.push(741, 31_003) if awl_communicating?
|
203
204
|
@registers_to_read << (1110..1111) if performance_monitoring?
|
204
|
-
@registers_to_read
|
205
|
+
@registers_to_read.push(16, 1150..1153) if energy_monitoring?
|
205
206
|
@registers_to_read << 900 if awl_axb?
|
206
207
|
zones.each do |z|
|
207
208
|
@registers_to_read.concat(z.registers_to_read)
|
@@ -211,7 +212,7 @@ module Aurora
|
|
211
212
|
@registers_to_read.concat(component.registers_to_read)
|
212
213
|
end
|
213
214
|
# need dehumidify mode to calculate final current mode
|
214
|
-
@registers_to_read.
|
215
|
+
@registers_to_read.push(362) if compressor.is_a?(Compressor::VSDrive)
|
215
216
|
end
|
216
217
|
|
217
218
|
def query_registers(query)
|
@@ -243,7 +244,8 @@ module Aurora
|
|
243
244
|
@high_pressure_switch = registers[31][:hps]
|
244
245
|
@emergency_shutdown = !!registers[31][:emergency_shutdown]
|
245
246
|
@load_shed = !!registers[31][:load_shed]
|
246
|
-
@line_voltage = registers[
|
247
|
+
@line_voltage = registers[16] if energy_monitoring?
|
248
|
+
@line_voltage_setting = registers[112]
|
247
249
|
@watts = registers[1153]
|
248
250
|
|
249
251
|
@current_mode = if outputs.include?(:lockout)
|
@@ -285,7 +287,7 @@ module Aurora
|
|
285
287
|
@modbus_slave.holding_registers[419] = (value * 10).to_i
|
286
288
|
end
|
287
289
|
|
288
|
-
def
|
290
|
+
def line_voltage_setting=(value)
|
289
291
|
raise ArgumentError unless (90..635).cover?(value)
|
290
292
|
|
291
293
|
@modbus_slave.holding_registers[112] = value
|
@@ -315,11 +317,11 @@ module Aurora
|
|
315
317
|
value = 0
|
316
318
|
value = 0x7fff if mode == :off
|
317
319
|
value |= 0x100 if mode == :cooling
|
318
|
-
value |= blower_speed == :with_compressor ? 0xf0 : (blower_speed << 4)
|
320
|
+
value |= (blower_speed == :with_compressor) ? 0xf0 : (blower_speed << 4)
|
319
321
|
value |= 0x200 if aux_heat
|
320
322
|
|
321
323
|
@modbus_slave.holding_registers[3002] = value
|
322
|
-
@modbus_slave.holding_registers[323] = pump_speed == :with_compressor ? 0x7fff : pump_speed
|
324
|
+
@modbus_slave.holding_registers[323] = (pump_speed == :with_compressor) ? 0x7fff : pump_speed
|
323
325
|
end
|
324
326
|
|
325
327
|
# I'm not sure if this is correct. 5 Series documentation says
|
data/lib/aurora/compressor.rb
CHANGED
@@ -19,7 +19,7 @@ module Aurora
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def type
|
22
|
-
"#{@stages == 2 ? "Dual" : "Single"} Stage Compressor"
|
22
|
+
"#{(@stages == 2) ? "Dual" : "Single"} Stage Compressor"
|
23
23
|
end
|
24
24
|
|
25
25
|
def speed_range
|
@@ -28,7 +28,7 @@ module Aurora
|
|
28
28
|
|
29
29
|
def registers_to_read
|
30
30
|
result = [19]
|
31
|
-
result.
|
31
|
+
result.push(1109, 1134, 1154..1157) if abc.refrigeration_monitoring?
|
32
32
|
result << (1146..1147) if abc.energy_monitoring?
|
33
33
|
result
|
34
34
|
end
|
data/lib/aurora/modbus/server.rb
CHANGED
@@ -76,4 +76,4 @@ 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::Funcs.
|
79
|
+
ModBus::Server::Funcs.push(65, 66, 67, 68)
|
data/lib/aurora/pump.rb
CHANGED
data/lib/aurora/registers.rb
CHANGED
@@ -44,11 +44,11 @@ module Aurora
|
|
44
44
|
totals
|
45
45
|
end
|
46
46
|
|
47
|
-
NEGATABLE = ->(v) { v & 0x8000 == 0x8000 ? v - 0x10000 : v }
|
47
|
+
NEGATABLE = ->(v) { (v & 0x8000 == 0x8000) ? v - 0x10000 : v }
|
48
48
|
TO_HUNDREDTHS = ->(v) { v.to_f / 100 }
|
49
49
|
TO_TENTHS = ->(v) { v.to_f / 10 }
|
50
50
|
TO_SIGNED_TENTHS = ->(v) { NEGATABLE.call(v).to_f / 10 }
|
51
|
-
TO_LAST_LOCKOUT = ->(v) { v & 0x8000 == 0x8000 ? v & 0x7fff : nil }
|
51
|
+
TO_LAST_LOCKOUT = ->(v) { (v & 0x8000 == 0x8000) ? v & 0x7fff : nil }
|
52
52
|
|
53
53
|
def from_bitmask(value, flags)
|
54
54
|
result = []
|
@@ -67,7 +67,7 @@ module Aurora
|
|
67
67
|
|
68
68
|
def to_int32(registers, idx)
|
69
69
|
v = to_uint32(registers, idx)
|
70
|
-
v & 0x80000000 == 0x80000000 ? v - 0x100000000 : v
|
70
|
+
(v & 0x80000000 == 0x80000000) ? v - 0x100000000 : v
|
71
71
|
end
|
72
72
|
|
73
73
|
def to_string(registers, idx, length)
|
@@ -212,13 +212,13 @@ module Aurora
|
|
212
212
|
return :manual if value == 0x7fff
|
213
213
|
|
214
214
|
{
|
215
|
-
fp1: value & 0x01 == 0x01 ? 30 : 15,
|
216
|
-
fp2: value & 0x02 == 0x02 ? 30 : :off,
|
217
|
-
reversing_valve: value & 0x04 == 0x04 ? :o : :b, # cycle to cool on O, or !B
|
215
|
+
fp1: (value & 0x01 == 0x01) ? 30 : 15,
|
216
|
+
fp2: (value & 0x02 == 0x02) ? 30 : :off,
|
217
|
+
reversing_valve: (value & 0x04 == 0x04) ? :o : :b, # cycle to cool on O, or !B
|
218
218
|
accessory_relay: ACCESSORY_RELAY_SETTINGS[(value >> 3) & 0x3],
|
219
|
-
compressor: value & 0x20 == 0x20 ? 1 : 2, # single or dual stage compressor
|
220
|
-
lockout: value & 0x40 == 0x40 ? :continuous : :pulse,
|
221
|
-
dehumidifier_reheat: value & 0x80 == 0x80 ? :dehumidifier : :reheat
|
219
|
+
compressor: (value & 0x20 == 0x20) ? 1 : 2, # single or dual stage compressor
|
220
|
+
lockout: (value & 0x40 == 0x40) ? :continuous : :pulse,
|
221
|
+
dehumidifier_reheat: (value & 0x80 == 0x80) ? :dehumidifier : :reheat
|
222
222
|
}
|
223
223
|
end
|
224
224
|
|
@@ -256,8 +256,8 @@ module Aurora
|
|
256
256
|
|
257
257
|
def status(value)
|
258
258
|
result = {
|
259
|
-
lps: value & 0x80 == 0x80 ? :closed : :open,
|
260
|
-
hps: value & 0x100 == 0x100 ? :closed : :open
|
259
|
+
lps: (value & 0x80 == 0x80) ? :closed : :open,
|
260
|
+
hps: (value & 0x100 == 0x100) ? :closed : :open
|
261
261
|
}
|
262
262
|
SYSTEM_INPUTS.each do |(i, name)|
|
263
263
|
result[name] = true if value & i == i
|
@@ -316,7 +316,7 @@ module Aurora
|
|
316
316
|
result[:ha2] = value & 0x004 == 0x004
|
317
317
|
result[:pump_slave] = value & 0x008 == 0x008
|
318
318
|
|
319
|
-
result[:mb_address] = value & 0x010 == 0x010 ? 3 : 4
|
319
|
+
result[:mb_address] = (value & 0x010 == 0x010) ? 3 : 4
|
320
320
|
result[:sw1_2] = value & 0x020 == 0x020 # future use # rubocop:disable Naming/VariableNumber
|
321
321
|
result[:sw1_3] = value & 0x040 == 0x040 # future use # rubocop:disable Naming/VariableNumber
|
322
322
|
result[:accessory_relay2] = if value & 0x080 == 0x080 && value & 0x100 == 0x100
|
@@ -387,7 +387,7 @@ module Aurora
|
|
387
387
|
return :off if value == 0x7fff
|
388
388
|
|
389
389
|
result = {
|
390
|
-
mode: value & 0x100 == 0x100 ? :cooling : :heating
|
390
|
+
mode: (value & 0x100 == 0x100) ? :cooling : :heating
|
391
391
|
}
|
392
392
|
result[:aux_heat] = true if value & 0x200 == 0x200
|
393
393
|
result[:compressor_speed] = value & 0xf
|
@@ -464,7 +464,7 @@ module Aurora
|
|
464
464
|
result = {
|
465
465
|
call: CALLS[(v >> 1) & 0x7],
|
466
466
|
mode: HEATING_MODE[(v >> 8) & 0x03],
|
467
|
-
damper: v & 0x10 == 0x10 ? :open : :closed
|
467
|
+
damper: (v & 0x10 == 0x10) ? :open : :closed
|
468
468
|
}
|
469
469
|
if prior_v
|
470
470
|
carry = prior_v.is_a?(Hash) ? prior_v[:heating_target_temperature_carry] : v & 0x01
|
@@ -479,7 +479,7 @@ module Aurora
|
|
479
479
|
def zone_configuration3(value)
|
480
480
|
size = (value >> 3) & 0x3
|
481
481
|
result = {
|
482
|
-
zone_priority: (value & 0x20) == 0x20 ? :economy : :comfort,
|
482
|
+
zone_priority: ((value & 0x20) == 0x20) ? :economy : :comfort,
|
483
483
|
zone_size: ZONE_SIZES[size],
|
484
484
|
normalized_size: value >> 8
|
485
485
|
}
|
@@ -944,7 +944,7 @@ module Aurora
|
|
944
944
|
value_proc = REGISTER_CONVERTERS.find { |(_, z)| z.include?(k) }&.first
|
945
945
|
next unless value_proc
|
946
946
|
|
947
|
-
value = value_proc.arity == 2 ? value_proc.call(registers, k) : value_proc.call(v)
|
947
|
+
value = (value_proc.arity == 2) ? value_proc.call(registers, k) : value_proc.call(v)
|
948
948
|
registers[k] = value
|
949
949
|
end
|
950
950
|
registers
|
@@ -981,7 +981,7 @@ module Aurora
|
|
981
981
|
format = REGISTER_FORMATS.find { |(_, z)| z.include?(k) }&.first || "%s"
|
982
982
|
format = "%1$d (0x%1$04x)" unless name
|
983
983
|
|
984
|
-
value = value_proc.arity == 2 ? value_proc.call(registers, k) : value_proc.call(value)
|
984
|
+
value = (value_proc.arity == 2) ? value_proc.call(registers, k) : value_proc.call(value)
|
985
985
|
value = value.join(", ") if value.is_a?(Array)
|
986
986
|
value = format(format, value) if value
|
987
987
|
|
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.8
|
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: 2023-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ccutrer-serialport
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '0.1'
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.1.
|
36
|
+
version: 0.1.5
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0.1'
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.1.
|
46
|
+
version: 0.1.5
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: net-telnet-rfc2217
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,11 +165,11 @@ dependencies:
|
|
165
165
|
description:
|
166
166
|
email: cody@cutrer.us'
|
167
167
|
executables:
|
168
|
+
- aurora_fetch
|
169
|
+
- aurora_mock
|
168
170
|
- aurora_monitor
|
169
171
|
- aurora_mqtt_bridge
|
170
172
|
- web_aid_tool
|
171
|
-
- aurora_mock
|
172
|
-
- aurora_fetch
|
173
173
|
extensions: []
|
174
174
|
extra_rdoc_files: []
|
175
175
|
files:
|
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
218
|
- !ruby/object:Gem::Version
|
219
219
|
version: '0'
|
220
220
|
requirements: []
|
221
|
-
rubygems_version: 3.
|
221
|
+
rubygems_version: 3.3.7
|
222
222
|
signing_key:
|
223
223
|
specification_version: 4
|
224
224
|
summary: Library for communication with WaterFurnace Aurora control systems
|