Skip to content

Latest commit

 

History

History
89 lines (54 loc) · 1.26 KB

README.rdoc

File metadata and controls

89 lines (54 loc) · 1.26 KB

Marantz

Ruby client that uses Marantz web interface as an API.

Supported versions

  • Ruby 1.9.3, 2.0.0, 2.1.5, 2.2.0, 2.3.0

Install

Put this line in your Gemfile:

source 'https://rubygems.org'

gem 'libxml-ruby'
gem 'marantz'

Then bundle:

$ bundle

Usage

General configuration options

You need to configure the gem to fit your needs:

# Default values
Marantz.configure do |config|
  config.host = '127.0.0.1'
  config.max_volume = 50.0
end

Initiating client

avr = Marantz::Client.new

Power on/off

if avr.power != "ON"
  avr.on
else
  puts "Already on"
end

# Power off
avr.off

Change source

Currently the following sources are switchable: SAT/CBL, Internet Radio, Presets, Spotify.

 # Change to Internet Radio
 avr.source = :iradio

  # Change preset
 avr.preset = 6

# Change to SAT/CBL
 avr.source = :satellite

 # Getting current source
 avr.source
 => :satellite

NOTE: If the receiver is in standby mode it will be turned on.

Volume

# Setting volume (dB)
avr.volume = 35.0

# Getting current volume
avr.volume
=> 35.0

# Muting
avr.mute
avr.unmute

Questions, Feedback

Feel free to message me on Github (mikefranken).

Copyright © 2014 Christopher Svensson.