Ruby client that uses Marantz web interface as an API.
-
Ruby 1.9.3, 2.0.0, 2.1.5, 2.2.0, 2.3.0
Put this line in your Gemfile:
source 'https://rubygems.org' gem 'libxml-ruby' gem 'marantz'
Then bundle:
$ bundle
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
avr = Marantz::Client.new
if avr.power != "ON" avr.on else puts "Already on" end # Power off avr.off
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.
# Setting volume (dB) avr.volume = 35.0 # Getting current volume avr.volume => 35.0 # Muting avr.mute avr.unmute
Feel free to message me on Github (mikefranken).
Copyright © 2014 Christopher Svensson.