Yamaha RX Plugin - a/v receiver control

Posted on
Mon Dec 09, 2013 5:44 pm
discgolfer1138 offline
User avatar
Posts: 45
Joined: Jul 28, 2011
Location: Golden, CO

Yamaha RX Plugin - a/v receiver control

simple control of Yamaha RX series a/v receivers.

Requirements:
    Indigo 6 or later (pro version only)

Installation Instructions:
    Download latest release here

Actions Supported:
    Set Volume
    Increase Volume
    Decrease Volume
    Set Mute
    Toggle Mute
    Set Power
    Toggle Power
    Set Sleep
    Get Status

States Surfaced:
    power (On, Standby)
    sleep (Off,30,60,90,120)
    volume (int)
    mute (bool)
    input (sirius, xm, tuner, multi_ch, phono, cd, tv, md.cd-r, bd.hd_dvd, dvd, cbl.sat, dvr, vcr, v-aux, dock, pc.mcx, net_radio, rhapsody, usb)

The source code is available for collaboration on GitHub
Bugs can be reported here

Indigo 6.1.0 | Mac Mini | OS 10.10.3 (Yosemite)
Fork Me on GitHub!

Posted on
Thu Jan 23, 2014 3:53 am
col offline
Posts: 244
Joined: Jan 08, 2010
Location: UK

Re: Yamaha RX Plugin - a/v receiver control

Hi, thanks for the plug in but the only thing I can do is put mx RX-V675 into standby, everything else gets an error message
Yamaha Rx Receiver Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 170, in setPower
File "plugin.py", line 105, in putPower
File "plugin.py", line 20, in xmitToReceiver
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 124, in urlopen
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 381, in open
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 399, in _open
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 360, in _call_chain
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 1118, in http_open
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 1093, in do_open
<class 'urllib2.URLError'>: <urlopen error (60, 'Operation timed out')>

Posted on
Sat Jan 25, 2014 8:31 pm
BenX10 offline
Posts: 52
Joined: Mar 10, 2012
Location: Haltern am See, Germany

Re: Yamaha RX Plugin - a/v receiver control

Hi discgolfer1138 and thanks for sharing this!

I've a problem with the plugin: Right after enabling the plugin I get "exception in deviceStartComm(RX-V775): 'NoneType' object has no attribute 'text'" in the event log. Yamaha's web control works and so does this little php script:
Code: Select all
<?php
function send_to_host($host,$method,$path='/',$data='') {
    $method = strtoupper($method);
    $fp = fsockopen($host, 80) or die("Unable to open socket");
    fputs($fp, "$method $path HTTP/1.1\r\n");
    fputs($fp, "Host: $host\r\n");
    fputs($fp, "Content-type: text/plain\r\n");
    if ($method == 'POST') fputs($fp, "Content-length: " . strlen($data) . "\r\n");
    fputs($fp, "Connection: close\r\n\r\n");
    if ($method == 'POST') fputs($fp, $data);
    while (!feof($fp)) $buf .= fgets($fp,128);
    fclose($fp);
    return $buf;
}
$command = '<?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="GET"><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>';
/*$command = '<?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="PUT"><Main_Zone><Power_Control><Power>Standby</Power></Power_Control></Main_Zone></YAMAHA_AV>';*/
$yamip = '192.168.0.35';
$test = send_to_host($yamip.':80/YamahaRemoteControl/ctrl','POST','/YamahaRemoteControl/ctrl',$command);
echo $test;
?>

Any idea?

Cheers

Posted on
Fri Jan 31, 2014 2:51 am
col offline
Posts: 244
Joined: Jan 08, 2010
Location: UK

Re: Yamaha RX Plugin - a/v receiver control

