Page 5 of 15

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Sun Aug 24, 2014 2:10 pm
by woggy
is it possible to use the ir codes?

Code: Select all

SP RELAY A: 
ON 7E - AB 
OFF 7E - AC 

SP RELAY B: 
ON 7E - AD 
OFF 7E - AE 

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Sun Aug 24, 2014 3:12 pm
by Dragon470
Yes, remote codes cane be sent via the plugin.



I also added/changed the initial script to split the output onto multiple lines. This will give you the exact names of inputs.

I also went over the setsourceinput and noticed that the line in client.py:
inputs = globals.ALL_SOURCES
needs to be changed to :
inputs = globals.AVAILABLE_SOURCES

This will eliminate the sources that are not available.

This is why I need the full output to make sure the proper names are found.

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Sun Aug 24, 2014 3:20 pm
by woggy
this is all I get:

<YAMAHA_AV rsp="GET" RC="0"><System><Config><Model_Name>R-N500</Model_Name><System_ID>0EB18623</System_ID><Version>1.07/2.06</Version><Feature_Existence><Main_Zone>1</Main_Zone><Zone_2>0</Zone_2><Zone_3>0</Zone_3><Zone_4>0</Zone_4><Tuner>1</Tuner><DAB>0</DAB><HD_Radio>0</HD_Radio><Rhapsody>0</Rhapsody><Napster>0</Napster><SiriusXM>0</SiriusXM><Spotify>1</Spotify><Pandora>0</Pandora><SERVER>1</SERVER><NET_RADIO>1</NET_RADIO><USB>1</USB><iPod_USB>1</iPod_USB><AirPlay>1</AirPlay></Feature_Existence></Config></System></YAMAHA_AV>

Do I have to change the code to get more?

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Sun Aug 24, 2014 3:59 pm
by woggy
I did a: <YAMAHA_AV cmd="GET"><Main_Zone><Input><Input_Sel_Item>GetParam</Input_Sel_Item></Input></Main_Zone></YAMAHA_AV>

Code: Select all

   <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Input><Input_Sel_Item><Item_1><Param>Spotify</Param><RW>RW</RW><Title>Spotify</Title><Icon><On>/YamahaRemoteControl/Icons/icon102.png</On><Off></Off></Icon><Src_Name>Spotify</Src_Name><Src_Number>1</Src_Number></Item_1><Item_2><Param>NET RADIO</Param><RW>RW</RW><Title>NET RADIO</Title><Icon><On>/YamahaRemoteControl/Icons/icon005.png</On><Off></Off></Icon><Src_Name>NET_RADIO</Src_Name><Src_Number>1</Src_Number></Item_2><Item_3><Param>SERVER</Param><RW>RW</RW><Title>SERVER</Title><Icon><On>/YamahaRemoteControl/Icons/icon006.png</On><Off></Off></Icon><Src_Name>SERVER</Src_Name><Src_Number>1</Src_Number></Item_3><Item_4><Param>AirPlay</Param><RW>RW</RW><Title>AirPlay</Title><Icon><On>/YamahaRemoteControl/Icons/icon101.png</On><Off></Off></Icon><Src_Name>AirPlay</Src_Name><Src_Number>1</Src_Number></Item_4><Item_5><Param>USB</Param><RW>RW</RW><Title>USB</Title><Icon><On>/YamahaRemoteControl/Icons/icon009.png</On><Off></Off></Icon><Src_Name>USB</Src_Name><Src_Number>1</Src_Number></Item_5><Item_6><Param>iPod (USB)</Param><RW>R</RW><Title>USB</Title><Icon><On>/YamahaRemoteControl/Icons/icon011.png</On><Off></Off></Icon><Src_Name>iPod_USB</Src_Name><Src_Number>1</Src_Number></Item_6><Item_7><Param>TUNER</Param><RW>RW</RW><Title>TUNER</Title><Icon><On>/YamahaRemoteControl/Icons/icon008.png</On><Off></Off></Icon><Src_Name>Tuner</Src_Name><Src_Number>1</Src_Number></Item_7><Item_8><Param>PHONO</Param><RW>RW</RW><Title>PHONO</Title><Icon><On>/YamahaRemoteControl/Icons/icon007.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_8><Item_9><Param>CD</Param><RW>RW</RW><Title>CD</Title><Icon><On>/YamahaRemoteControl/Icons/icon073.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_9><Item_10><Param>OPTICAL1</Param><RW>RW</RW><Title>OPTICAL1</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_10><Item_11><Param>OPTICAL2</Param><RW>RW</RW><Title>OPTICAL2</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_11><Item_12><Param>COAXIAL1</Param><RW>RW</RW><Title>COAXIAL1</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_12><Item_13><Param>COAXIAL2</Param><RW>RW</RW><Title>COAXIAL2</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_13><Item_14><Param>LINE1</Param><RW>RW</RW><Title>LINE1</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_14><Item_15><Param>LINE2</Param><RW>RW</RW><Title>LINE2</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_15><Item_16><Param>LINE3</Param><RW>RW</RW><Title>LINE3</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_16></Input_Sel_Item></Input></Main_Zone></YAMAHA_AV>
   

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Sun Aug 24, 2014 7:11 pm
by Dragon470
redid the script:

