Skip to content

stoffus/marantz-rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marantz

Ruby client that uses Marantz web interface as an API.

Supported versions

  • Ruby 2.5, 2.6, 2.7

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

Copyright © 2020 Christopher Svensson.

About

Ruby client for controlling Marantz AVRs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages