AVS Forum banner

1 - 6 of 6 Posts

·
Registered
Joined
·
132 Posts
Discussion Starter #1
Just picked up a Pioneer AVR and got my HTPC set up with HDMI audio and everything is great.

In trying to get the best sound quality from PC to AVR, I set up WASAPI bit-perfect output wherever possible and this works perfectly, but I quickly discovered that my volume controls no longer had any effect, due to the WASAPI exclusive mode. This was particularly annoying as I have a Logitech keyboard with multimedia keys (volume control knob, mute key etc..) and not being able to use these any longer was very inconvenient.

I discovered that you can send commands to the AVR via HTTP requests (from the AVRs builit-in web server under the operations guide section). By discovering the HTTP request url, it became very easy to send the required commands to the AVR directly, and by using AutoHotKey, it was possible to map the commands directly to keyboard input :D

The format of the HTTP request is as follows:

http://[I]AVR IP Address[/I]/EventHandler.asp?WebToHostItem=command

So, if your AVRs IP address was 192.168.1.100 and you wanted to increase the volume your HTTP query would be:

http://192.168.1.100/EventHandler.asp?WebToHostItem=VU

The command is interpreted as a single remote control key press, so in this instance it would be a volume increase of +0.5dB.

There are a few Pioneer docs online that list a lot of the supported commands, a few of the main ones I was after are listed below:

Volume Controls:
MZ - Mute on/off toggle
VD - Volume down
VU - Volume up

Listening Modes:
0010SR - STANDARD
0006SR - AUTO SURROUND
0151SR - Auto Level Control (A.L.C.)
0007SR - DIRECT
0008SR - PURE DIRECT
0013SR - PRO LOGIC2 MOVIE
0213SR - ECO MODE 2

Inputs:
19FN - HDMI 1
05FN - TV

MCACC Presets:

1MC MCACC Memory 1
2MC MCACC Memory 2
3MC MCACC Memory 3

To map all of this to your keyboard, you use AutoHotKey. I have created a basic script that deals only with the volume controls and maps them to the general Microsoft Windows multimedia key inputs that many keyboards have, but you can edit the script to map to just about any input on your PC. The script is as follows:

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")

Volume_Down::
whr.Open("GET", "http://192.168.1.100/EventHandler.asp?WebToHostItem=VD", true)
whr.Send()
whr.WaitForResponse()
return

Volume_Up::
whr.Open("GET", "http://192.168.1.100/EventHandler.asp?WebToHostItem=VU", true)
whr.Send()
whr.WaitForResponse()
return

Volume_Mute::
whr.Open("GET", "http://192.168.1.100/EventHandler.asp?WebToHostItem=MZ", true)
whr.Send()
whr.WaitForResponse()
return

Im not a coder and realise there is some repetition/redundancy in the script but its so small and runs so great (really responsive!) that I didn't want to try and use variables etc.. to streamline the code - someone else can do that ;)

Hope someone finds this useful, it has been great for me. Just to mention, It appears possible to get responses from the AVR by sending queries to it asking for things like current volume level, listening mode etc.. and AutoHotKey would most certainly have the ability to show a small OSD graphic to display these returned values - it would be nice to have the AVR volume level temporarily appear on screen when changing volume on the PC for example - unfortunately this is a bit more complex and beyond me at present... perhaps someone more talented in the ways of AutoHotKey might be able to work some magic? :p

BAM.
 

·
Registered
Joined
·
36 Posts
Just picked up a Pioneer AVR and got my HTPC set up with HDMI audio and everything is great.

In trying to get the best sound quality from PC to AVR, I set up WASAPI bit-perfect output wherever possible and this works perfectly, but I quickly discovered that my volume controls no longer had any effect, due to the WASAPI exclusive mode. This was particularly annoying as I have a Logitech keyboard with multimedia keys (volume control knob, mute key etc..) and not being able to use these any longer was very inconvenient.

I discovered that you can send commands to the AVR via HTTP requests (from the AVRs builit-in web server under the operations guide section). By discovering the HTTP request url, it became very easy to send the required commands to the AVR directly, and by using AutoHotKey, it was possible to map the commands directly to keyboard input :D