Code: Select all

ip = "192.168.1.2"
port = 80
timeout=3.0

from xml.dom import minidom
import httplib

conn = httplib.HTTPConnection('{0}:{1}'.format(ip, port), timeout=float(timeout))
headers = { "Content-type": "text/xml" }
conn.request("POST", "/YamahaRemoteControl/ctrl", "", headers)
conn.send('<YAMAHA_AV cmd="GET"><System><Config>GetParam</Config></System></YAMAHA_AV>')
response = conn.getresponse()
rval = response.read()
conn.close()
#print rval

xmldoc = minidom.parseString(rval)

for node in xmldoc.getElementsByTagName("Feature_Existence"): #just in case there are multiple "Feature" sections
    x = 0
    stop = False
    while stop==False:
        try:
            if node.childNodes[x].firstChild.data != "0":
                print node.childNodes[x].tagName
        except:
            stop=True
        x = x + 1
This will print only the features that you have on your device. If this works I might look into changing a lot of the way the plugin initially sets up.

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Mon Aug 25, 2014 2:52 pm
by woggy
The plugin didn't work =(

Python script "93", line 17, in <module>
xmldoc = minidom.parseString(rval)
File "xml\dom\minidom.pyc", line 1928, in parseString

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Tue Aug 26, 2014 12:07 am
by Dragon470
Python script "93", line 17, in <module>
xmldoc = minidom.parseString(rval)
File "xml\dom\minidom.pyc", line 1928, in parseString
That does not make any sense. If the plugin (not script) works this should too. The plugin also uses minidom.

With that aside, I have already started to rework parts of the plugin. So in this post I will keep updating a beta as I refine it, before updating github.

Let me know if all your inputs are found in the setsourceinput action and that you can actually switch to them.

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Tue Aug 26, 2014 3:01 pm
by woggy
none of this inputs show up, but all the rest do.

'OPTICAL1', 'OPTICAL2', 'COAXIAL1', 'COAXIAL2', 'CD', 'LINE1', 'LINE2', 'LINE3'

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Tue Aug 26, 2014 3:43 pm
by woggy
The first script you posted did work, but it don't show all of my INPUTS. (I forgot to change the ip, duh)
but this script shows all of my inputs:

Code: Select all

ip = "192.168.1.2"
port = 80
timeout=3.0
import socket
from xml.dom import minidom
import httplib

conn = httplib.HTTPConnection('{0}:{1}'.format(ip, port), timeout=float(timeout))
headers = { "Content-type": "text/xml" }
conn.request("POST", "/YamahaRemoteControl/ctrl", "", headers)
#conn.send('<YAMAHA_AV cmd="GET"><System><Config>GetParam</Config></System></YAMAHA_AV>')
conn.send('<YAMAHA_AV cmd="GET"><Main_Zone><Input><Input_Sel_Item>GetParam</Input_Sel_Item></Input></Main_Zone></YAMAHA_AV>')

response = conn.getresponse()
rval = response.read()
conn.close()
print rval

