waterfurnace_aurora 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc02021d49b86596b6f1d40c244b3e3671280c578cc9cd869fc936f2c219a0bf
4
- data.tar.gz: 795aa42ff626534a4750eb181e5299f82d0603f677a6b9d1fb2d8418046643c6
3
+ metadata.gz: 2e4165620d720c36045b8f8aa29a553d6de03aa555ac9083f5491ea47087ee4b
4
+ data.tar.gz: 8532386c1f010471d2d99a2318540eada6a9aa670f9efd1251f632c2db12c11d
5
5
  SHA512:
6
- metadata.gz: 978a3a910d919a85a79f1d272ecec65b68908472492e25dcc8f7bc8f1ddc414f82ef1c22268e092ce026c0dbb90f48c73e9ede9f30144df3f2978fb5abf70b6b
7
- data.tar.gz: 93336e684ab033ca48539738634e8835deffaac4fb5c7275269086e21a134f1f5ad2793c4ae859a806c385dec88811ed720ec837dda0c5f7cd4a068e24cb3338
6
+ metadata.gz: 023b5180a5a35524670d954be623a6b806d0be96070eb26c6820277544948316583d4b698843bd937f8e0c583f933398dcb6a0c91356872967092cfcb6ff4955
7
+ data.tar.gz: 15033ae835c70fc3532ddaadef932e0498bb8504938066cfd9fbfca494772b5642f6e21b6483ca52499db5baf506d03aeb458b3a1cf899970eb128fd8fc4cf26
data/exe/aurora_fetch CHANGED
@@ -15,6 +15,10 @@ options = OptionParser.new do |opts|
15
15
 
16
16
  opts.on("--debug-modbus", "Print actual protocol bytes") { debug_modbus = true }
17
17
  opts.on("-y", "--yaml", "Output raw values as YAML") { yaml = true }
18
+ opts.on("-v", "--version", "Print version") do
19
+ puts Aurora::VERSION
20
+ exit
21
+ end
18
22
  opts.on("-h", "--help", "Prints this help") do
19
23
  puts opts
20
24
  exit
data/exe/aurora_monitor CHANGED
@@ -22,6 +22,10 @@ options = OptionParser.new do |opts|
22
22
  opts.on("--debug-modbus", "Print actual protocol bytes") { debug_modbus = true }
23
23
  opts.on("--ignore-awl-heartbeat", "Don't print AWL heartbeat requests") { ignore_awl_heartbeat = true }
24
24
  opts.on("--ignore-sensors", "Don't print sensor registers (i.e. because they change a lot)") { ignore_sensors = true }
25
+ opts.on("-v", "--version", "Print version") do
26
+ puts Aurora::VERSION
27
+ exit
28
+ end
25
29
  opts.on("-h", "--help", "Prints this help") do
26
30
  puts opts
27
31
  exit
@@ -15,6 +15,10 @@ options = OptionParser.new do |opts|
15
15
  opts.banner = "Usage: aurora_mqtt_bridge /path/to/serial/port [options]"
16
16
 
17
17
  opts.on("--debug-modbus", "Print actual protocol bytes") { debug_modbus = true }
18
+ opts.on("-v", "--version", "Print version") do
19
+ puts Aurora::VERSION
20
+ exit
21
+ end
18
22
  opts.on("-h", "--help", "Prints this help") do
19
23
  puts opts
20
24
  exit
@@ -227,7 +231,7 @@ class MQTTBridge
227
231
 
228
232
  @humidistat = @homie.node("humidistat", "Humidistat", "Humidistat") do |node|
229
233
  node.property("relative-humidity", "Relative Humidity", :integer, @abc.humidistat.relative_humidity,
230
- unit: "%", format: 0..100)
234
+ unit: "%", format: 0..100)
231
235
  if @abc.humidistat.humidifier?
232
236
  node.property("humidifier-running", "Humidifier is running", :boolean, @abc.humidistat.humidifier_running?)
