Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby client that uses Marantz web interface as an API.

  • Ruby 2.5, 2.6, 2.7

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 (stoffus).

Copyright © 2020 Christopher Svensson.

About

Ruby client for controlling Marantz AVRs.

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages