IP Control of Yamaha RXZ11?
John Gonzales
Posts: 609
Hi Everyone,
I'm currently in Hawaii on a project and I'm running on just a few hours of sleep... Here's the question:
The new RXZ11 can be controlled via IP. It seems to be as simple as sending an XML string to it. I'm a little behind the 8 ball on time, but I'm wondering if there's anything more than just opening the IP client and sending the XML string? The documentation from Yamaha isn't very clear to me.
Here's the command that their spreadsheet generates:
Can I just do the following or is there something more fancy I need to do?
-John
I'm currently in Hawaii on a project and I'm running on just a few hours of sleep... Here's the question:
The new RXZ11 can be controlled via IP. It seems to be as simple as sending an XML string to it. I'm a little behind the 8 ball on time, but I'm wondering if there's anything more than just opening the IP client and sending the XML string? The documentation from Yamaha isn't very clear to me.
Here's the command that their spreadsheet generates:
<?xml version="1.0" encoding="utf-8"?>
<YAMAHA_AV cmd="PUT">
<Main_Zone>
<Power_Control>
<Power>On</Power>
</Power_Control>
</Main_Zone>
</YAMAHA_AV>
Can I just do the following or is there something more fancy I need to do?
DEFINE_START IP_CLIENT_OPEN (2,cYamahaIPAddress,80,1) DEFINE_EVENT BUTTON_EVENT[dvYamahaRXZ11,nPower_On] { PUSH : { SEND_STRING dvYamahaRXZ11, "'<?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="PUT"><Main_Zone><Power_Control><Power>On</Power></Power_Control></Main_Zone></YAMAHA_AV>'" } }
-John
0
Comments
POST /avctrl/ctrl.cgi HTTP/1.1
Content-Type: text/plain
Content-length: 114
HOST: 192.168.2.74
<?xml version="1.0" encoding="utf-8"?>
<YAMAHA_AV cmd="PUT">
<System>
<Mem_Guard>Off</Mem_Guard>
</System>
</YAMAHA_AV>
I won't get a lot of tries to get this to work because of our time crunch, but does the following look somewhat correct? I'm also curious about the content-length... can I calculate that just by counting the characters and ignoring the spaces, and also do I count the last CR, LF?
Since you do not have alot of time with this for testing, I think you may find it hard to test with your example. This example should help, although it has not been tested, will give you more of a chance to see it working quicker.
Thanks AMXJeff, I wasn't expecting a whole code block! That's really nice of you. I'm back in San Diego now, I ended up having to use IR commands to get it to all work quickly. I'll be back out there in a few weeks, so I'll start on the IP programming in a few days. I'll take a look at the example you provided as a guideline, it looks pretty good. I'll post any results with the IP protocol as I get further along in the program.
Thanks again!
--John