somfy_sdn 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/somfy_sdn +1 -1
- data/lib/sdn/cli/mqtt.rb +12 -9
- data/lib/sdn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e5c2c8156980740a28a35f3709e51175fa7df14206b88e636f1e5a4eecf8630
|
4
|
+
data.tar.gz: d1fa621ba70dc475755996b6d0c66621953675a4bc9725a840d530facf51a6ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b09021cb98f1b1c7bc88c42d0b93d6e2da5115bd6d36ebdd69d6af36101857ad3844f77915b5ca706245d8feb468f920529642f46186c2b3583d56cea85482e
|
7
|
+
data.tar.gz: d0cf5c1d5cf0fc2edffdec548ee41122f49e2bab5454296084c2f61e068137f0cccdfe394809d6efafec8e282903046a1174cc47e89867643a86ba9573684727
|
data/exe/somfy_sdn
CHANGED
@@ -60,7 +60,7 @@ class SomfySDNCLI < Thor
|
|
60
60
|
|
61
61
|
def handle_global_options(port)
|
62
62
|
SDN.logger = Logger.new(options[:log]) if options[:log]
|
63
|
-
SDN.logger.level = options[:verbose] || options[:trace] ? :debug : :info
|
63
|
+
SDN.logger.level = (options[:verbose] || options[:trace]) ? :debug : :info
|
64
64
|
|
65
65
|
SDN::Client.new(port).tap { |sdn| sdn.trace = options[:trace] }
|
66
66
|
end
|
data/lib/sdn/cli/mqtt.rb
CHANGED
@@ -311,8 +311,8 @@ module SDN
|
|
311
311
|
# message priorities are:
|
312
312
|
# 0 - control
|
313
313
|
# 1 - follow-up (i.e. get position after control)
|
314
|
-
# 2 - get
|
315
|
-
# 3 - get
|
314
|
+
# 2 - get motor limits
|
315
|
+
# 3 - get motor info
|
316
316
|
# 4 - get group 1
|
317
317
|
# 5 - get ip 1
|
318
318
|
# 6 - get group 2
|
@@ -323,24 +323,27 @@ module SDN
|
|
323
323
|
# The Group and IP sorting makes it so you quickly get the most commonly used group
|
324
324
|
# and IP addresses, while the almost-never-used ones are pushed to the bottom of the list
|
325
325
|
|
326
|
-
@queue.push(MessageAndRetries.new(Message::GetNodeLabel.new(sdn_addr), 5,
|
326
|
+
@queue.push(MessageAndRetries.new(Message::GetNodeLabel.new(sdn_addr), 5, 3))
|
327
327
|
|
328
328
|
case node_type
|
329
329
|
when :st30, 0x20 # no idea why 0x20, but that's what I get
|
330
|
-
@queue.push(MessageAndRetries.new(Message::GetMotorStatus.new(sdn_addr), 5, 2))
|
331
330
|
@queue.push(MessageAndRetries.new(Message::GetMotorLimits.new(sdn_addr), 5, 2))
|
331
|
+
@queue.push(MessageAndRetries.new(Message::GetMotorStatus.new(sdn_addr), 5, 3))
|
332
332
|
@queue.push(MessageAndRetries.new(Message::GetMotorDirection.new(sdn_addr), 5, 3))
|
333
333
|
@queue.push(MessageAndRetries.new(Message::GetMotorRollingSpeed.new(sdn_addr), 5, 3))
|
334
|
-
(1..16).each
|
335
|
-
|
334
|
+
(1..16).each do |ip|
|
335
|
+
@queue.push(MessageAndRetries.new(Message::GetMotorIP.new(sdn_addr, ip), 5, (2 * ip) + 3))
|
336
|
+
end
|
336
337
|
when :st50ilt2
|
337
|
-
@queue.push(MessageAndRetries.new(Message::ILT2::GetMotorSettings.new(sdn_addr), 5, 2))
|
338
338
|
@queue.push(MessageAndRetries.new(Message::ILT2::GetMotorPosition.new(sdn_addr), 5, 2))
|
339
|
+
@queue.push(MessageAndRetries.new(Message::ILT2::GetMotorSettings.new(sdn_addr), 5, 3))
|
339
340
|
(1..16).each do |ip|
|
340
|
-
@queue.push(MessageAndRetries.new(Message::ILT2::GetMotorIP.new(sdn_addr, ip), 5, 2 * ip + 3))
|
341
|
+
@queue.push(MessageAndRetries.new(Message::ILT2::GetMotorIP.new(sdn_addr, ip), 5, (2 * ip) + 3))
|
341
342
|
end
|
342
343
|
end
|
343
|
-
(1..16).each
|
344
|
+
(1..16).each do |g|
|
345
|
+
@queue.push(MessageAndRetries.new(Message::GetGroupAddr.new(sdn_addr, g), 5, (2 * g) + 2))
|
346
|
+
end
|
344
347
|
|
345
348
|
@cond.signal
|
346
349
|
end
|
data/lib/sdn/version.rb
CHANGED