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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a00033a8ac556f5b578c6d13b678b54393376c1f0439340dbd4afbd4a2376714
4
- data.tar.gz: 1925c30fa53a68f0eb388b0ff277a00a0ae40bf2798a93ba8e9b955139b2c989
3
+ metadata.gz: 1e5c2c8156980740a28a35f3709e51175fa7df14206b88e636f1e5a4eecf8630
4
+ data.tar.gz: d1fa621ba70dc475755996b6d0c66621953675a4bc9725a840d530facf51a6ef
5
5
  SHA512:
6
- metadata.gz: ce9dc75cac82bd65e4fd89908f6e6563761c5171c8dc93ab5b0e40fbe0ce0e0bb1dad7d90ef88470d90a050e7893fb1a35edb589ef2881886bf451d5962a6599
7
- data.tar.gz: b82d6d1d60509009c7ea7b7501bd9790ae16f295185cdd5c125e10754e3a96ab9ef9d8956da8d4af554f88390eb4faea2eb4bfb7d0bb7e71248c23e043bc0338
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 basic motor info
315
- # 3 - get advanced motor info
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, 2))
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 { |ip|
335
- @queue.push(MessageAndRetries.new(Message::GetMotorIP.new(sdn_addr, ip), 5, 2 * ip + 3)) }
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 { |g| @queue.push(MessageAndRetries.new(Message::GetGroupAddr.new(sdn_addr, g), 5, 2 * g + 2)) }
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SDN
4
- VERSION = "2.2.0"
4
+ VERSION = "2.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: somfy_sdn
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer