Yamaha RX Plugin - a/v receiver control

Posted on
Sat Nov 10, 2018 2:47 pm
digtrail offline
Posts: 7
Joined: Jun 02, 2016

Re: Yamaha RX Plugin - a/v receiver control

Jay,
I did all of that and was able to get the plugin to run, but I still am getting errors. I knew it might be a long shot to get this receiver to work as it isn't in the RXV line, but their stereo line specifically the R-N303. If can get it to work be a great way to add higher powered airplay to different rooms.

Here is the error when using the RX-vx73 and find receivers button:

Yamaha RX Receiver Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 252, in refresh_receiver_list
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/__init__.py", line 26, in find
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 88, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 94, in _discover_features
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1654, in close
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
ParseError: no element found: line 1, column 0

Here is error when using manual ip:
Yamaha RX Receiver Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/plugin_base.py", line 1179, in deviceUpdated
File "plugin.py", line 178, in deviceStartComm
File "plugin.py", line 284, in updateStatus
File "plugin.py", line 252, in refresh_receiver_list
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/__init__.py", line 26, in find
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 88, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 94, in _discover_features
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1654, in close
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
ParseError: no element found: line 1, column 0

Yamaha RX Receiver Error runConcurrentThread error:
Traceback (most recent call last):
File "plugin.py", line 190, in runConcurrentThread
self.updateStatus(devId)
File "plugin.py", line 284, in updateStatus
self.refresh_receiver_list()
File "plugin.py", line 252, in refresh_receiver_list
self.receivers = {r.ctrl_url: r for r in rxv.find()}
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/__init__.py", line 26, in find
for ri in ssdp.discover(timeout=timeout)
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 88, in __init__
self._discover_features()
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 94, in _discover_features
self._desc_xml = ET.fromstring(desc_xml)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
return parser.close()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1654, in close
self._raiseerror(v)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
ParseError: no element found: line 1, column 0

Yamaha RX Receiver Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Yamaha RX Receiver Error Error in plugin execution ServerReplacedElem:


And then here is different error when using the RX-v3900

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/plugin_base.py", line 1179, in deviceUpdated
File "plugin.py", line 178, in deviceStartComm
File "plugin.py", line 266, in updateStatus
File "plugin.py", line 62, in xmitToReceiver
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
HTTPError: HTTP Error 404: Not Found

