music_cast 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +55 -1
- data/lib/music_cast/api.rb +1 -0
- data/lib/music_cast/api/get_status.rb +11 -0
- data/lib/music_cast/api/set_power.rb +2 -0
- data/lib/music_cast/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ba0fe27dacbc0c4db860fbb944900440148a7ae74f351f46672f4b3d6528bbb
|
4
|
+
data.tar.gz: 8f1f35ff25230e3cbbe1efe536c4ee371759077647ef4f389b46b57dcb2bec1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 676ee2860bf7b9a3a1db5f3ed4a47af2e617009e2ad580f6607f89fb1f35ec73bb617cc9b2a96d4dcf2b9c1c4d9b61793c8a573dedff100fa21d35b41be5ebd3
|
7
|
+
data.tar.gz: d2671976f0d9e02abba31aaa82668b8ca87a27440a8d660ff85d2717f7b1d037cfece7a4950a5b84600ccf0448b70a1d437ead5c0cdfdf0cb5e924651e864f4e
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# MusicCast
|
2
2
|
|
3
|
-
Control System for Yamaha MusicCast
|
3
|
+
Ruby Control System for Yamaha MusicCast speakers
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,6 +18,12 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
$ gem install music_cast
|
20
20
|
|
21
|
+
## Prerequisites
|
22
|
+
|
23
|
+
For the HTTP API to function correctly in an integrated system, the MusicCast devices must be on a fixed or bound IP Address. To avoid network loops through the wireless “extend” functionality of MusicCast products you should set the device to wired or wireless only - through the web GUI on the MusicCast device:
|
24
|
+
|
25
|
+
![screen shot 2018-03-25 at 22 22 48](https://user-images.githubusercontent.com/666397/37880091-294978fc-307b-11e8-8985-3ee4e3f11fc6.png)
|
26
|
+
|
21
27
|
## Configuration
|
22
28
|
|
23
29
|
The configuration options can be set by using the `configure` helper
|
@@ -34,6 +40,54 @@ The following is the full list of available configuration options:
|
|
34
40
|
ip_address # The static IP address of your speaker
|
35
41
|
```
|
36
42
|
|
43
|
+
## Usage
|
44
|
+
|
45
|
+
This gem is intended to be a thin wrapper around the existing `YamahaExtendedControl/v1` API. The class structures are influenced by the existing API structure. This is a list of all the functions that can currently be performed with this gem.
|
46
|
+
|
47
|
+
### Status
|
48
|
+
|
49
|
+
Get device status
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
status = MusicCast::GetStatus.new
|
53
|
+
status.to_json # Current status as JSON
|
54
|
+
```
|
55
|
+
|
56
|
+
### Power Functions
|
57
|
+
|
58
|
+
Set power status and enable/disable auto-standby
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
power = MusicCast::SetPower.new
|
62
|
+
power.on # Power on
|
63
|
+
power.standby # Standby
|
64
|
+
power.toggle # Power Toggle
|
65
|
+
power.enable_auto_standby # Enable Auto Power Standby
|
66
|
+
power.disable_auto_standby # Disable Auto Power Standby
|
67
|
+
```
|
68
|
+
|
69
|
+
### Volume Commands
|
70
|
+
|
71
|
+
Set sound volume level
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
volume = MusicCast::SetVolume.new
|
75
|
+
volume.to(11) # Set volume to n valid range 0..100
|
76
|
+
volume.increment # Increment volume by 1 step
|
77
|
+
volume.increment(10) # Increment volume by n steps
|
78
|
+
volume.decrement # Decrement volume by 1 step
|
79
|
+
volume.decrement(10) # Decrement volume by n steps
|
80
|
+
```
|
81
|
+
|
82
|
+
### Mute
|
83
|
+
|
84
|
+
Enable or disable sound
|
85
|
+
|
86
|
+
```ruby
|
87
|
+
mute = MusicCast::SetMute.new
|
88
|
+
mute.on # Set Mute on
|
89
|
+
mute.off # Set Mute off
|
90
|
+
```
|
37
91
|
|
38
92
|
## Development
|
39
93
|
|
data/lib/music_cast/api.rb
CHANGED
data/lib/music_cast/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: music_cast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Entwistle
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- bin/setup
|
133
133
|
- lib/music_cast.rb
|
134
134
|
- lib/music_cast/api.rb
|
135
|
+
- lib/music_cast/api/get_status.rb
|
135
136
|
- lib/music_cast/api/set_mute.rb
|
136
137
|
- lib/music_cast/api/set_power.rb
|
137
138
|
- lib/music_cast/api/set_volume.rb
|
@@ -158,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
159
|
version: '0'
|
159
160
|
requirements: []
|
160
161
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.7.
|
162
|
+
rubygems_version: 2.7.6
|
162
163
|
signing_key:
|
163
164
|
specification_version: 4
|
164
165
|
summary: Yamaha MusicCast Control System
|