Looks like this plugin is dead :(

Posted on
Fri Jan 31, 2014 9:10 am
RogueProeliator offline
User avatar
Posts: 2230
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Yamaha RX Plugin - a/v receiver control

Try contacting him on GitHub, from the sounds of it in other threads, he prefers that interface for tracking bugs and issues. I believe the link is in his original post.

Posted on
Tue Apr 01, 2014 9:00 pm
amannone offline
User avatar
Posts: 25
Joined: Nov 23, 2010
Location: Boston, MA

Re: Yamaha RX Plugin - a/v receiver control

I have a Yamaha RX-V473 and also got an error trying to use the plugin. I created a GitHub account and submitted the error (below) as an issue to the project.

Code: Select all
Yamaha Rx Receiver Error   Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 852, in deviceUpdated
  File "plugin.py", line 42, in deviceStartComm
  File "plugin.py", line 59, in updateStatus
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'text'

Posted on
Tue Jul 15, 2014 9:36 am
dgahagan offline
Posts: 5
Joined: Jul 02, 2010

Re: Yamaha RX Plugin - a/v receiver control

I can't for the life of me figure out how to change the input. I have the power working, but the saved settings (1-4) and the input selection don't show up anywhere.

Any help is appreciated.

Posted on
Wed Jul 16, 2014 9:09 pm
BenX10 offline
Posts: 52
Joined: Mar 10, 2012
Location: Haltern am See, Germany

Re: Yamaha RX Plugin - a/v receiver control

I think the problem is that Chad wrote this plugin for Yamaha's RX-Vx900, most commands differ to the newer series like my RX-V775. So I took Chad's plugin, did a lot of research for the commands for the RX-Vx75 series, added (as Chad said) significantly more features and voilà my RX-V775 is (nearly, zone 2 isn't implemented) completely controllable by Indigo. I sent him my version of his plugin and asked him to take a look and for permission - as its based on his work initially - to share it with the Indigo community.

I've received one reply: He wasn't sure if it would make sense to make one plugin for all IP controllable Yamaha's since RX-Vx900 or to make a separate one for every series (in case there are that big differences like Vx900 and Vx75). And he'll let me know when he has had more time to look at it. That was in mid of April, since then I've heard nothing from him.

Cheers,
Ben

Posted on
Mon Jul 21, 2014 7:27 pm
Bleasel offline
Posts: 43
Joined: Mar 05, 2014
Location: Sydney, AUSTRALIA

Re: Yamaha RX Plugin - a/v receiver control

I note that Chad has posted his plugin on Github (collaborative open source site)

https://github.com/discgolfer1138/indig ... x/branches

There are 2 branches with modifications.

Ben, perhaps you could create a third branch, and post your modifications there. This gives recognition to Chad as the originator of the plugin.

Thanks in advance.

Posted on
Tue Jul 22, 2014 10:23 am
BenX10 offline
Posts: 52
Joined: Mar 10, 2012
Location: Haltern am See, Germany

Re: Yamaha RX Plugin - a/v receiver control

Oh, the second branch labeled "bernd-blazynski" is my version. So Chad has already reacted, this wasn't aware to me. That version should work with all RX-Vx75 models.

Cheers,
Ben

Posted on
Thu Jul 24, 2014 3:09 pm
Bleasel offline
Posts: 43
Joined: Mar 05, 2014
Location: Sydney, AUSTRALIA

Re: Yamaha RX Plugin - a/v receiver control

Ben

Many thanks for your version which I have been using for a few months.

It has enabled me to use a trigger to turn on the receiver and set the correct scene when Sonos is playing. Many thanks, my Sonos is now wife friendly again.

I have a Yamaha RX-A1010. Whilst the actions work, I am not able to read the state of the Yamaha. There is an error in the Event log.

Starting plugin "Yamaha RX-A1010 Receiver 0.1.2" (pid 8506)
Started plugin "Yamaha RX-A1010 Receiver 0.1.2"
Yamaha RX-A1010 Receiver Debug startup called
Yamaha RX-A1010 Receiver Error exception in deviceStartComm(Yamaha RX-A1010): 'NoneType' object has no attribute 'text'

I have found the specifications for the A1010:

http://www.google.com.au/url?sa=t&rct=j ... 8758,d.c2E


and I am trying to learn python, but at this stage I have not worked out what to change to load the states.

I would be most grateful for any assistance in correcting this.

Thanks

Posted on
Fri Sep 25, 2015 11:42 am
Betacruxis offline
Posts: 27
Joined: Apr 03, 2010

Re: Yamaha RX Plugin - a/v receiver control

Hello Guys.
Anyone has a working version of the plugin?
I downloaded the last version, installed it, but I've got this message:

2015-09-24 15:25:14.464 Yamaha Rx Receiver Debug updating status...
2015-09-24 15:25:14.789 Yamaha Rx Receiver Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 855, in deviceUpdated
File "plugin.py", line 42, in deviceStartComm
File "plugin.py", line 59, in updateStatus
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'text'

So, I investigated a little further in the plugin website and made the latest suggested mods, but I keep having his error:

Enabling plugin "Yamaha Rx Receiver 0.1.1"
Starting plugin "Yamaha Rx Receiver 0.1.1" (pid 29620)
Started plugin "Yamaha Rx Receiver 0.1.1"
Yamaha Rx Receiver Debug startup called
Yamaha Rx Receiver Debug updating status...
Yamaha Rx Receiver Error exception in deviceStartComm(Living Home Theatre): 'NoneType' object has no attribute 'text'

Any help will be appreciated.
Thanks in advance.

Posted on
Fri Sep 25, 2015 2:26 pm
colinpartridge offline
Posts: 337
Joined: Jan 13, 2014
Location: London, UK

Re: Yamaha RX Plugin - a/v receiver control

For what its worth I am using the cynical network plugin to communicate with a Yamaha RX-V575, I did try the RX plugin ( not the branch version ) with no luck some time ago. Granted I'm only using it to switch inputs and change volume etc but it works pretty well. Happy to help if I can

Colin

Posted on
Fri Sep 25, 2015 2:50 pm
DaveL17 offline
User avatar
Posts: 4922
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Yamaha RX Plugin - a/v receiver control

Betacruxis wrote:
Enabling plugin "Yamaha Rx Receiver 0.1.1"
Starting plugin "Yamaha Rx Receiver 0.1.1" (pid 29620)
Started plugin "Yamaha Rx Receiver 0.1.1"
Yamaha Rx Receiver Debug startup called
Yamaha Rx Receiver Debug updating status...
Yamaha Rx Receiver Error exception in deviceStartComm(Living Home Theatre): 'NoneType' object has no attribute 'text'

I haven't looked at the plugin, but my guess is that it's parsing XML data that it receives from the AVR. My next guess is that the plugin is looking for an XML key that's not in the XML--effectively saying that it wants to get the value of something located in KEY.text. Since KEY.text doesn't exist (or has a null value and thus, no text) it gets angry. If you can figure out which KEY is the culprit, you can wrap it in a try/except block (psuedo code):

Code: Select all
try:
    foo = KEY.text

except:
    foo = u"Key does not exist."


Hope this helps,
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Sep 26, 2015 8:06 pm
BenX10 offline
Posts: 52
Joined: Mar 10, 2012
Location: Haltern am See, Germany

Re: Yamaha RX Plugin - a/v receiver control

Betacruxis:
What model of receiver do you want to use with the plugin?

And DaveL17 is right with his guess, that's exactly what I've seen while making the changes from 0.1.1 to 0.1.2 for my RX-V775: This error message always occurred while the plugin tried to get values which doesn't exist (was a kind of try and error that time as I didn't had a clear documentation for my Yamaha model).

Cheers,
Ben

Who is online

Users browsing this forum: No registered users and 1 guest