The format of the HTTP request is as follows:

http://[I]AVR IP Address[/I]/EventHandler.asp?WebToHostItem=command

So, if your AVRs IP address was 192.168.1.100 and you wanted to increase the volume your HTTP query would be:

http://192.168.1.100/EventHandler.asp?WebToHostItem=VU

The command is interpreted as a single remote control key press, so in this instance it would be a volume increase of +0.5dB.

There are a few Pioneer docs online that list a lot of the supported commands, a few of the main ones I was after are listed below:

Volume Controls:
MZ - Mute on/off toggle
VD - Volume down
VU - Volume up

Listening Modes:
0010SR - STANDARD
0006SR - AUTO SURROUND
0151SR - Auto Level Control (A.L.C.)
0007SR - DIRECT
0008SR - PURE DIRECT
0013SR - PRO LOGIC2 MOVIE
0213SR - ECO MODE 2

Inputs:
19FN - HDMI 1
05FN - TV

MCACC Presets:

1MC MCACC Memory 1
2MC MCACC Memory 2
3MC MCACC Memory 3

To map all of this to your keyboard, you use AutoHotKey. I have created a basic script that deals only with the volume controls and maps them to the general Microsoft Windows multimedia key inputs that many keyboards have, but you can edit the script to map to just about any input on your PC. The script is as follows:

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")

Volume_Down::
whr.Open("GET", "http://192.168.1.100/EventHandler.asp?WebToHostItem=VD", true)
whr.Send()
whr.WaitForResponse()
return

Volume_Up::
whr.Open("GET", "http://192.168.1.100/EventHandler.asp?WebToHostItem=VU", true)
whr.Send()
whr.WaitForResponse()
return

Volume_Mute::
whr.Open("GET", "http://192.168.1.100/EventHandler.asp?WebToHostItem=MZ", true)
whr.Send()
whr.WaitForResponse()
return

Im not a coder and realise there is some repetition/redundancy in the script but its so small and runs so great (really responsive!) that I didn't want to try and use variables etc.. to streamline the code - someone else can do that ;)

Hope someone finds this useful, it has been great for me. Just to mention, It appears possible to get responses from the AVR by sending queries to it asking for things like current volume level, listening mode etc.. and AutoHotKey would most certainly have the ability to show a small OSD graphic to display these returned values - it would be nice to have the AVR volume level temporarily appear on screen when changing volume on the PC for example - unfortunately this is a bit more complex and beyond me at present... perhaps someone more talented in the ways of AutoHotKey might be able to work some magic? :p

BAM.
The commands appear to be the same as the ones for direct TCP/IP communication.

It's good to know that the Pioneers can deal with HTTP requests. Thanks for sharing.
 

·
Registered
Joined
·
397 Posts
This is great. It's curious to see that when using the Volume commands. that it adjusts only .5dB. I thought the default as with AirPlay would be 3.5dB. I wonder if they are using a modifier to alter the amount? It would be great if it were only .5dB. The way it is with AirPlay you go from nice to painful in a second, and the response is spotty at best. So to get it back down in a hurry, if necessary, it doesn't always do it as fast as you need.

Thanks.
 

·
Registered
Joined
·
1,001 Posts
This is great. It's curious to see that when using the Volume commands. that it adjusts only .5dB. I thought the default as with AirPlay would be 3.5dB. I wonder if they are using a modifier to alter the amount? It would be great if it were only .5dB. The way it is with AirPlay you go from nice to painful in a second, and the response is spotty at best. So to get it back down in a hurry, if necessary, it doesn't always do it as fast as you need.

Thanks.
This is a comment from my .NET program, derived from Pioneer's IP documentation and a little experimentation with my 1124:

Code:
// Volume = [0, 185]; 0 = Min, 1 = -80 dB, 81 = -40 dB, 161 = 0 dB, 185 = +12 dB, [U][B]each step = .5 dB[/B][/U]
By querying the volume, you can bump the current volume by any amount. For example, I have buttons on my remote mapped to bump by -10 dB and +10 dB, and there's another one to return the volume to my default start-up volume -40 dB. Here's a small part of my Autohotkey bindings; the #Numpad stuff is for sitting at the keyboard, the F13-F24 combinations don't appear on my keyboard and are for using with my MCE remote:

Code:
^+F21::
    Run C:\bin\pioavr.exe ip_address -vol set -40, , Hide
    return
^+F23::
#NumpadSub::
    Run C:\bin\pioavr.exe ip_address -vol bump -10, , Hide
    return
^+F24::
#NumpadAdd::
    Run C:\bin\pioavr.exe ip_address -vol bump 10, , Hide
    return
#Enter:: ; Restore default for sitting at my computer
#NumpadEnter::
    Run C:\bin\pioavr.exe ip_address -mcacc set 6 -vol set -40, , Hide
    return
I did not know you could do it with URLs and thus easily within Autohotkey all by itself. However, one thing that doesn't seem to work at all with the URL method is powering on, but that said, it only sort of barely works when using the IP interface. There's about a 15 second delay after writing "PO\r" using TCP/IP before the unit turns on.
 

·
Registered
Joined
·
132 Posts
Discussion Starter #5 (Edited)
However, one thing that doesn't seem to work at all with the URL method is powering on, but that said, it only sort of barely works when using the IP interface. There's about a 15 second delay after writing "PO\r" using TCP/IP before the unit turns on.
I noticed this too, it doesnt even work from the built-in web-based remote control on the AVR and I seen others mention it didnt work for them either. I had a look through some more Pioneer docs and came across this:

Notice1
This equipment save the power consumption (less than 1W) during the standby mode.
To achieve this, main CPU doesn't operate during standby mode.
For this reason, this equipment can not receive the 1st command from rs-232c port.
But main CPU will be waked up by this 1st command.
This equipment is using 1st command "" as only a trigger to wake up the main CPU
and can not decode 1st command.
Please send command as bellow.
Please make sure to have at least 100msec. Interval between the 1st command and the second command.


Another doc explicitly states that the "PO" command must be sent twice in order to function - this would appear to correspond with the notice above that the 1st command merely triggers the AVR CPU to wake up from standby, whilst the 2nd is sent so that it can be properly processed. I havent done any testing with this but it may be a potential solution...

BAM
 

·
Registered
Joined
·
1,001 Posts
I noticed this too, it doesnt even work from the built-in web-based remote control on the AVR and I seen others mention it didnt work for them either. I had a look through some more Pioneer docs and came across this:

Notice1
This equipment save the power consumption (less than 1W) during the standby mode.
To achieve this, main CPU doesn't operate during standby mode.
For this reason, this equipment can not receive the 1st command from rs-232c port.
But main CPU will be waked up by this 1st command.
This equipment is using 1st command "" as only a trigger to wake up the main CPU
and can not decode 1st command.
Please send command as bellow.
Please make sure to have at least 100msec. Interval between the 1st command and the second command.


Another doc explicitly states that the "PO" command must be sent twice in order to function - this would appear to correspond with the notice above that the 1st command merely triggers the AVR CPU to wake up from standby, whilst the 2nd is sent so that it can be properly processed. I havent done any testing with this but it may be a potential solution...

BAM
The double "PO\r" isn't necessary when using TCP/IP, and it doesn't help with the power-on time. I started off doing exactly what the documentation you cited said, and I experimented with the delay interval between commands as well. Nothing helped, so I just ripped it all out and now send a single "PO\r". I think that documentation applies just to RS-232 or is perhaps outdated and no longer relevant, and they didn't bother to make that totally clear.

I wrote more about power-on here:

http://www.avsforum.com/forum/90-re...124-1024-824-discussions-12.html#post32389793

Even AVNavigator doesn't eliminate the 10 second power-on delay when it has to reconnect, as I observed in WireShark traces, and I guess it isn't possible without keeping the connection alive at all times.
 
1 - 6 of 6 Posts
Top