siriproxy-samsungremote 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/SiriProxy-SamsungRemote.gemspec +1 -1
- data/VERSION +1 -1
- data/lib/siriproxy-samsungremote.rb +10 -19
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
@@ -35,7 +35,7 @@ class SiriProxy::Plugin::SamsungRemote < SiriProxy::Plugin
|
|
35
35
|
|
36
36
|
listen_for(/test command/i) do
|
37
37
|
say "About to test"
|
38
|
-
send_command "
|
38
|
+
send_command "VOLUP"
|
39
39
|
say "Command sent"
|
40
40
|
request_completed #always complete your request! Otherwise the phone will "spin" at the user!
|
41
41
|
|
@@ -46,35 +46,26 @@ class SiriProxy::Plugin::SamsungRemote < SiriProxy::Plugin
|
|
46
46
|
|
47
47
|
ipencoded = Base64.encode64(self.myip)
|
48
48
|
macencoded = Base64.encode64(self.mymac)
|
49
|
-
puts ipencoded
|
50
|
-
puts macencoded
|
51
49
|
|
52
50
|
messagepart1 = 0x64.chr + 0x00.chr + ipencoded.length.chr + 0x00.chr + ipencoded + macencoded.length.chr + 0x00.chr + macencoded + Base64.encode64(@@remotename).length.chr + 0x00.chr + Base64.encode64(@@remotename)
|
53
|
-
puts messagepart1
|
54
51
|
part1 = 0x00.chr + @@appstring.length.chr + 0x00.chr + @@appstring + messagepart1.length.chr + 0x00.chr + messagepart1
|
55
|
-
|
56
|
-
s.send(part1,
|
52
|
+
|
53
|
+
s.send(part1, 0)
|
57
54
|
|
58
55
|
messagepart2 = 0xc8.chr + 0x00.chr
|
59
|
-
puts messagepart2
|
60
56
|
part2 = 0x00.chr + @@appstring.length.chr + 0x00.chr + @@appstring + messagepart2.length.chr + 0x00.chr + messagepart2
|
61
|
-
puts part2
|
62
57
|
|
63
|
-
s.send(part2,
|
58
|
+
s.send(part2, 0)
|
64
59
|
|
65
60
|
#Send remote key
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
# part3 = 00.chr + @@tvappstring.length.chr + 00.chr + @@tvappstring + messagepart3.length.chr + 00.chr + messagepart3
|
71
|
-
# s.puts(part3, part3.length)
|
72
|
-
# puts part3
|
61
|
+
key = "KEY_" + command
|
62
|
+
say "Sending #{command}"
|
63
|
+
messagepart3 = 0x00.chr + 0x00.chr + 0x00.chr + Base64.encode64(key).length.chr + 0x00.chr + Base64.encode64(key)
|
64
|
+
part3 = 0x00.chr + @@tvappstring.length.chr + 0x00.chr + @@tvappstring + messagepart3.length.chr + 0x00.chr + messagepart3
|
73
65
|
|
66
|
+
s.send(part3, 0)
|
74
67
|
|
75
|
-
|
68
|
+
s.close # Close the socket when done
|
76
69
|
end
|
77
70
|
|
78
|
-
|
79
|
-
|
80
71
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: siriproxy-samsungremote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Steve Kingsley
|
@@ -90,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
90
90
|
requirements:
|
91
91
|
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
hash:
|
93
|
+
hash: 4471368945284464014
|
94
94
|
segments:
|
95
95
|
- 0
|
96
96
|
version: "0"
|