balboa_worldwide_app 2.1.2 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/bwa_mqtt_bridge +5 -2
- data/lib/bwa/client.rb +6 -6
- data/lib/bwa/message.rb +2 -2
- data/lib/bwa/messages/filter_cycles.rb +7 -2
- data/lib/bwa/messages/set_temperature_scale.rb +2 -2
- data/lib/bwa/messages/status.rb +2 -1
- data/lib/bwa/server.rb +3 -3
- data/lib/bwa/version.rb +1 -1
- metadata +10 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd56f77e48e5a961a32734d10885b194c9caa7fd82f4533b436fda1e4018e731
|
4
|
+
data.tar.gz: 6ff96728945e155dbef1e8663b781d6003bf9b70a0242e810db5125b9d797c0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4054df0eb006e81079253932e82f6e9f3063d2b3f31914349ba194786e232c36c3d6a19a1c7e7e924805cc8f3a2a1b8845f8c59f2c7a7e1160cc31fef5de0b67
|
7
|
+
data.tar.gz: e9cdbab73f7fad4f6a21d20816271ab3f88bb91d7bd85e87b9fab4804e77356a290645fbf7c2fb77281d3bb9a394a5d65f4db5de85f8e1fcdc110e314e4fe79d
|
data/exe/bwa_mqtt_bridge
CHANGED
@@ -115,7 +115,7 @@ class MQTTBridge
|
|
115
115
|
next if speeds.zero?
|
116
116
|
|
117
117
|
property = @homie["spa"]["pump#{i + 1}"]
|
118
|
-
property.value = speeds == 1 ? @bwa.pumps[i] != 0 : @bwa.pumps[i]
|
118
|
+
property.value = (speeds == 1) ? @bwa.pumps[i] != 0 : @bwa.pumps[i]
|
119
119
|
end
|
120
120
|
@bwa.configuration.lights.each_with_index do |exists, i|
|
121
121
|
next unless exists
|
@@ -172,7 +172,10 @@ class MQTTBridge
|
|
172
172
|
@bwa.hold = value
|
173
173
|
end
|
174
174
|
spa.property("priming", "Priming", :boolean, @bwa.priming, hass: { binary_sensor: { icon: "mdi:fast-forward" } })
|
175
|
-
spa.property("notification",
|
175
|
+
spa.property("notification",
|
176
|
+
"Notification",
|
177
|
+
:enum,
|
178
|
+
@bwa.notification || "none",
|
176
179
|
format: BWA::Messages::Status::NOTIFICATIONS.values.compact + ["none"])
|
177
180
|
spa.property("heating-mode",
|
178
181
|
"Heating Mode",
|
data/lib/bwa/client.rb
CHANGED
@@ -42,7 +42,9 @@ module BWA
|
|
42
42
|
@io = TCPSocket.new(uri.host, uri.port || 4257)
|
43
43
|
when "telnet", "rfc2217"
|
44
44
|
require "net/telnet/rfc2217"
|
45
|
-
@io = Net::Telnet::RFC2217.new(
|
45
|
+
@io = Net::Telnet::RFC2217.new(uri.host,
|
46
|
+
port: uri.port || 23,
|
47
|
+
baud: 115_200)
|
46
48
|
@queue = []
|
47
49
|
else
|
48
50
|
require "ccutrer-serialport"
|
@@ -168,14 +170,12 @@ module BWA
|
|
168
170
|
|
169
171
|
desired = 0 if desired == false
|
170
172
|
max_pump_speed = configuration.pumps[index]
|
173
|
+
desired = max_pump_speed if desired == true
|
174
|
+
desired = [desired, max_pump_speed].min
|
171
175
|
|
172
176
|
# turn all pumps off with a single command
|
173
|
-
if desired
|
174
|
-
return toggle_item(:soak)
|
175
|
-
end
|
177
|
+
return toggle_item(:soak) if desired.zero? && configuration.pumps.length == 1 && max_pump_speed != 1
|
176
178
|
|
177
|
-
desired = max_pump_speed if desired == true
|
178
|
-
desired = [desired, max_pump_speed].min
|
179
179
|
current_pump_speed = [status.pumps[index], max_pump_speed].min
|
180
180
|
times = (desired - current_pump_speed) % (max_pump_speed + 1)
|
181
181
|
times.times do |i|
|
data/lib/bwa/message.rb
CHANGED
@@ -64,7 +64,7 @@ module BWA
|
|
64
64
|
BWA.logger.debug "discarding invalid data prior to message #{BWA.raw2str(data[0...offset])}" unless offset.zero?
|
65
65
|
|
66
66
|
src = data[offset + 2].ord
|
67
|
-
klass = @messages.find { |k| k::MESSAGE_TYPE
|
67
|
+
klass = @messages.find { |k| message_type == k::MESSAGE_TYPE }
|
68
68
|
|
69
69
|
if klass
|
70
70
|
valid_length = if klass::MESSAGE_LENGTH.respond_to?(:include?)
|
@@ -102,7 +102,7 @@ module BWA
|
|
102
102
|
else
|
103
103
|
print_hour = hour % 12
|
104
104
|
print_hour = 12 if print_hour.zero?
|
105
|
-
format("%d:%02d%s", print_hour, minute, hour >= 12 ? "PM" : "AM")
|
105
|
+
format("%d:%02d%s", print_hour, minute, (hour >= 12) ? "PM" : "AM")
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
@@ -3,8 +3,13 @@
|
|
3
3
|
module BWA
|
4
4
|
module Messages
|
5
5
|
class FilterCycles < Message
|
6
|
-
attr_accessor :cycle1_start_hour,
|
7
|
-
:
|
6
|
+
attr_accessor :cycle1_start_hour,
|
7
|
+
:cycle1_start_minute,
|
8
|
+
:cycle1_duration,
|
9
|
+
:cycle2_enabled,
|
10
|
+
:cycle2_start_hour,
|
11
|
+
:cycle2_start_minute,
|
12
|
+
:cycle2_duration
|
8
13
|
alias_method :cycle2_enabled?, :cycle2_enabled
|
9
14
|
|
10
15
|
MESSAGE_TYPE = "\xbf\x23".b
|
data/lib/bwa/messages/status.rb
CHANGED
data/lib/bwa/server.rb
CHANGED
@@ -43,7 +43,7 @@ module BWA
|
|
43
43
|
when Messages::ConfigurationRequest
|
44
44
|
send_configuration(socket)
|
45
45
|
when Messages::ControlConfigurationRequest
|
46
|
-
message.type == 1 ? send_control_configuration(socket) : send_control_configuration2(socket)
|
46
|
+
(message.type == 1) ? send_control_configuration(socket) : send_control_configuration2(socket)
|
47
47
|
when Messages::SetTargetTemperature
|
48
48
|
temperature = message.temperature
|
49
49
|
temperature /= 2.0 if @status.temperature_scale == :celsius
|
@@ -53,9 +53,9 @@ module BWA
|
|
53
53
|
when Messages::ToggleItem
|
54
54
|
case message.item
|
55
55
|
when :heating_mode
|
56
|
-
@status.heating_mode = (@status.heating_mode == :rest ? :ready : :rest)
|
56
|
+
@status.heating_mode = ((@status.heating_mode == :rest) ? :ready : :rest)
|
57
57
|
when :temperature_range
|
58
|
-
@status.temperature_range = (@status.temperature_range == :low ? :high : :low)
|
58
|
+
@status.temperature_range = ((@status.temperature_range == :low) ? :high : :low)
|
59
59
|
when :pump1
|
60
60
|
@status.pump1 = (@status.pump1 + 1) % 3
|
61
61
|
when :pump2
|
data/lib/bwa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: balboa_worldwide_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.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:
|
11
|
+
date: 2023-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ccutrer-serialport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: digest-crc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
67
|
+
version: '1.0'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
74
|
+
version: '1.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: sd_notify
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,33 +115,19 @@ dependencies:
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '13.0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
|
-
name: rubocop
|
118
|
+
name: rubocop-inst
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '1
|
123
|
+
version: '1'
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '1
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: rubocop-performance
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '1.12'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '1.12'
|
130
|
+
version: '1'
|
145
131
|
- !ruby/object:Gem::Dependency
|
146
132
|
name: rubocop-rake
|
147
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
199
|
- !ruby/object:Gem::Version
|
214
200
|
version: '0'
|
215
201
|
requirements: []
|
216
|
-
rubygems_version: 3.3.
|
202
|
+
rubygems_version: 3.3.7
|
217
203
|
signing_key:
|
218
204
|
specification_version: 4
|
219
205
|
summary: Library for communication with Balboa Water Group's WiFi module or RS-485
|