Yamaha Network Control Plugin using HTTP

I don’t know if UI7 has the advanced scene creator implemented back in yet, but if it hasn’t this will be a feature surely missed from UI5.

  • Garrett

@jolerius
I did a walk through video on UI7. It might be helpful to you. Ezlo UI7 ▾ Dashboard Navigation ▾ Complete Guided Tour - YouTube

@garrettwp
I’ll see if I can find out for you.

@Ramias: I control my receivers through the plug-in via LUUP code (in the LUUP section of the scene) as shown by a-lurkers examples in his first post. It’s not as easy picking functions from a drop down but a-lurker provided enough values and settings in the PDF in his first post to make it relatively easy.

@garrettwp

Shame on me for not knowing. The Advanced Scene Editor was added back in the December firmware update.

Is it me or is the link to the XLS with more Yamaha config codes broken in the PDF? That file appears to have been moved from the server.

No the XLS has gone. :frowning:

Both my AV receivers are Yamaha (HTR765 & RXV575)

Are these the same AVR but rebranded. It seems that HTRxxx are lower costs version of the same thing?

In the UI7 list of things you have:

http://forum.micasaverde.com/index.php?topic=26438.0

the Yamaha plugin is shown as working. Which plugin is that or are they both working for you? And can please add the infoviewer plugin to the list.

The RX-V575 is the middle model in RX-V series. The HTR7065 is a rebranded RX-V775 that Costco sold a while back. As far as I can tell, teh specs are similar. I’m not familiar with the AVR series.

I use both plugins on my UI7 test Vera without issues.

I’ve got a RX-V3900, I’ve loaded the plugin and set the IP address fine. Further in the Variables tab it has even download some information (model, zone input, etc) however I have a “Yamaha Receiver HTTP[74] : Startup Lua Failed” and the device status is “Can’t Detect Device.”

In the logs I’m this:

09	12/12/15 18:51:31.116	JobHandler_LuaUPnP::Run device 74 Yamaha Receiver HTTP room 10 type urn:schemas-a-lurker-com:device:YamahaRxHTTP:1 cat 0:-1 id  parent 0/0xd81550 upnp: 0 plugin:0 pnp:0 mac: ip:172.31.255.79 <0x2ad91000>
06	12/12/15 18:51:39.498	Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: Connected was: 1 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2b6e2680>
06	12/12/15 18:51:39.518	Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: Connected was: 0 now: 1 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2b6e2680>
01	12/12/15 18:51:39.724	LuaInterface::CallFunction_Startup-1 device 74 function luaStartUp failed [string "-- a-lurker 7 Feb 2014,  XML parser by Futz..."]:280: attempt to perform arithmetic on a nil value <0x2b6e2680>
01	12/12/15 18:51:39.725	LuImplementation::StartLua running startup code for 74 I_YamahaRxHTTP1.xml failed <0x2b6e2680>

I’m not sure where to go with this, any ideas? Thanks.

It’s executing this line:

volume = tostring(tonumber(volume) / 10.0)

Looks like the volume is being returned as nil by the xmlparser. That implies the AVR is returning something odd in the xml. You need to turn the debug on. Download L_YamahaRxHTTP1.lua and change line 23 local DEBUG_MODE = true and upload and restart. When the error occurs, the xml should be written to the log. Post it back here. Temporally you can comment out line 297 listed above. Changing or getting the volume should probably then put this in the log “Error: updateVariable was supplied with a nil value”, however the program should continue to run?

Here is what I got with the debug, maybe because the volume number comes back as a negative number?

root@MiOS_35027627:/tmp/log/cmh# tail -f LuaUPnP.log | grep YamahaRxHTTP 6059 root 1672 S grep YamahaRxHTTP 6059 root 1672 S grep YamahaRxHTTP 6059 root 1672 S grep YamahaRxHTTP 09 12/15/15 13:01:49.304 JobHandler_LuaUPnP::Run device 74 Yamaha Receiver HTTP room 10 type urn:schemas-a-lurker-com:device:YamahaRxHTTP:1 cat 0:-1 id parent 0/0xbb0578 upnp: 0 plugin:0 pnp:0 mac: ip:172.31. 255.79 <0x2b002000> 50 12/15/15 13:01:58.389 luup_log:74: YamahaRxHTTP debug: luaStartUp running <0x2b952680> 50 12/15/15 13:01:58.390 luup_log:74: YamahaRxHTTP debug: 0 --> Connected <0x2b952680> 06 12/15/15 13:01:58.391 Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: Connected was: 1 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2b95 2680> 50 12/15/15 13:01:58.391 luup_log:74: YamahaRxHTTP debug: 0.52 --> PluginVersion <0x2b952680> 50 12/15/15 13:01:58.392 luup_log:74: YamahaRxHTTP debug: <a href='http://172.31.255.79/' target='_blank'>Yamaha Receiver web page</a> --> LinkToDeviceWebPage <0x2b952680> 50 12/15/15 13:01:58.412 luup_log:74: YamahaRxHTTP debug: URL request result: r = 1 <0x2b952680> 50 12/15/15 13:01:58.413 luup_log:74: YamahaRxHTTP debug: URL request result: c = 200 <0x2b952680> 50 12/15/15 13:01:58.414 luup_log:74: YamahaRxHTTP debug: URL request result: h = table: 0x1199e88 <0x2b952680> 50 12/15/15 13:01:58.415 luup_log:74: YamahaRxHTTP debug: Returned web page data is : <YAMAHA_AV rsp="GET" RC="0"><System><Config><Model_Name>RX-V3900</Model_Name><System_ID>0C94EE83</System_ID><Version><Main> Y.0123.0203</Main><Sub>V119</Sub></Version></Config></System></YAMAHA_AV> <0x2b952680> 50 12/15/15 13:01:58.415 luup_log:74: YamahaRxHTTP debug: 1 --> Connected <0x2b952680> 06 12/15/15 13:01:58.416 Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: Connected was: 0 now: 1 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2b95 2680> 50 12/15/15 13:01:58.417 luup_log:74: YamahaRxHTTP debug: Successful execution of getConfig: XML is <YAMAHA_AV rsp="GET" RC="0"><System><Config><Model_Name>RX-V3900</Model_Name><System_ID>0C94EE83</System_ID>< Version><Main> Y.0123.0203</Main><Sub>V119</Sub></Version></Config></System></YAMAHA_AV> <0x2b952680> 50 12/15/15 13:01:58.419 luup_log:74: YamahaRxHTTP debug: XPath match, new result: RX-V3900 <0x2b952680> 50 12/15/15 13:01:58.420 luup_log:74: YamahaRxHTTP debug: XPath match, new result: 0C94EE83 <0x2b952680> 50 12/15/15 13:01:58.421 luup_log:74: YamahaRxHTTP debug: RX-V3900 --> ModelName <0x2b952680> 50 12/15/15 13:01:58.422 luup_log:74: YamahaRxHTTP debug: 1 --> ZoneCount <0x2b952680> 50 12/15/15 13:01:58.423 luup_log:74: YamahaRxHTTP debug: zStr Main_Zone <0x2b952680> 50 12/15/15 13:01:58.423 luup_log:74: YamahaRxHTTP debug: zNum = 1 <0x2b952680> 50 12/15/15 13:01:58.444 luup_log:74: YamahaRxHTTP debug: URL request result: r = 1 <0x2b952680> 50 12/15/15 13:01:58.444 luup_log:74: YamahaRxHTTP debug: URL request result: c = 200 <0x2b952680> 50 12/15/15 13:01:58.445 luup_log:74: YamahaRxHTTP debug: URL request result: h = table: 0x110f070 <0x2b952680> 50 12/15/15 13:01:58.446 luup_log:74: YamahaRxHTTP debug: Returned web page data is : <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Basic_Status><Power_Control><Power>Standby</Power><Sleep>Off</Sleep></Power_Control ><Vol><Lvl><Val>-275</Val><Exp>1</Exp><Unit>dB</Unit></Lvl><Mute>Off</Mute></Vol><Input><Input_Sel>CBL/SAT</Input_Sel><Input_Sel_Title>CBL/SAT</Input_Sel_Title></Input><Surr><Pgm_Sel><Straight>Off</Straight><Pgm>Surround Decode</Pgm></Pgm_Sel></Surr></Basic_Status></Main_Zone></YAMAHA_AV> <0x2b952680> 50 12/15/15 13:01:58.447 luup_log:74: YamahaRxHTTP debug: 1 --> Connected <0x2b952680> 50 12/15/15 13:01:58.448 luup_log:74: YamahaRxHTTP debug: Successful execution of getZoneStatus for Main_Zone: XML is <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Basic_Status><Power_Control><Power>Standby</Power>< Sleep>Off</Sleep></Power_Control><Vol><Lvl><Val>-275</Val><Exp>1</Exp><Unit>dB</Unit></Lvl><Mute>Off</Mute></Vol><Input><Input_Sel>CBL/SAT</Input_Sel><Input_Sel_Title>CBL/SAT</Input_Sel_Title></Input><Surr><Pgm_Sel>< Straight>Off</Straight><Pgm>Surround Decode</Pgm></Pgm_Sel></Surr></Basic_Status></Main_Zone></YAMAHA_AV> <0x2b952680> 50 12/15/15 13:01:58.449 luup_log:74: YamahaRxHTTP debug: XPath match, new result: Standby <0x2b952680> 50 12/15/15 13:01:58.451 luup_log:74: YamahaRxHTTP debug: XPath match, new result: CBL/SAT <0x2b952680> 01 12/15/15 13:01:58.453 LuImplementation::StartLua running startup code for 74 I_YamahaRxHTTP1.xml failed <0x2b952680>

Thanks for the log - that helped.

Looks like your AVR uses the tag ‘Vol’ rather than ‘Volume’ for the volume information. I’ve changed the code to allow both tags. So please try the attached ‘L_YamahaRxHTTP1.lua’ file. It’s version 0.53 and I have the debug flag set to false. Set it to true for your testing.

It’s possible that the volume now displays correctly but Volume up/down does not work. It depends on what tag is used when setting the volume, rather than just reading the configuration. Line 444 sets the volume. If you find it doesn’t work, try changing the opening and closing tag from ‘Volume’ to ‘Vol’ on that line. Likewise, also see line 413 that set’s the volume absolute. Be careful not to accidentally change anything else.

The mute also may not work - same comments apply - see Line 454.

L_YamahaRxHTTP1.lua

See first post and down load from using AltUI store or GitHub.

Thanks a-lurker. The lua script will now load all the way and that error is gone but I still have a couple issues, it still says can’t detect device in the UI and the volume is displayed but can’t be changed as you predicted, I updated line 444 as you suggested. I captured this in the log when I tried to adjust the volume.

50 12/15/15 21:32:44.122 luup_log:74: YamahaRxHTTP debug: Successful execution of getZoneStatus for Main_Zone: XML is <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Basic_Status><Power_Control><Power>On</Power><Sleep>Off</Sleep></Power_Control><Vol><Lvl><Val>-350</Val><Exp>1</Exp><Unit>dB</Unit></Lvl><Mute>Off</Mute></Vol><Input><Input_Sel>CBL/SAT</Input_Sel><Input_Sel_Title>CBL/SAT</Input_Sel_Title></Input><Surr><Pgm_Sel><Straight>Off</Straight><Pgm>Surround Decode</Pgm></Pgm_Sel></Surr></Basic_Status></Main_Zone></YAMAHA_AV> <0x2d7aa680> 50 12/15/15 21:32:44.123 luup_log:74: YamahaRxHTTP debug: XPath match, new result: On <0x2d7aa680> 50 12/15/15 21:32:44.124 luup_log:74: YamahaRxHTTP debug: XPath match, new result: -350 <0x2d7aa680> 50 12/15/15 21:32:44.126 luup_log:74: YamahaRxHTTP debug: XPath match, new result: Off <0x2d7aa680> 50 12/15/15 21:32:44.127 luup_log:74: YamahaRxHTTP debug: XPath match, new result: CBL/SAT <0x2d7aa680> 50 12/15/15 21:32:44.128 luup_log:74: YamahaRxHTTP debug: -35 --> MainZoneVolume <0x2d7aa680> 06 12/15/15 21:32:44.129 Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: MainZoneVolume was: -35 now: -35 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2d7aa680> 50 12/15/15 21:32:44.130 luup_log:74: YamahaRxHTTP debug: On --> MainZonePower <0x2d7aa680> 06 12/15/15 21:32:44.131 Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: MainZonePower was: On now: On #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2d7aa680> 50 12/15/15 21:32:44.131 luup_log:74: YamahaRxHTTP debug: CBL/SAT --> MainZoneInput <0x2d7aa680> 06 12/15/15 21:32:44.133 Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: MainZoneInput was: CBL/SAT now: CBL/SAT #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2d7aa680> 50 12/15/15 21:32:44.133 luup_log:74: YamahaRxHTTP debug: Off --> MainZoneMute <0x2d7aa680> 08 12/15/15 21:32:53.892 JobHandler_LuaUPnP::HandleActionRequest device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 action: SetVolumeUpDown <0x2e9aa680> 08 12/15/15 21:32:53.892 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=74 <0x2e9aa680> 50 12/15/15 21:32:53.901 luup_log:74: YamahaRxHTTP debug: zStr Main_Zone <0x2e9aa680> 50 12/15/15 21:32:53.902 luup_log:74: YamahaRxHTTP debug: zNum = 1 <0x2e9aa680> 50 12/15/15 21:32:53.903 luup_log:74: YamahaRxHTTP debug: zStr Main_Zone <0x2e9aa680> 50 12/15/15 21:32:53.903 luup_log:74: YamahaRxHTTP debug: zNum = 1 <0x2e9aa680> 50 12/15/15 21:32:53.904 luup_log:74: YamahaRxHTTP debug: Sending command: <?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="PUT"><Main_Zone><Vol><Lvl><Val>Up 5 dB</Val><Exp></Exp><Unit></Unit></Lvl></Vol></Main_Zone></YAMAHA_AV> <0x2e9aa680> 50 12/15/15 21:32:53.941 luup_log:74: YamahaRxHTTP debug: URL request result: r = 1 <0x2e9aa680> 50 12/15/15 21:32:53.942 luup_log:74: YamahaRxHTTP debug: URL request result: c = 400 <0x2e9aa680> 50 12/15/15 21:32:53.942 luup_log:74: YamahaRxHTTP debug: URL request result: h = table: 0x128b8f0 <0x2e9aa680> 01 12/15/15 21:32:53.943 luup_log:74: YamahaRxHTTP debug: HTTP 400 Bad Request: XML parse error <0x2e9aa680> 50 12/15/15 21:32:53.944 luup_log:74: YamahaRxHTTP debug: zStr Main_Zone <0x2e9aa680> 50 12/15/15 21:32:53.955 luup_log:74: YamahaRxHTTP debug: zNum = 1 <0x2e9aa680> 50 12/15/15 21:32:53.971 luup_log:74: YamahaRxHTTP debug: URL request result: r = 1 <0x2e9aa680> 50 12/15/15 21:32:53.972 luup_log:74: YamahaRxHTTP debug: URL request result: c = 200 <0x2e9aa680> 50 12/15/15 21:32:53.973 luup_log:74: YamahaRxHTTP debug: URL request result: h = table: 0x11800a0 <0x2e9aa680> 50 12/15/15 21:32:53.973 luup_log:74: YamahaRxHTTP debug: Returned web page data is : <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Basic_Status><Power_Control><Power>On</Power><Sleep>Off</Sleep></Power_Control><Vol><Lvl><Val>-350</Val><Exp>1</Exp><Unit>dB</Unit></Lvl><Mute>Off</Mute></Vol><Input><Input_Sel>CBL/SAT</Input_Sel><Input_Sel_Title>CBL/SAT</Input_Sel_Title></Input><Surr><Pgm_Sel><Straight>Off</Straight><Pgm>Surround Decode</Pgm></Pgm_Sel></Surr></Basic_Status></Main_Zone></YAMAHA_AV> <0x2e9aa680> 50 12/15/15 21:32:53.974 luup_log:74: YamahaRxHTTP debug: 1 --> Connected <0x2e9aa680>

As for the Can’t Detect Device I wonder if these messages are related

50 12/15/15 21:46:44.120 luup_log:74: YamahaRxHTTP debug: Returned web page data is : <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Basic_Status><Power_Control><Power>On</Power><Sleep>Off</Sleep></Power_Control><Vol><Lvl><Val>-350</Val><Exp>1</Exp><Unit>dB</Unit></Lvl><Mute>Off</Mute></Vol><Input><Input_Sel>CBL/SAT</Input_Sel><Input_Sel_Title>CBL/SAT</Input_Sel_Title></Input><Surr><Pgm_Sel><Straight>Off</Straight><Pgm>Surround Decode</Pgm></Pgm_Sel></Surr></Basic_Status></Main_Zone></YAMAHA_AV> <0x2d7aa680> 50 12/15/15 21:46:44.121 luup_log:74: YamahaRxHTTP debug: 1 --> Connected <0x2d7aa680> 01 12/15/15 21:46:44.121 luup_variable_get interface 0xfe8200 no Connected/(null) <0x2d7aa680> 06 12/15/15 21:46:44.122 Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: Connected was: 1 now: 1 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2d7aa680> 50 12/15/15 21:46:44.123 luup_log:74: YamahaRxHTTP debug: Successful execution of getZoneStatus for Main_Zone: XML is <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Basic_Status><Power_Control><Power>On</Power><Sleep>Off</Sleep></Power_Control><Vol><Lvl><Val>-350</Val><Exp>1</Exp><Unit>dB</Unit></Lvl><Mute>Off</Mute></Vol><Input><Input_Sel>CBL/SAT</Input_Sel><Input_Sel_Title>CBL/SAT</Input_Sel_Title></Input><Surr><Pgm_Sel><Straight>Off</Straight><Pgm>Surround Decode</Pgm></Pgm_Sel></Surr></Basic_Status></Main_Zone></YAMAHA_AV> <0x2d7aa680> 50 12/15/15 21:46:44.124 luup_log:74: YamahaRxHTTP debug: XPath match, new result: On <0x2d7aa680> 50 12/15/15 21:46:44.125 luup_log:74: YamahaRxHTTP debug: XPath match, new result: -350 <0x2d7aa680> 50 12/15/15 21:46:44.127 luup_log:74: YamahaRxHTTP debug: XPath match, new result: Off <0x2d7aa680> 50 12/15/15 21:46:44.127 luup_log:74: YamahaRxHTTP debug: XPath match, new result: CBL/SAT <0x2d7aa680> 50 12/15/15 21:46:44.129 luup_log:74: YamahaRxHTTP debug: -35 --> MainZoneVolume <0x2d7aa680> 01 12/15/15 21:46:44.130 luup_variable_get interface 0xfe8200 no MainZoneVolume/(null) <0x2d7aa680> 06 12/15/15 21:46:44.130 Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: MainZoneVolume was: -35 now: -35 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2d7aa680> 50 12/15/15 21:46:44.131 luup_log:74: YamahaRxHTTP debug: On --> MainZonePower <0x2d7aa680> 01 12/15/15 21:46:44.131 luup_variable_get interface 0xfe8200 no MainZonePower/(null) <0x2d7aa680> 06 12/15/15 21:46:44.132 Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: MainZonePower was: On now: On #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2d7aa680> 50 12/15/15 21:46:44.132 luup_log:74: YamahaRxHTTP debug: CBL/SAT --> MainZoneInput <0x2d7aa680> 01 12/15/15 21:46:44.133 luup_variable_get interface 0xfe8200 no MainZoneInput/(null) <0x2d7aa680> 06 12/15/15 21:46:44.134 Device_Variable::m_szValue_set device: 74 service: urn:a-lurker-com:serviceId:YamahaRxHTTP1 variable: MainZoneInput was: CBL/SAT now: CBL/SAT #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2d7aa680> 50 12/15/15 21:46:44.134 luup_log:74: YamahaRxHTTP debug: Off --> MainZoneMute <0x2d7aa680> 01 12/15/15 21:46:44.135 luup_variable_get interface 0xfe8200 no MainZoneMute/(null) <0x2d7aa680>