Yamaha RX Receiver Error runConcurrentThread error:
Traceback (most recent call last):
File "plugin.py", line 190, in runConcurrentThread
self.updateStatus(devId)
File "plugin.py", line 266, in updateStatus
root = ClassicReceiver.xmitToReceiver(dev, xml_string)
File "plugin.py", line 62, in xmitToReceiver
resp = urllib2.urlopen(req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found

Posted on
Sat Nov 10, 2018 3:20 pm
jay (support) offline
Site Admin
User avatar
Posts: 15457
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Yamaha RX Plugin - a/v receiver control

Did you turn on debug logging? Seems clear that your receiver isn't generating the XML that the plugin expects. I think debug logging will show the actual XML.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Nov 10, 2018 3:41 pm
digtrail offline
Posts: 7
Joined: Jun 02, 2016

Re: Yamaha RX Plugin - a/v receiver control

jay (support) wrote:
Did you turn on debug logging? Seems clear that your receiver isn't generating the XML that the plugin expects. I think debug logging will show the actual XML.


I did. Tried it all again too. There isn't much there from the debug info:
Nov 10, 2018, 4:28:15 PM
Reloading plugin "Yamaha RX Receiver 1.0.3"
Starting plugin "Yamaha RX Receiver 1.0.3" (pid 23521)
Yamaha RX Receiver Debug receivers list: {}
Started plugin "Yamaha RX Receiver 1.0.3"
Yamaha RX Receiver Debug startup called

Nov 10, 2018, 4:29:12 PM
Yamaha RX Receiver Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 252, in refresh_receiver_list
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/__init__.py", line 26, in find
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 88, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 94, in _discover_features
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1654, in close
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
ParseError: no element found: line 1, column 0


Nov 10, 2018, 4:29:49 PM
Yamaha RX Receiver Debug receivers list: {}
Yamaha RX Receiver Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 252, in refresh_receiver_list
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/__init__.py", line 26, in find
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 88, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Yahama RX.indigoPlugin/Contents/Server Plugin/rxv/rxv.py", line 94, in _discover_features
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1654, in close
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
ParseError: no element found: line 1, column 0

Guess this one probably won't work with the plugin.

Posted on
Sun Nov 11, 2018 7:19 am
haavarda offline
User avatar
Posts: 642
Joined: Aug 18, 2012
Location: Norway

Re: Yamaha RX Plugin - a/v receiver control

I just got a new Yamaha receiver, and I am now moving from the denon plugin to this one.
I am running in to some issues when I switch to Audio 3 input. See copy from the log below. Anyone that can see what is wrong? I have tried to delete the device and re-create it.
The reciever is auto discovered.

Code: Select all
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Reloading plugin "Yamaha RX Receiver 1.0.3"
   Stopping plugin "Yamaha RX Receiver 1.0.3" (pid 64438)
   Stopped plugin "Yamaha RX Receiver 1.0.3"
   Starting plugin "Yamaha RX Receiver 1.0.3" (pid 67643)
   Started plugin "Yamaha RX Receiver 1.0.3"
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Yamaha RX Receiver              Debug logging enabled
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Reloading plugin "Yamaha RX Receiver 1.0.3"
   Stopping plugin "Yamaha RX Receiver 1.0.3" (pid 67643)
   Yamaha RX Receiver Debug        shutdown called
   Stopped plugin "Yamaha RX Receiver 1.0.3"
   Starting plugin "Yamaha RX Receiver 1.0.3" (pid 67648)
   Z-Wave                          received "Power meter" energy total to 92.810 kWh
   Z-Wave                          received "Meter Electrical car" energy total to 44.063 kWh
   Yamaha RX Receiver Debug        receivers list: {'http://192.168.1.127:80/YamahaRemoteControl/ctrl': <RXV model_name="RX-V685" zone="Main_Zone" ctrl_url="http://192.168.1.127:80/YamahaRemoteControl/ctrl" at 0x10c34b650>}
   Started plugin "Yamaha RX Receiver 1.0.3"
   Yamaha RX Receiver Debug        startup called
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Error                           cannot update device state for key input to value AUDIO3 (invalid enumeration value)
   Disabling plugin "Yamaha RX Receiver 1.0.3"
   Stopping plugin "Yamaha RX Receiver 1.0.3" (pid 67648)
   Yamaha RX Receiver Debug        shutdown called

Håvard

Posted on
Mon Nov 12, 2018 9:45 am
digtrail offline
Posts: 7
Joined: Jun 02, 2016

Re: Yamaha RX Plugin - a/v receiver control

Since I know and understand zero python I gave up on this plugin for now with the R-N303. I do have airplay and a rudimentary control page working using the iTunes and iTunes Local Control plugins. This will turn on the device since I am using network standby, but I don't have a way to power it back down using Indigo. Not a huge deal but for future implementations would be great.

I did some searching and found a python Yamaha Extended Control (MusicCast) api. https://github.com/rsc-dev/pyamaha

Maybe someone smarter than I can use that api to modify this plugin or develop a new one that would be able to control all Yamaha MusicCast receivers and speakers as it looks like the protocol is the same across all lines that support MusicCast. I just can not wrap my head around python.

Posted on
Mon Nov 12, 2018 9:57 am
colinpartridge offline
Posts: 334
Joined: Jan 13, 2014
Location: London, UK

Re: Yamaha RX Plugin - a/v receiver control

If the Yamaha plugin doesn't work for this receiver you could try using the Cynical networks plugin to communicate with the unit. I've used this method to send commands to a couple of different Yamaha receivers.

Colin

Posted on
Mon Nov 12, 2018 9:27 pm
digtrail offline
Posts: 7
Joined: Jun 02, 2016

Re: Yamaha RX Plugin - a/v receiver control

colinpartridge wrote:
If the Yamaha plugin doesn't work for this receiver you could try using the Cynical networks plugin to communicate with the unit. I've used this method to send commands to a couple of different Yamaha receivers.

Colin


I don't know that that will work. From what I've found online newer Yamaha receivers that use the YXC (Yamaha Extended Control) protocol instead of YNC (Yamaha Network Control, which this plugin uses it seems) won't respond as expected to normal network commands.

I wonder if the newest Yamaha AVR's that have MusicCast such as the RX-A680 use both YXC and YNC or if YNC is deprecated now in favor of YXC.

I downloaded the linked pyamaha file and tried playing around with the existing plugin tonight to see if I might be able to cludge something together. But it will take me a LOOOOONG time if not eternity to turn it into a working plugin. I'm pretty good at copy and pasting and slightly changing code, but this is WAY beyond anything I've done before. Hoping that there are more that will have a need for a modified plugin in the future using YXC and that an experienced code writer will tackle it.

Posted on
Tue Nov 13, 2018 3:35 am
haavarda offline
User avatar
Posts: 642
Joined: Aug 18, 2012
Location: Norway

Re: Yamaha RX Plugin - a/v receiver control

Is anyone maintaining this plugin anymore?


Sent from my iPhone using Tapatalk

Håvard

Posted on
Tue Nov 13, 2018 9:42 am
jay (support) offline
Site Admin
User avatar
Posts: 15457
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Yamaha RX Plugin - a/v receiver control

haavarda wrote:
Is anyone maintaining this plugin anymore?


It's open source - I added the last round of support because I had a Yamaha to test with. I might be able to deal with your issue when I get a chance, but it may be a while.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Nov 13, 2018 12:31 pm
haavarda offline
User avatar
Posts: 642
Joined: Aug 18, 2012
Location: Norway

Re: Yamaha RX Plugin - a/v receiver control

That would be great Jay. Please let me know if I can help, or provide you with more data.

Håvard


Sent from my iPhone using Tapatalk

Håvard

Posted on
Mon Dec 10, 2018 12:43 am
haavarda offline
User avatar
Posts: 642
Joined: Aug 18, 2012
Location: Norway

Re: Yamaha RX Plugin - a/v receiver control

Anything I can do to speed up the process? Any logging I can do that will help with the troubleshooting?

Håvard


Sent from my iPhone using Tapatalk

Håvard

Posted on
Mon Dec 10, 2018 11:20 am
jay (support) offline
Site Admin
User avatar
Posts: 15457
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Yamaha RX Plugin - a/v receiver control

Nope - I just need some extra time to look at it, which isn't in the cards for the next month or so.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Dec 10, 2018 4:29 pm
jay (support) offline
Site Admin
User avatar
Posts: 15457
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Yamaha RX Plugin - a/v receiver control

Ok, I think the change was simple enough for me to slip it in quickly. Before I create an official release, please go to the Github Repo and click the Clone or Download button. In the resulting popup, click the Download ZIP link. That will download and unzip a folder called "indigo-yamaharx-master" in your Downloads folder (assuming that's where your downloads default to).

Inside that folder you'll see the plugin named "Yamaha RX.indigoPlugin" - double-click that to install it and give it a try. Please let me know if it works so I can create the official plugin store release. Obviously let me know if it doesn't (though I'm pretty sure it will).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Dec 11, 2018 12:47 pm
haavarda offline
User avatar
Posts: 642
Joined: Aug 18, 2012
Location: Norway

Re: Yamaha RX Plugin - a/v receiver control

That worked perfectly. Thank you Jay!
I had to delete, and recreate the device to get it working, but now it works perfectly.

Håvard

Håvard

Posted on
Thu Jan 31, 2019 12:43 pm
Ramias offline
Posts: 136
Joined: Nov 24, 2015

Re: Yamaha RX Plugin - a/v receiver control

The python library this is built on here: https://github.com/wuub/rxv/blob/master/rxv/rxv.py looks like it was updated recently to support scenes. Any chance we can get that added here?

Thanks

Who is online

Users browsing this forum: No registered users and 0 guests