xmldoc = minidom.parseString(rval)
#Input_Sel_Item
#for node in xmldoc.getElementsByTagName("Feature_Existence"): #just in case there are multiple "Feature" sections
for node in xmldoc.getElementsByTagName("Param"): #just in case there are multiple "Feature" sections
    x = 0
    stop = False
    while stop==False:
        try:
            #if node.childNodes[x].firstChild.data != "0":
            #    print node.childNodes[x].tagName
            print str(node.childNodes[x].data)

        except:
            stop=True
        x = x + 1
        
#   <YAMAHA_AV rsp="GET" RC="0"><System><Config><Model_Name>R-N500</Model_Name><System_ID>0EB18623</System_ID><Version>1.07/2.06</Version><Feature_Existence><Main_Zone>1</Main_Zone><Zone_2>0</Zone_2><Zone_3>0</Zone_3><Zone_4>0</Zone_4><Tuner>1</Tuner><DAB>0</DAB><HD_Radio>0</HD_Radio><Rhapsody>0</Rhapsody><Napster>0</Napster><SiriusXM>0</SiriusXM><Spotify>1</Spotify><Pandora>0</Pandora><SERVER>1</SERVER><NET_RADIO>1</NET_RADIO><USB>1</USB><iPod_USB>1</iPod_USB><AirPlay>1</AirPlay></Feature_Existence></Config></System></YAMAHA_AV>
#   <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Input><Input_Sel_Item><Item_1><Param>Spotify</Param><RW>RW</RW><Title>Spotify</Title><Icon><On>/YamahaRemoteControl/Icons/icon102.png</On><Off></Off></Icon><Src_Name>Spotify</Src_Name><Src_Number>1</Src_Number></Item_1><Item_2><Param>NET RADIO</Param><RW>RW</RW><Title>NET RADIO</Title><Icon><On>/YamahaRemoteControl/Icons/icon005.png</On><Off></Off></Icon><Src_Name>NET_RADIO</Src_Name><Src_Number>1</Src_Number></Item_2><Item_3><Param>SERVER</Param><RW>RW</RW><Title>SERVER</Title><Icon><On>/YamahaRemoteControl/Icons/icon006.png</On><Off></Off></Icon><Src_Name>SERVER</Src_Name><Src_Number>1</Src_Number></Item_3><Item_4><Param>AirPlay</Param><RW>RW</RW><Title>AirPlay</Title><Icon><On>/YamahaRemoteControl/Icons/icon101.png</On><Off></Off></Icon><Src_Name>AirPlay</Src_Name><Src_Number>1</Src_Number></Item_4><Item_5><Param>USB</Param><RW>RW</RW><Title>USB</Title><Icon><On>/YamahaRemoteControl/Icons/icon009.png</On><Off></Off></Icon><Src_Name>USB</Src_Name><Src_Number>1</Src_Number></Item_5><Item_6><Param>iPod (USB)</Param><RW>R</RW><Title>USB</Title><Icon><On>/YamahaRemoteControl/Icons/icon011.png</On><Off></Off></Icon><Src_Name>iPod_USB</Src_Name><Src_Number>1</Src_Number></Item_6><Item_7><Param>TUNER</Param><RW>RW</RW><Title>TUNER</Title><Icon><On>/YamahaRemoteControl/Icons/icon008.png</On><Off></Off></Icon><Src_Name>Tuner</Src_Name><Src_Number>1</Src_Number></Item_7><Item_8><Param>PHONO</Param><RW>RW</RW><Title>PHONO</Title><Icon><On>/YamahaRemoteControl/Icons/icon007.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_8><Item_9><Param>CD</Param><RW>RW</RW><Title>CD</Title><Icon><On>/YamahaRemoteControl/Icons/icon073.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_9><Item_10><Param>OPTICAL1</Param><RW>RW</RW><Title>OPTICAL1</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_10><Item_11><Param>OPTICAL2</Param><RW>RW</RW><Title>OPTICAL2</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_11><Item_12><Param>COAXIAL1</Param><RW>RW</RW><Title>COAXIAL1</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_12><Item_13><Param>COAXIAL2</Param><RW>RW</RW><Title>COAXIAL2</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_13><Item_14><Param>LINE1</Param><RW>RW</RW><Title>LINE1</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_14><Item_15><Param>LINE2</Param><RW>RW</RW><Title>LINE2</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_15><Item_16><Param>LINE3</Param><RW>RW</RW><Title>LINE3</Title><Icon><On>/YamahaRemoteControl/Icons/icon002.png</On><Off></Off></Icon><Src_Name></Src_Name><Src_Number>1</Src_Number></Item_16></Input_Sel_Item></Input></Main_Zone></YAMAHA_AV>
this is the inputs I get with MY script:
[u'Spotify', u'NET RADIO', u'SERVER', u'AirPlay', u'USB', u'iPod (USB)', u'TUNER', u'PHONO', u'CD', u'OPTICAL1', u'OPTICAL2', u'COAXIAL1', u'COAXIAL2', u'LINE1', u'LINE2', u'LINE3']

