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 +3 -0
- data/hacky_hal.gemspec +1 -1
- data/lib/hacky_hal/device_controllers/yamaha_av_receiver.rb +11 -0
- metadata +2 -2
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
@@ -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.
|
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-
|
12
|
+
date: 2013-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: upnp-nickewing
|