somfy_sdn 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sdn/messages/helpers.rb +1 -1
- data/lib/sdn/mqtt_bridge.rb +13 -7
- data/lib/sdn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 339d400e53c19eeaa513328963a29c4abedb1b4f046d096a478b4f07576224fb
|
4
|
+
data.tar.gz: 806e109d0934740ceebfc5ea51112b91073b9782d5fbb3267aac49808f98690a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2b29a899d358c26a2640e359263785354f9eaff371ec5738d4cb78f58352d6e58fc91c24dca7f4445137eb2739e583cd3901ebda81a161f1d49b223e44617ff
|
7
|
+
data.tar.gz: 5bc0d2fee7de84b8d69a6396f03ae4f4d61248b9c109c08f3e7ba1d3e35bc2d0a93e46178ee5c7963efdf6360da43969c9334e83b70ae453abe392743145a5c7
|
data/lib/sdn/messages/helpers.rb
CHANGED
data/lib/sdn/mqtt_bridge.rb
CHANGED
@@ -162,13 +162,19 @@ module SDN
|
|
162
162
|
end
|
163
163
|
|
164
164
|
write_thread = Thread.new do
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
165
|
+
begin
|
166
|
+
loop do
|
167
|
+
message = @write_queue.pop
|
168
|
+
puts "writing #{message.inspect}"
|
169
|
+
@sdn.write(message.serialize)
|
170
|
+
@sdn.flush
|
171
|
+
# give more response time to a discovery message
|
172
|
+
sleep 5 if (message.is_a?(SDN::Message::GetNodeAddr) && message.dest == [0xff, 0xff, 0xff])
|
173
|
+
sleep 0.1
|
174
|
+
end
|
175
|
+
rescue => e
|
176
|
+
puts "failure writing: #{e}"
|
177
|
+
exit 1
|
172
178
|
end
|
173
179
|
end
|
174
180
|
|
data/lib/sdn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: somfy_sdn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serialport
|