siriproxy-samsungremote 0.1.1 → 0.1.2

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.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "siriproxy-samsungremote"
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Steve Kingsley"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.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 "MUTE"
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
- puts part1
56
- s.send(part1, part1.length)
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, part2.length)
58
+ s.send(part2, 0)
64
59
 
65
60
  #Send remote key
66
- # key = "KEY_" + command;
67
- # puts key
68
- # say "Sending #{command}"
69
- # messagepart3 = 00.chr + 00.chr + 00.chr + Base64.encode64(key).length.chr + 00.chr + Base64.encode64(key)
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
- # s.close # Close the socket when done
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.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: -4369213998295026125
93
+ hash: 4471368945284464014
94
94
  segments:
95
95
  - 0
96
96
  version: "0"