savant-echo 2.0.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/src/Savant.rb +27 -22
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8cc4bd34ec332e241f05be05e3057e7162f7edab22db6db4d2ff95de6501d81e
|
4
|
+
data.tar.gz: 0aabb5a062552499d3be527782ece7c4059820a0cea58a690b442dc9cff600a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ceef65f1ffebf4753a11d48928292da59db518c2daa8edaa71fd9d5c50e5a6ca8cdb24095210175651921dbcdb581db14a74f918a36902d10bbf01bef704af8
|
7
|
+
data.tar.gz: c07e61b949661b51e95759ca6c5389e356a735d0cb455dfda2cdcd93dce6ce98c8e147d2b3f7c0ce006ed35f4b860e433c3f9a057dc03d6ec957403c3cfed0cf
|
data/bin/src/Savant.rb
CHANGED
@@ -78,10 +78,10 @@ class Savant #< VR::ListView
|
|
78
78
|
|
79
79
|
@builder["buttonHabridgeStatus"].label = "HA Bridge is Online\nClick to open in browser."
|
80
80
|
@builder["buttonBackupRestore"].show
|
81
|
+
|
81
82
|
if savantVersion?(@savantURL)
|
82
83
|
@builder["buttonSceneSync"].label = "Savant Scene Sync"
|
83
|
-
|
84
|
-
|
84
|
+
@builder["buttonSceneSync"].show
|
85
85
|
end
|
86
86
|
@habridgeStatus = "Online"
|
87
87
|
end
|
@@ -120,11 +120,12 @@ class Savant #< VR::ListView
|
|
120
120
|
login = 'RPM'
|
121
121
|
@password = 'RPM'
|
122
122
|
begin
|
123
|
-
Net::SSH.start(ip, login, :password => @password, :
|
123
|
+
Net::SSH.start(ip, login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
124
124
|
#Check host type and update sclibridge location for reference, though only Pro Host is supported
|
125
125
|
ssh.open_channel do |ch, success|
|
126
126
|
ch.exec("uname")
|
127
127
|
ch.on_data do |ch, data|
|
128
|
+
puts data
|
128
129
|
if data.to_s.include? 'Darwin'
|
129
130
|
@scliBridge = "~/Applications/RacePointMedia/sclibridge "
|
130
131
|
else
|
@@ -149,22 +150,17 @@ class Savant #< VR::ListView
|
|
149
150
|
ssh.loop
|
150
151
|
#parse the rpmSystemInfo.plist from the smart host to get host name
|
151
152
|
elsif @scliBridge == "/usr/local/bin/sclibridge "
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
@str = @scliBridge + "readstate \"" + x[0][1..-1] + ".SoftwareVersion\""
|
164
|
-
end
|
165
|
-
end
|
166
|
-
end
|
167
|
-
ssh.loop
|
153
|
+
# test to see if remote files exist and transfer them if they do
|
154
|
+
fileExists = ssh.exec!("[ -f 'GNUstep/Library/ApplicationSupport/RacePointMedia/rpmSystemInfo.plist' ] && echo 'true' || echo 'false'")
|
155
|
+
unless fileExists == 'false'
|
156
|
+
ssh.scp.download!('GNUstep/Library/ApplicationSupport/RacePointMedia/rpmSystemInfo.plist', '/tmp/')
|
157
|
+
x = `plutil -p /tmp/RPMSystemInfo.plist`
|
158
|
+
x = x.split(%q{"RPMSystemName" => "})
|
159
|
+
x = x[1].split(%q{"})
|
160
|
+
@savantHostName = x[0]
|
161
|
+
@str = @scliBridge + "readstate \'" + @savantHostName + ".SoftwareVersion\'"
|
162
|
+
end
|
163
|
+
alert "Only Pro Hosts are supported."
|
168
164
|
end
|
169
165
|
#Use host name to query SoftwareVersion state from host
|
170
166
|
ssh.open_channel do |ch, success|
|
@@ -174,9 +170,18 @@ class Savant #< VR::ListView
|
|
174
170
|
end
|
175
171
|
end
|
176
172
|
ssh.loop
|
173
|
+
if @version.include?("Deallocating")
|
174
|
+
tmpArray = @version.split("\n")
|
175
|
+
@version = tmpArray[2].chomp
|
176
|
+
end
|
177
177
|
end
|
178
|
+
puts "Host version: " + @version
|
178
179
|
#return true if version is 8.3 or later
|
179
|
-
if @version.
|
180
|
+
if @version.include?("-")
|
181
|
+
tmpArray = @version.split("-")
|
182
|
+
@version = tmpArray[0].chomp
|
183
|
+
end
|
184
|
+
if Gem::Version.new(@version) > Gem::Version.new('8.2.0') && !@version.empty?
|
180
185
|
return true
|
181
186
|
else
|
182
187
|
return false
|
@@ -261,7 +266,7 @@ class Savant #< VR::ListView
|
|
261
266
|
#Check that folder contains correct files
|
262
267
|
if File.file?(backupDir + "/device.db") && File.file?(backupDir + "/habridge.config")
|
263
268
|
begin
|
264
|
-
Net::SSH.start(@savantURL, login, :password => @password, :
|
269
|
+
Net::SSH.start(@savantURL, login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
265
270
|
# test to see if remote folder exists, if so, transfer files and restart harbridge
|
266
271
|
dirExists = ssh.exec!("[ -d ~/habridge/data ] && echo 'true' || echo 'false'")
|
267
272
|
if dirExists == 'true'
|
@@ -291,7 +296,7 @@ class Savant #< VR::ListView
|
|
291
296
|
backupDir = File.dirname(backupDir)
|
292
297
|
end
|
293
298
|
begin
|
294
|
-
Net::SSH.start(@savantURL, login, :password => @password, :
|
299
|
+
Net::SSH.start(@savantURL, login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
295
300
|
# test to see if remote files exist and transfer them if they do
|
296
301
|
fileExists = ssh.exec!("[ -f ~/habridge/data/device.db ] && echo 'true' || echo 'false'")
|
297
302
|
if fileExists == 'true'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: savant-echo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Miller
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir:
|
10
10
|
- bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-12-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: net-scp
|
@@ -75,22 +75,22 @@ dependencies:
|
|
75
75
|
name: require_all
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '1.2'
|
81
78
|
- - ">="
|
82
79
|
- !ruby/object:Gem::Version
|
83
80
|
version: 1.2.0
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.2'
|
84
84
|
type: :runtime
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - "~>"
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '1.2'
|
91
88
|
- - ">="
|
92
89
|
- !ruby/object:Gem::Version
|
93
90
|
version: 1.2.0
|
91
|
+
- - "~>"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '1.2'
|
94
94
|
description: Savant Integration with Amazon Echo
|
95
95
|
email: cmiller@premieresystems.com
|
96
96
|
executables:
|
@@ -127,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
|
-
|
131
|
-
rubygems_version: 2.4.8
|
130
|
+
rubygems_version: 3.0.1
|
132
131
|
signing_key:
|
133
132
|
specification_version: 4
|
134
133
|
summary: Savant Alexa
|