waterfurnace_aurora 1.4.6 → 1.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 905c1f1482c71537925ed6927d9be1d28ed66a4bea6227021f8b43fe0f96f0d8
4
- data.tar.gz: 33d2171f7fd097556fb0c3f8c438edebb222029ecf8a810917d92388cace49c0
3
+ metadata.gz: 3818cdd3c436ede6d451b02220702b2e27ab5c904deed2258b0329e3ddfc85c2
4
+ data.tar.gz: 7770c14ff60b4bcc3f3614d57986233cb414b35bbae4857ff7726ca68c3c1796
5
5
  SHA512:
6
- metadata.gz: bf6e1aca58046b0b8f7a35d390c6461a130437457b445510658798c304830aad95239573e286587fed55bfb8d962e03ef9ae98d46cd3425b084616061b393287
7
- data.tar.gz: 3afb644427cf483bf7bc77de0b49b6a00236d416afc46bb3ec9d2cd5c1eb6ee9fbd3783d8588ee025545b842bc95ea46afad3e1f9dc5af2873aa3c88c7d36e07
6
+ metadata.gz: e1d2e8b8a571068f5f905b7bb16ccb53414df338b9bbaf3c39f162015bd3a6dd95ea6fa9067db7a8342e099c6e99ce1311477823348b97da989847b690a0f470
7
+ data.tar.gz: 16d8ca6f18aae43bbd4d87b286b4a07da01be0e39a2c10d5e99857b46495ed3cc683692b9d8f553683606716225dbf763592f7812fe6deb80245cffd9dfbb920
@@ -199,7 +199,7 @@ module Aurora
199
199
  @entering_air_register = awl_axb? ? 740 : 567
200
200
  @registers_to_read = [6, 19..20, 25, 30..31, 112, 344, @entering_air_register]
201
201
  @registers_to_read << 1104 if axb?
202
- @registers_to_read.concat([741, 31_003]) if awl_communicating?
202
+ @registers_to_read.push(741, 31_003) if awl_communicating?
203
203
  @registers_to_read << (1110..1111) if performance_monitoring?
204
204
  @registers_to_read << (1150..1153) if energy_monitoring?
205
205
  @registers_to_read << 900 if awl_axb?
@@ -211,7 +211,7 @@ module Aurora
211
211
  @registers_to_read.concat(component.registers_to_read)
212
212
  end
213
213
  # need dehumidify mode to calculate final current mode
214
- @registers_to_read.concat([362]) if compressor.is_a?(Compressor::VSDrive)
214
+ @registers_to_read.push(362) if compressor.is_a?(Compressor::VSDrive)
215
215
  end
216
216
 
217
217
  def query_registers(query)
@@ -315,11 +315,11 @@ module Aurora
315
315
  value = 0
316
316
  value = 0x7fff if mode == :off
317
317
  value |= 0x100 if mode == :cooling
318
- value |= blower_speed == :with_compressor ? 0xf0 : (blower_speed << 4)
318
+ value |= (blower_speed == :with_compressor) ? 0xf0 : (blower_speed << 4)
319
319
  value |= 0x200 if aux_heat
320
320
 
321
321
  @modbus_slave.holding_registers[3002] = value
322
- @modbus_slave.holding_registers[323] = pump_speed == :with_compressor ? 0x7fff : pump_speed
322
+ @modbus_slave.holding_registers[323] = (pump_speed == :with_compressor) ? 0x7fff : pump_speed
323
323
  end
324
324
 
325
325
  # I'm not sure if this is correct. 5 Series documentation says
@@ -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.concat([1109, 1134, 1154..1157]) if abc.refrigeration_monitoring?
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
@@ -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.concat([65, 66, 67, 68])
79
+ ModBus::Server::Funcs.push(65, 66, 67, 68)
data/lib/aurora/pump.rb CHANGED
@@ -15,7 +15,7 @@ module Aurora
15
15
 
16
16
  def registers_to_read
17
17
  result = [1117]
18
- result.concat([1164..1165]) if abc.energy_monitoring?
18
+ result.push(1164..1165) if abc.energy_monitoring?
19
19
  result
20
20
  end
21
21
 
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aurora
4
- VERSION = "1.4.6"
4
+ VERSION = "1.4.7"
5
5
  end
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.6
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-04 00:00:00.000000000 Z
11
+ date: 2023-08-12 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.3
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.3
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.1.2
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