233
237
  node.property("humidifier-mode", "Humidifier Mode", :enum, @abc.humidistat.humidifier_mode,
data/exe/web_aid_tool CHANGED
@@ -14,6 +14,10 @@ options = OptionParser.new do |opts|
14
14
 
15
15
  opts.on("--debug-modbus", "Print actual protocol bytes") { debug_modbus = true }
16
16
  opts.on("--monitor", "Print interpreted registers as they are requested, like aurora_monitor") { monitor = true }
17
+ opts.on("-v", "--version", "Print version") do
18
+ puts Aurora::VERSION
19
+ exit
20
+ end
17
21
  opts.on("-h", "--help", "Prints this help") do
18
22
  puts opts
19
23
  exit
@@ -43,7 +43,7 @@ module Aurora
43
43
 
44
44
  base = abc.iz2? ? 31_109 : 12_309
45
45
  humidifier_settings_register = abc.iz2? ? 21_114 : 12_309
46
- @humidifier_settings = registers[humidifier_settings_register]&.last&.[](2..)&.to_i(16)
46
+ @humidifier_settings = registers[humidifier_settings_register]&.last&.[](2..-1)&.to_i(16)
47
47
  @humidifier_mode = registers[humidifier_settings_register]&.include?(:auto_humidification) ? :auto : :manual
48
48
  @dehumidifier_mode = registers[humidifier_settings_register]&.include?(:auto_dehumidification) ? :auto : :manual
49
49
 
@@ -10,20 +10,20 @@ module Aurora
10
10
  return unless ((req.length - 1) % 4).zero?
11
11
 
12
12
  params = []
13
- req[1..].unpack("n*").each_slice(2) do |(addr, quant)|
13
+ req[1..-1].unpack("n*").each_slice(2) do |(addr, quant)|
14
14
  params << { addr: addr, quant: quant }
15
15
  end
16
16
  params
17
17
  when 66
18
18
  return unless ((req.length - 1) % 2).zero?
19
19
 
20
- req[1..].unpack("n*")
20
+ req[1..-1].unpack("n*")
21
21
  when 67
22
22
  # 1 function register, a multiple of two words
23
23
  return unless ((req.length - 1) % 4).zero?
24
24
 
25
25
  params = []
26
- req[1..].unpack("n*").each_slice(2) do |(addr, val)|
26
+ req[1..-1].unpack("n*").each_slice(2) do |(addr, val)|
27
27
  params << { addr: addr, val: val }
28
28
  end
29
29
  params
@@ -11,7 +11,7 @@ module Aurora
11
11
  @mqtt = MQTT::Client.new(uri)
12
12
  @mqtt.connect
13
13
 
14
- @base_topic = uri.path[1..]
14
+ @base_topic = uri.path[1..-1]
15
15
  @mqtt.subscribe("#{@base_topic}/getregs/response")
16
16
  end
17
17
 
@@ -186,7 +186,7 @@ module Aurora
186
186
  "RPM Sensor Signal Fault" => (78..82),
187
187
  "Under-Voltage Stop" => (83..87),
188
188
  "Rotor Locked" => (88..92),
189
- "Standby" => (93..)
189
+ "Standby" => (93..99) # should be infinite, but ruby 2.5 doesn't support it
190
190
  }.freeze
191
191
 
192
192
  def vs_fault(value)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aurora
4
- VERSION = "0.6.1"
4
+ VERSION = "0.6.2"
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: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-02 00:00:00.000000000 Z
11
+ date: 2021-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ccutrer-serialport
@@ -150,7 +150,7 @@ files:
150
150
  - lib/aurora/thermostat.rb
151
151
  - lib/aurora/version.rb
152
152
  - lib/waterfurnace_aurora.rb
153
- homepage: https://github.com/ccutrer/waterfurnace
153
+ homepage: https://github.com/ccutrer/waterfurnace_aurora
154
154
  licenses:
155
155
  - MIT
156
156
  metadata: {}
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - ">="
164
164
  - !ruby/object:Gem::Version
165
- version: '2.6'
165
+ version: '2.5'
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - ">="