rsmp 0.17.2 → 0.17.4

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: 1b1e7b64edaac39cb76f67bc47625a0af95688d70a50b84ec8692cc645bc2bfd
4
- data.tar.gz: 25ef625f7effbd9e50112f9495cb5511f17f06465e75325c1f324cf4810db19c
3
+ metadata.gz: 17b5f6f4b2a3b5c9280497906b2111d7739956f2fdb08b1052b919b77e9d093f
4
+ data.tar.gz: bab9a1e34d857fb60a15c8c1849dd0e6e24483753d9e5a3052f1ba9f162a0e96
5
5
  SHA512:
6
- metadata.gz: fe2bea264b7d19cf768897e657d784fb150cfb8df759835547eefabf28aa12afce331156e1c58911adaf6dc2efe60c28767d685d96061e52f142350c84f0f3d4
7
- data.tar.gz: c1fb46cd25c0d6ad5312575f9e186580e74bfe8f8bdaf3711fde77f0e7921648781da7e38ea763287c6699661f515d38f80c43c501ad26011ed3c4b475f92d2b
6
+ metadata.gz: ba268e1647b9de5b401a285b462d4f83108266a14eab597bd3203f37a36118ee7952e6eb3ce6edf7bcdac61472337032efaf4073da3b7c7059284b5cd18b3fa8
7
+ data.tar.gz: 5ad8ba86f07b8159c33a47420875d29fecdd02684b16e7ea5c6bb7329f64b4a8b44928347438cef32dc51f2462ece94197ad95c5802d0118b2273d82d633bb86
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsmp (0.17.2)
4
+ rsmp (0.17.4)
5
5
  async (~> 1.30.3)
6
6
  async-io (~> 1.33.0)
7
7
  colorize (~> 0.8.1)
@@ -79,7 +79,7 @@ GEM
79
79
  multi_test (0.1.2)
80
80
  nio4r (2.5.9)
81
81
  rake (13.0.6)
82
- regexp_parser (2.7.0)
82
+ regexp_parser (2.8.0)
83
83
  rsmp_schema (0.4.0)
84
84
  json_schemer (~> 0.2.21)
85
85
  thor (~> 1.2.1)
@@ -70,10 +70,13 @@ module RSMP
70
70
  # Async::IO::Endpoint#connect renames the current task. run in a subtask to avoid this see issue #22
71
71
  @task.async do |task|
72
72
  task.annotate 'socket task'
73
- # this timeout is a workaround for #connect hanging on windows if the other side is not present yet
74
- task.with_timeout 1.1 do
73
+ # this timeout is a workaround for connect hanging on windows if the other side is not present yet
74
+ timeout = @site_settings.dig('timeouts','connect') || 1.1
75
+ task.with_timeout timeout do
75
76
  @socket = @endpoint.connect
76
77
  end
78
+ delay = @site_settings.dig('intervals','after_connect')
79
+ task.sleep delay if delay
77
80
  end.wait
78
81
 
79
82
  @stream = Async::IO::Stream.new(@socket)
@@ -69,6 +69,7 @@ module RSMP
69
69
  @time_int = nil
70
70
  @inputs.reset
71
71
  @signal_priorities = []
72
+ @dynamic_bands_timeout = 0
72
73
  end
73
74
 
74
75
  def dark?
@@ -239,7 +240,7 @@ module RSMP
239
240
  case command_code
240
241
  when 'M0001', 'M0002', 'M0003', 'M0004', 'M0005', 'M0006', 'M0007',
241
242
  'M0012', 'M0013', 'M0014', 'M0015', 'M0016', 'M0017', 'M0018',
242
- 'M0019', 'M0020', 'M0021', 'M0022',
243
+ 'M0019', 'M0020', 'M0021', 'M0022', 'M0023',
243
244
  'M0103', 'M0104'
244
245
 
245
246
  return send("handle_#{command_code.downcase}", arg, options)
@@ -474,6 +475,20 @@ module RSMP
474
475
  end
475
476
  end
476
477
 
478
+ def handle_m0023 arg, options={}
479
+ @node.verify_security_code 2, arg['securityCode']
480
+ timeout = arg['status'].to_i
481
+ unless timeout>=0 and timeout <= 65535
482
+ raise RSMP::MessageRejected.new "Timeout must be in the range 0-65535, got #{timeout}"
483
+ end
484
+ if timeout == 0
485
+ log "Dynamic bands timeout disabled", level: :info
486
+ else
487
+ log "Dynamic bands timeout set to #{timeout}min", level: :info
488
+ end
489
+ @dynamic_bands_timeout = timeout
490
+ end
491
+
477
492
  def handle_m0103 arg, options={}
478
493
  level = {'Level1'=>1,'Level2'=>2}[arg['status']]
479
494
  @node.change_security_code level, arg['oldSecurityCode'], arg['newSecurityCode']
data/lib/rsmp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RSMP
2
- VERSION = "0.17.2"
2
+ VERSION = "0.17.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.2
4
+ version: 0.17.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Tin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-14 00:00:00.000000000 Z
11
+ date: 2023-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async