Thanks again for your help.

On the first bit re: setting the volume - looks like a different style of command is used once again. Hence the “HTTP 400 Bad Request: XML parse error”. I can work on this.

On the second lot of errors - that’s my mistake. On line 4 change SERVICE_ID to PLUGIN_SID

local SERVICE_ID      = 'urn:a-lurker-com:serviceId:'..PLUGIN_NAME..'1'
local PLUGIN_SID      = 'urn:a-lurker-com:serviceId:'..PLUGIN_NAME..'1'

If you use the AltUi plugin (it is highly recommended that you do), then try changing the volume using the SetVolume action for this Yamaha plugin. Alter line 413 to use ‘Vol’ instead of ‘Volume’ first.

And is the mute working?

EDIT: assuming you can control your AVR via a web page application: can you please provide the XML strings when you:
a) set the level to a specific/absolute volume
b) operate the level up button - I assume the up step amount is fixed?
c) operate the level down button - I assume the down step amount is fixed?

Need to use Chrome or Firebug to capture the strings. Otherwise I’m guessing a bit about what needs to be done.

Using the up down buttons for a volume change seems to sends out the same XML command only the value changes, the client figures out what the desired volume level is a sets it to that value. I grabbed the commands for mute, power, and input selection while I was at it.

Volume Change:

<YAMAHA_AV cmd="Put"><Main_Zone><Vol><Lvl><Val>-350</Val><Exp>1</Exp><Unit>db</Unit></Lvl></Vol></Main_Zone></YAMAHA_AV>

Mute on/off:

<YAMAHA_AV cmd="Put"><Main_Zone><Vol><Mute>On</Mute></Vol></Main_Zone></YAMAHA_AV> <YAMAHA_AV cmd="Put"><Main_Zone><Vol><Mute>Off</Mute></Vol></Main_Zone></YAMAHA_AV>

Power on/off Main Zone:

<YAMAHA_AV cmd="Put"><Main_Zone><Power_Control><Power>On</Power></Power_Control></Main_Zone></YAMAHA_AV> <YAMAHA_AV cmd="Put"><Main_Zone><Power_Control><Power>Standby</Power></Power_Control></Main_Zone></YAMAHA_AV>

Input Selection:

<YAMAHA_AV cmd="Put"><Main_Zone><Input><Input_Sel>CBL/SAT<Input_Sel><Input></Main_Zone></YAMAHA_AV>

Try out the attached.

L_YamahaRxHTTP1.lua

See first post and down load from using AltUI store or GitHub.

That did it, all seems to be working now. Thank you for all your help!

Its been a while since this thread has been active so I am not sure if you are still supporting this plugin. I have used this plugin for a few years and it is great, I recently have had the need to use the set volume function but it does not seem to respond on my RX-2040 AVR. Am I correct in assuming that the set volume parameter allows you to send discrete volume levels to the device i.e. -45.5 dB? I tried sending both -455 and -45.5.

Hello Tarkus

Mmm been a long time since I did this one. It looks like your unit was just released about that time. So hopefully it uses the same control codes.

Have a look at the plugin doco here.

Note that they volume can be set differently for different zones, so the zone must be considered. This code should alter the volume of the main zone - note that the volume value is in 0.5 steps. It can be run in the UI for testing purposes:

local YAMAHA_ID  = your_unit_id_goes_here
local YAMAHA_SID = "urn:a-lurker-com:serviceId:YamahaRxHTTP1"
luup.call_action(YAMAHA_SID, "SetVolume", {Zone='1', Volume='0'}, YAMAHA_ID)
return true

Alternatively you should be able to set the volume for each zone in the UI. If that doesn’t work then to see the log results.

Hope this helps.

Log attached

Ok - looks like it’s getting a request it doesn’t understand.

In the file L_YamahaRxHTTP1.lua, at about line 37, if you change:

local DEBUG_MODE = false

to

local DEBUG_MODE = true

and repost the results that will give more information. If that’s difficult, I can upload a modified version instead.

In the interim; have you seen any sites that discuss the volume setting commands for your device?