this is the inputs I get with YOUR script:
[u'Main_Zone', u'Tuner', u'Spotify', u'SERVER', u'NET_RADIO', u'USB', u'iPod_USB', u'AirPlay']

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Tue Aug 26, 2014 10:34 pm
by Dragon470
I didn't give you the newest script, which is why it didn't show the non-feature inputs. In the zip of the plugin does have the non-feature inputs found.

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Wed Aug 27, 2014 5:33 am
by woggy
Ok, just to make sure we are on the same page...
Dragon470 wrote:I didn't give you the newest script, which is why it didn't show the non-feature inputs. In the zip of the plugin does have the non-feature inputs found.
I downloaded the new script:
Dragon470 wrote:
Python script "93", line 17, in <module>
xmldoc = minidom.parseString(rval)
File "xml\dom\minidom.pyc", line 1928, in parseString
That does not make any sense. If the plugin (not script) works this should too. The plugin also uses minidom.

With that aside, I have already started to rework parts of the plugin. So in this post I will keep updating a beta as I refine it, before updating github.

Let me know if all your inputs are found in the setsourceinput action and that you can actually switch to them.
The script works, all the inputs that my receiver doesnÔÇÖt have is gone, so that's good. But I still miss these inputs:
woggy wrote:none of this inputs show up, but all the rest do.

'OPTICAL1', 'OPTICAL2', 'COAXIAL1', 'COAXIAL2', 'CD', 'LINE1', 'LINE2', 'LINE3'
So I modified your script to show all my inputs, to help out. I'm no programmer but it seems that my receiver (Stereo Receiver) works in a little different way than the others.

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Sat Aug 30, 2014 5:36 pm
by Dragon470
Changes were submitted to the main githubwith the following changes:

Changed how zones and sources are discovered.
Added new action to change video out source for feature sources like Tuner.
Changed the config screen for the smart volume (The changes were from woggy).
Changed eg.results to return.
Now will also get error code back from receiver if command was not sent properly.


More to follow as have time.
Ex. Lipsync control
wall paper picture selection
display dimmer
sound bass and treble levels
hdmi1 and hdmi2 out control
separate audio in for video sources
video standby through on/off
hdmi processing resolution

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Sat Sep 06, 2014 4:47 pm
by woggy
Sorry for the late response, half the inputs still don't work!

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Sun Sep 14, 2014 1:15 pm
by Dragon470
Newest version (2014-09-14) of plugin on github has many updates and additions.

NEW Minor support for Yamaha R-N line (Woggy is testing)

Radio tuning now functioning again.
Set Source next/previous fall back now in place so potential error will not happen.
Added Set Wallpaper
Added Set Display brightness
Added Feature Video Out
Added Set Audio In for Video Source

Some other actions yet to add like Lip sync control, hdmi1/2 out control are no longer a settable option via ync on newer models. Might still add for older versions.

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Posted: Fri Sep 19, 2014 3:27 am
by lja
I have a Yamaha RX-V 3900. I have turned on Network Standby and can get the receiver to turn on and off. However I have been unable to get the increase volume and decrease volume to work. Can anyone share their setup to help? Thanks.