waterfurnace_aurora 0.6.0 → 0.6.4
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 +4 -0
- data/exe/aurora_monitor +4 -0
- data/exe/aurora_mqtt_bridge +7 -4
- data/exe/web_aid_tool +8 -0
- data/lib/aurora/blower.rb +7 -14
- data/lib/aurora/humidistat.rb +6 -5
- data/lib/aurora/modbus/server.rb +3 -3
- data/lib/aurora/mqtt_modbus.rb +1 -1
- data/lib/aurora/registers.rb +1 -1
- data/lib/aurora/version.rb +1 -1
- metadata +12 -8
- data/exe/grab_awl_assets.sh +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa7915f9b848e8cea608787f628b077e7fc2d5904044581758099db9a3b26742
|
4
|
+
data.tar.gz: ecf97a652368c8ed73d6bffdea6d1961e1cbb85c0587e50ba5211735368fb7b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8b861192fcb395fbec9643840b9b91aaa3d42193d55efda03812d10114a3f4e076afc2eb79a6294bc89a0e340bd5c14f3f2e2fca25e6d1eefa32c9bff359a20
|
7
|
+
data.tar.gz: a35c95acd756183eb2bd2af220e65a182a2206b054453fb49c0e550d512831328d74f72df8e46aec118824efd581fd26e04374b67dbc7898b07f9a964d1123d8
|
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
|
data/exe/aurora_mqtt_bridge
CHANGED
@@ -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
|
@@ -162,9 +166,8 @@ class MQTTBridge
|
|
162
166
|
end
|
163
167
|
|
164
168
|
@blower = @homie.node("blower", "Blower", @abc.blower.type) do |node|
|
165
|
-
|
166
|
-
|
167
|
-
else
|
169
|
+
node.property("running", "Blower is running", :boolean, @abc.blower.running?)
|
170
|
+
if @abc.blower.respond_to?(:speed)
|
168
171
|
node.property("speed", "Current blower speed", :integer, @abc.blower.speed, format: @abc.blower.speed_range)
|
169
172
|
end
|
170
173
|
node.property("watts", "Energy Usage", :integer, @abc.blower.watts, unit: "W") if @abc.energy_monitoring?
|
@@ -228,7 +231,7 @@ class MQTTBridge
|
|
228
231
|
|
229
232
|
@humidistat = @homie.node("humidistat", "Humidistat", "Humidistat") do |node|
|
230
233
|
node.property("relative-humidity", "Relative Humidity", :integer, @abc.humidistat.relative_humidity,
|
231
|
-
|
234
|
+
unit: "%", format: 0..100)
|
232
235
|
if @abc.humidistat.humidifier?
|
233
236
|
node.property("humidifier-running", "Humidifier is running", :boolean, @abc.humidistat.humidifier_running?)
|
234
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
|
@@ -116,3 +120,7 @@ get "/request.cgi" do
|
|
116
120
|
|
117
121
|
encode_result(result)
|
118
122
|
end
|
123
|
+
|
124
|
+
# can't rely on this running automatically when we're installed as a gem,
|
125
|
+
# because the wrapper script will confuse it
|
126
|
+
Sinatra::Application.run!
|
data/lib/aurora/blower.rb
CHANGED
@@ -4,8 +4,9 @@ require "aurora/component"
|
|
4
4
|
|
5
5
|
module Aurora
|
6
6
|
module Blower
|
7
|
-
class
|
8
|
-
attr_reader :type, :watts
|
7
|
+
class PSC < Component
|
8
|
+
attr_reader :type, :watts, :running
|
9
|
+
alias running? running
|
9
10
|
|
10
11
|
def initialize(abc, type)
|
11
12
|
super(abc)
|
@@ -22,19 +23,11 @@ module Aurora
|
|
22
23
|
|
23
24
|
def refresh(registers)
|
24
25
|
@watts = registers[1148] if abc.energy_monitoring?
|
26
|
+
@running = registers[30].include?(:blower)
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
28
|
-
class
|
29
|
-
attr_reader :running
|
30
|
-
alias running? running
|
31
|
-
|
32
|
-
def refresh(registers)
|
33
|
-
@running = registers[30].include?(:g)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
class FiveSpeed < GenericBlower
|
30
|
+
class FiveSpeed < PSC
|
38
31
|
attr_reader :speed
|
39
32
|
|
40
33
|
def speed_range
|
@@ -49,7 +42,7 @@ module Aurora
|
|
49
42
|
3
|
50
43
|
elsif outputs.include?(:cc)
|
51
44
|
2
|
52
|
-
elsif outputs.include?(:
|
45
|
+
elsif outputs.include?(:blower)
|
53
46
|
1
|
54
47
|
else
|
55
48
|
0
|
@@ -57,7 +50,7 @@ module Aurora
|
|
57
50
|
end
|
58
51
|
end
|
59
52
|
|
60
|
-
class ECM <
|
53
|
+
class ECM < PSC
|
61
54
|
attr_reader :speed, :blower_only_speed, :low_compressor_speed, :high_compressor_speed, :aux_heat_speed,
|
62
55
|
:iz2_desired_speed
|
63
56
|
|
data/lib/aurora/humidistat.rb
CHANGED
@@ -42,9 +42,10 @@ module Aurora
|
|
42
42
|
@dehumidifer_running = dehumidifier? && outputs.include?(:accessory2)
|
43
43
|
|
44
44
|
base = abc.iz2? ? 31_109 : 12_309
|
45
|
-
|
46
|
-
@
|
47
|
-
@
|
45
|
+
humidifier_settings_register = abc.iz2? ? 21_114 : 12_309
|
46
|
+
@humidifier_settings = registers[humidifier_settings_register]&.last&.[](2..-1)&.to_i(16)
|
47
|
+
@humidifier_mode = registers[humidifier_settings_register]&.include?(:auto_humidification) ? :auto : :manual
|
48
|
+
@dehumidifier_mode = registers[humidifier_settings_register]&.include?(:auto_dehumidification) ? :auto : :manual
|
48
49
|
|
49
50
|
@humidification_target = registers[base + 1]&.[](:humidification_target)
|
50
51
|
@dehumidification_target = registers[base + 1]&.[](:dehumidification_target)
|
@@ -64,7 +65,7 @@ module Aurora
|
|
64
65
|
|
65
66
|
# start with the prior value of the register, since I'm not sure what
|
66
67
|
# else is stuffed in there
|
67
|
-
raw_value = @humidifier_settings
|
68
|
+
raw_value = @humidifier_settings
|
68
69
|
raw_value |= 0x4000 if humidifier_mode == :auto
|
69
70
|
raw_value |= 0x8000 if dehumidifier_mode == :auto
|
70
71
|
holding_registers[abc.iz2? ? 21_114 : 12_309] = raw_value
|
@@ -84,7 +85,7 @@ module Aurora
|
|
84
85
|
raise ArgumentError unless (15..50).include?(humidification_target)
|
85
86
|
raise ArgumentError unless (35..65).include?(dehumidification_target)
|
86
87
|
|
87
|
-
holding_registers[iz2? ? 21_115 : 12_310] = (humidification_target << 8) + dehumidification_target
|
88
|
+
holding_registers[abc.iz2? ? 21_115 : 12_310] = (humidification_target << 8) + dehumidification_target
|
88
89
|
@humidification_target = humidification_target
|
89
90
|
@dehumidification_target = dehumidification_target
|
90
91
|
end
|
data/lib/aurora/modbus/server.rb
CHANGED
@@ -10,20 +10,20 @@ module Aurora
|
|
10
10
|
return unless ((req.length - 1) % 4).zero?
|
11
11
|
|
12
12
|
params = []
|
13
|
-
req[1
|
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
|
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
|
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
|
data/lib/aurora/mqtt_modbus.rb
CHANGED
data/lib/aurora/registers.rb
CHANGED
@@ -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)
|
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: 0.6.
|
4
|
+
version: 0.6.4
|
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-
|
11
|
+
date: 2021-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ccutrer-serialport
|
@@ -30,14 +30,20 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.4
|
33
|
+
version: '1.4'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 1.4.5
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.4
|
43
|
+
version: '1.4'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.4.5
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: net-telnet-rfc2217
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,7 +123,6 @@ dependencies:
|
|
117
123
|
description:
|
118
124
|
email: cody@cutrer.com'
|
119
125
|
executables:
|
120
|
-
- grab_awl_assets.sh
|
121
126
|
- aurora_monitor
|
122
127
|
- aurora_mqtt_bridge
|
123
128
|
- web_aid_tool
|
@@ -130,7 +135,6 @@ files:
|
|
130
135
|
- exe/aurora_mock
|
131
136
|
- exe/aurora_monitor
|
132
137
|
- exe/aurora_mqtt_bridge
|
133
|
-
- exe/grab_awl_assets.sh
|
134
138
|
- exe/web_aid_tool
|
135
139
|
- lib/aurora.rb
|
136
140
|
- lib/aurora/abc_client.rb
|
@@ -150,7 +154,7 @@ files:
|
|
150
154
|
- lib/aurora/thermostat.rb
|
151
155
|
- lib/aurora/version.rb
|
152
156
|
- lib/waterfurnace_aurora.rb
|
153
|
-
homepage: https://github.com/ccutrer/
|
157
|
+
homepage: https://github.com/ccutrer/waterfurnace_aurora
|
154
158
|
licenses:
|
155
159
|
- MIT
|
156
160
|
metadata: {}
|
@@ -162,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
166
|
requirements:
|
163
167
|
- - ">="
|
164
168
|
- !ruby/object:Gem::Version
|
165
|
-
version: '2.
|
169
|
+
version: '2.5'
|
166
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
171
|
requirements:
|
168
172
|
- - ">="
|
data/exe/grab_awl_assets.sh
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
mkdir -p html
|
4
|
-
mkdir -p html/css
|
5
|
-
mkdir -p html/js
|
6
|
-
mkdir -p html/images
|
7
|
-
|
8
|
-
IP=${1:-172.20.10.1}
|
9
|
-
|
10
|
-
curl http://$IP/ > html/index.htm
|
11
|
-
curl http://$IP/config.htm > html/config.htm
|
12
|
-
curl http://$IP/favicon.ico > html/favicon.ico
|
13
|
-
curl http://$IP/css/index.css > html/css/index.css
|
14
|
-
curl http://$IP/css/phone.css > html/css/phone.css
|
15
|
-
curl http://$IP/js/indexc.js > html/js/indexc.js
|
16
|
-
curl http://$IP/js/configc.js > html/js/configc.js
|
17
|
-
curl http://$IP/images/aurora.png > html/images/aurora.png
|
18
|
-
curl http://$IP/images/back.png > html/images/back.png
|
19
|
-
curl http://$IP/images/cfailed.png > html/images/cfailed.png
|
20
|
-
curl http://$IP/images/cgood.png > html/images/cgood.png
|
21
|
-
curl http://$IP/images/cidle.png > html/images/cidle.png
|