hacky_hal 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -36,6 +36,9 @@ Raspberry Pi works great).
36
36
  You'd then attach any serial port devices to that computer. You could then
37
37
  create a mobile app to control the server. See the examples directory.
38
38
 
39
+ See my [HackyHAL remote example repository](https://github.com/nickewing/hacky_hal_remote_example)
40
+ for example usage.
41
+
39
42
  Can I contribue?
40
43
  ----------------
41
44
  Please do! It would be great to see this library grow to support many more
data/hacky_hal.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "hacky_hal"
5
- gem.version = "0.2.1"
5
+ gem.version = "0.2.2"
6
6
 
7
7
  gem.authors = ["Nick Ewing"]
8
8
  gem.email = ["nick@nickewing.net"]
@@ -153,6 +153,17 @@ module HackyHAL
153
153
  put_request("<Main_Zone><Volume><Mute>#{value}</Mute></Volume></Main_Zone>")
154
154
  end
155
155
 
156
+ def sound_program
157
+ response = get_request("<Main_Zone><Surround><Program_Sel><Current>GetParam</Current></Program_Sel></Surround></Main_Zone>")
158
+ response.elements["YAMAHA_AV/Main_Zone/Surround/Program_Sel/Current/Sound_Program"].text
159
+ end
160
+
161
+ def sound_program=(program_name)
162
+ response = put_request("<Main_Zone><Surround><Program_Sel><Current><Sound_Program>#{program_name}</Sound_Program></Current></Program_Sel></Surround></Main_Zone>")
163
+ puts response
164
+ # response.elements["YAMAHA_AV/Main_Zone/Surround/Program_Sel/Current/Sound_Program"].text
165
+ end
166
+
156
167
  private
157
168
 
158
169
  def request(body)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hacky_hal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-25 00:00:00.000000000 Z
12
+ date: 2013-12-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: upnp-nickewing